diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml deleted file mode 100644 index 5184a28..0000000 --- a/.github/workflows/npm-publish.yml +++ /dev/null @@ -1,34 +0,0 @@ -# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created -# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages - -name: Node.js Package - -on: - push: - tags: - - '*' - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - - run: npm ci - - run: npm test - - publish-npm: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - registry-url: https://registry.npmjs.org/ - - run: npm ci - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} diff --git a/README.md b/README.md index 062251b..d301f2e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## gate-api@5.90.1 +## gate-api@6.91.0 TypeScript NodeJS client for gate-api. @@ -8,7 +8,7 @@ APIv4 provides spot, margin and futures trading operations. There are public API This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 4.90.1 +- API version: 4.91.0 - Package version: - Build package: org.openapitools.codegen.languages.TypeScriptNodeClientCodegen For more information, please visit [https://www.gate.io/page/contacts](https://www.gate.io/page/contacts) @@ -80,14 +80,14 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AccountApi* | [**getAccountDetail**](docs/AccountApi.md#getAccountDetail) | **GET** /account/detail | Get account detail -*AccountApi* | [**getAccountRateLimit**](docs/AccountApi.md#getAccountRateLimit) | **GET** /account/rate_limit | 获取用户成交比率限频信息 +*AccountApi* | [**getAccountRateLimit**](docs/AccountApi.md#getAccountRateLimit) | **GET** /account/rate_limit | Get user transaction rate limit information *AccountApi* | [**listSTPGroups**](docs/AccountApi.md#listSTPGroups) | **GET** /account/stp_groups | List STP Groups *AccountApi* | [**createSTPGroup**](docs/AccountApi.md#createSTPGroup) | **POST** /account/stp_groups | Create STP Group *AccountApi* | [**listSTPGroupsUsers**](docs/AccountApi.md#listSTPGroupsUsers) | **GET** /account/stp_groups/{stp_id}/users | List users of the STP group *AccountApi* | [**addSTPGroupUsers**](docs/AccountApi.md#addSTPGroupUsers) | **POST** /account/stp_groups/{stp_id}/users | Add users to the STP group *AccountApi* | [**deleteSTPGroupUsers**](docs/AccountApi.md#deleteSTPGroupUsers) | **DELETE** /account/stp_groups/{stp_id}/users | Delete the user in the STP group -*AccountApi* | [**getDebitFee**](docs/AccountApi.md#getDebitFee) | **GET** /account/debit_fee | 查询GT抵扣配置 -*AccountApi* | [**setDebitFee**](docs/AccountApi.md#setDebitFee) | **POST** /account/debit_fee | 设定GT抵扣 +*AccountApi* | [**getDebitFee**](docs/AccountApi.md#getDebitFee) | **GET** /account/debit_fee | Query GT deduction configuration. +*AccountApi* | [**setDebitFee**](docs/AccountApi.md#setDebitFee) | **POST** /account/debit_fee | Set GT deduction. *CollateralLoanApi* | [**listCollateralLoanOrders**](docs/CollateralLoanApi.md#listCollateralLoanOrders) | **GET** /loan/collateral/orders | List Orders *CollateralLoanApi* | [**createCollateralLoan**](docs/CollateralLoanApi.md#createCollateralLoan) | **POST** /loan/collateral/orders | Place order *CollateralLoanApi* | [**getCollateralLoanOrderDetail**](docs/CollateralLoanApi.md#getCollateralLoanOrderDetail) | **GET** /loan/collateral/orders/{order_id} | Get a single order @@ -190,7 +190,7 @@ Class | Method | HTTP request | Description *FuturesApi* | [**countdownCancelAllFutures**](docs/FuturesApi.md#countdownCancelAllFutures) | **POST** /futures/{settle}/countdown_cancel_all | Countdown cancel orders *FuturesApi* | [**getFuturesFee**](docs/FuturesApi.md#getFuturesFee) | **GET** /futures/{settle}/fee | Query user trading fee rates *FuturesApi* | [**cancelBatchFutureOrders**](docs/FuturesApi.md#cancelBatchFutureOrders) | **POST** /futures/{settle}/batch_cancel_orders | Cancel a batch of orders with an ID list -*FuturesApi* | [**amendBatchFutureOrders**](docs/FuturesApi.md#amendBatchFutureOrders) | **POST** /futures/{settle}/batch_amend_orders | 批量修改指定 ID 的订单 +*FuturesApi* | [**amendBatchFutureOrders**](docs/FuturesApi.md#amendBatchFutureOrders) | **POST** /futures/{settle}/batch_amend_orders | Batch modify orders with specified IDs *FuturesApi* | [**listPriceTriggeredOrders**](docs/FuturesApi.md#listPriceTriggeredOrders) | **GET** /futures/{settle}/price_orders | List all auto orders *FuturesApi* | [**createPriceTriggeredOrder**](docs/FuturesApi.md#createPriceTriggeredOrder) | **POST** /futures/{settle}/price_orders | Create a price-triggered order *FuturesApi* | [**cancelPriceTriggeredOrderList**](docs/FuturesApi.md#cancelPriceTriggeredOrderList) | **DELETE** /futures/{settle}/price_orders | Cancel all open orders @@ -202,19 +202,19 @@ Class | Method | HTTP request | Description *MarginApi* | [**getAutoRepayStatus**](docs/MarginApi.md#getAutoRepayStatus) | **GET** /margin/auto_repay | Retrieve user auto repayment setting *MarginApi* | [**setAutoRepay**](docs/MarginApi.md#setAutoRepay) | **POST** /margin/auto_repay | Update user\'s auto repayment setting *MarginApi* | [**getMarginTransferable**](docs/MarginApi.md#getMarginTransferable) | **GET** /margin/transferable | Get the max transferable amount for a specific margin currency -*MarginApi* | [**listCrossMarginCurrencies**](docs/MarginApi.md#listCrossMarginCurrencies) | **GET** /margin/cross/currencies | Currencies supported by cross margin. -*MarginApi* | [**getCrossMarginCurrency**](docs/MarginApi.md#getCrossMarginCurrency) | **GET** /margin/cross/currencies/{currency} | Retrieve detail of one single currency supported by cross margin -*MarginApi* | [**getCrossMarginAccount**](docs/MarginApi.md#getCrossMarginAccount) | **GET** /margin/cross/accounts | Retrieve cross margin account -*MarginApi* | [**listCrossMarginAccountBook**](docs/MarginApi.md#listCrossMarginAccountBook) | **GET** /margin/cross/account_book | Retrieve cross margin account change history -*MarginApi* | [**listCrossMarginLoans**](docs/MarginApi.md#listCrossMarginLoans) | **GET** /margin/cross/loans | List cross margin borrow history -*MarginApi* | [**createCrossMarginLoan**](docs/MarginApi.md#createCrossMarginLoan) | **POST** /margin/cross/loans | Create a cross margin borrow loan -*MarginApi* | [**getCrossMarginLoan**](docs/MarginApi.md#getCrossMarginLoan) | **GET** /margin/cross/loans/{loan_id} | Retrieve single borrow loan detail -*MarginApi* | [**listCrossMarginRepayments**](docs/MarginApi.md#listCrossMarginRepayments) | **GET** /margin/cross/repayments | Retrieve cross margin repayments -*MarginApi* | [**repayCrossMarginLoan**](docs/MarginApi.md#repayCrossMarginLoan) | **POST** /margin/cross/repayments | Cross margin repayments -*MarginApi* | [**getCrossMarginInterestRecords**](docs/MarginApi.md#getCrossMarginInterestRecords) | **GET** /margin/cross/interest_records | Interest records for the cross margin account -*MarginApi* | [**getCrossMarginTransferable**](docs/MarginApi.md#getCrossMarginTransferable) | **GET** /margin/cross/transferable | Get the max transferable amount for a specific cross margin currency -*MarginApi* | [**getCrossMarginEstimateRate**](docs/MarginApi.md#getCrossMarginEstimateRate) | **GET** /margin/cross/estimate_rate | Estimated interest rates -*MarginApi* | [**getCrossMarginBorrowable**](docs/MarginApi.md#getCrossMarginBorrowable) | **GET** /margin/cross/borrowable | Get the max borrowable amount for a specific cross margin currency +*MarginApi* | [**listCrossMarginCurrencies**](docs/MarginApi.md#listCrossMarginCurrencies) | **GET** /margin/cross/currencies | Currencies supported by cross margin.(deprecated) +*MarginApi* | [**getCrossMarginCurrency**](docs/MarginApi.md#getCrossMarginCurrency) | **GET** /margin/cross/currencies/{currency} | Retrieve detail of one single currency supported by cross margin. (deprecated) +*MarginApi* | [**getCrossMarginAccount**](docs/MarginApi.md#getCrossMarginAccount) | **GET** /margin/cross/accounts | Retrieve cross margin account. (deprecated) +*MarginApi* | [**listCrossMarginAccountBook**](docs/MarginApi.md#listCrossMarginAccountBook) | **GET** /margin/cross/account_book | Retrieve cross margin account change history. (deprecated) +*MarginApi* | [**listCrossMarginLoans**](docs/MarginApi.md#listCrossMarginLoans) | **GET** /margin/cross/loans | List cross margin borrow history. (deprecated) +*MarginApi* | [**createCrossMarginLoan**](docs/MarginApi.md#createCrossMarginLoan) | **POST** /margin/cross/loans | Create a cross margin borrow loan. (deprecated) +*MarginApi* | [**getCrossMarginLoan**](docs/MarginApi.md#getCrossMarginLoan) | **GET** /margin/cross/loans/{loan_id} | Retrieve single borrow loan detail. (deprecated) +*MarginApi* | [**listCrossMarginRepayments**](docs/MarginApi.md#listCrossMarginRepayments) | **GET** /margin/cross/repayments | Retrieve cross margin repayments. (deprecated) +*MarginApi* | [**repayCrossMarginLoan**](docs/MarginApi.md#repayCrossMarginLoan) | **POST** /margin/cross/repayments | Cross margin repayments. (deprecated) +*MarginApi* | [**getCrossMarginInterestRecords**](docs/MarginApi.md#getCrossMarginInterestRecords) | **GET** /margin/cross/interest_records | Interest records for the cross margin account. (deprecated) +*MarginApi* | [**getCrossMarginTransferable**](docs/MarginApi.md#getCrossMarginTransferable) | **GET** /margin/cross/transferable | Get the max transferable amount for a specific cross margin currency. (deprecated) +*MarginApi* | [**getCrossMarginEstimateRate**](docs/MarginApi.md#getCrossMarginEstimateRate) | **GET** /margin/cross/estimate_rate | Estimated interest rates. (deprecated) +*MarginApi* | [**getCrossMarginBorrowable**](docs/MarginApi.md#getCrossMarginBorrowable) | **GET** /margin/cross/borrowable | Get the max borrowable amount for a specific cross margin currency. (deprecated) *MarginUniApi* | [**listUniCurrencyPairs**](docs/MarginUniApi.md#listUniCurrencyPairs) | **GET** /margin/uni/currency_pairs | List lending markets *MarginUniApi* | [**getUniCurrencyPair**](docs/MarginUniApi.md#getUniCurrencyPair) | **GET** /margin/uni/currency_pairs/{currency_pair} | Get detail of lending market *MarginUniApi* | [**getMarginUniEstimateRate**](docs/MarginUniApi.md#getMarginUniEstimateRate) | **GET** /margin/uni/estimate_rate | Estimate interest Rate @@ -234,7 +234,7 @@ Class | Method | HTTP request | Description *MultiCollateralLoanApi* | [**listMultiCollateralCurrencies**](docs/MultiCollateralLoanApi.md#listMultiCollateralCurrencies) | **GET** /loan/multi_collateral/currencies | Query supported borrowing and collateral currencies in Multi-Collateral *MultiCollateralLoanApi* | [**getMultiCollateralLtv**](docs/MultiCollateralLoanApi.md#getMultiCollateralLtv) | **GET** /loan/multi_collateral/ltv | Get Multi-Collateral ratio *MultiCollateralLoanApi* | [**getMultiCollateralFixRate**](docs/MultiCollateralLoanApi.md#getMultiCollateralFixRate) | **GET** /loan/multi_collateral/fixed_rate | Query fixed interest rates for the currency for 7 days and 30 days -*MultiCollateralLoanApi* | [**getMultiCollateralCurrentRate**](docs/MultiCollateralLoanApi.md#getMultiCollateralCurrentRate) | **GET** /loan/multi_collateral/current_rate | 查询币种活期利率 +*MultiCollateralLoanApi* | [**getMultiCollateralCurrentRate**](docs/MultiCollateralLoanApi.md#getMultiCollateralCurrentRate) | **GET** /loan/multi_collateral/current_rate | Query the current interest rate of the currency *OptionsApi* | [**listOptionsUnderlyings**](docs/OptionsApi.md#listOptionsUnderlyings) | **GET** /options/underlyings | List all underlyings *OptionsApi* | [**listOptionsExpirations**](docs/OptionsApi.md#listOptionsExpirations) | **GET** /options/expirations | List all expiration times *OptionsApi* | [**listOptionsContracts**](docs/OptionsApi.md#listOptionsContracts) | **GET** /options/contracts | List all the contracts with specified underlying and expiration time @@ -260,18 +260,18 @@ Class | Method | HTTP request | Description *OptionsApi* | [**cancelOptionsOrder**](docs/OptionsApi.md#cancelOptionsOrder) | **DELETE** /options/orders/{order_id} | Cancel a single order *OptionsApi* | [**countdownCancelAllOptions**](docs/OptionsApi.md#countdownCancelAllOptions) | **POST** /options/countdown_cancel_all | Countdown cancel orders *OptionsApi* | [**listMyOptionsTrades**](docs/OptionsApi.md#listMyOptionsTrades) | **GET** /options/my_trades | List personal trading history -*OptionsApi* | [**getOptionsMMP**](docs/OptionsApi.md#getOptionsMMP) | **GET** /options/mmp | MMP查询 -*OptionsApi* | [**setOptionsMMP**](docs/OptionsApi.md#setOptionsMMP) | **POST** /options/mmp | MMP设置 -*OptionsApi* | [**resetOptionsMMP**](docs/OptionsApi.md#resetOptionsMMP) | **POST** /options/mmp/reset | MMP重置 +*OptionsApi* | [**getOptionsMMP**](docs/OptionsApi.md#getOptionsMMP) | **GET** /options/mmp | MMP Query +*OptionsApi* | [**setOptionsMMP**](docs/OptionsApi.md#setOptionsMMP) | **POST** /options/mmp | MMP Settings +*OptionsApi* | [**resetOptionsMMP**](docs/OptionsApi.md#resetOptionsMMP) | **POST** /options/mmp/reset | MMP Reset *RebateApi* | [**agencyTransactionHistory**](docs/RebateApi.md#agencyTransactionHistory) | **GET** /rebate/agency/transaction_history | The agency obtains the transaction history of the recommended user *RebateApi* | [**agencyCommissionsHistory**](docs/RebateApi.md#agencyCommissionsHistory) | **GET** /rebate/agency/commission_history | The agency obtains the commission history of the recommended user -*RebateApi* | [**partnerTransactionHistory**](docs/RebateApi.md#partnerTransactionHistory) | **GET** /rebate/partner/transaction_history | 合伙人获取推荐用户的交易记录 -*RebateApi* | [**partnerCommissionsHistory**](docs/RebateApi.md#partnerCommissionsHistory) | **GET** /rebate/partner/commission_history | 合伙人获取推荐用户的返佣记录 -*RebateApi* | [**partnerSubList**](docs/RebateApi.md#partnerSubList) | **GET** /rebate/partner/sub_list | 合伙人下级列表 +*RebateApi* | [**partnerTransactionHistory**](docs/RebateApi.md#partnerTransactionHistory) | **GET** /rebate/partner/transaction_history | Partner obtains transaction records of recommended users +*RebateApi* | [**partnerCommissionsHistory**](docs/RebateApi.md#partnerCommissionsHistory) | **GET** /rebate/partner/commission_history | Partner obtains commission records of recommended users +*RebateApi* | [**partnerSubList**](docs/RebateApi.md#partnerSubList) | **GET** /rebate/partner/sub_list | Partner subordinate list *RebateApi* | [**rebateBrokerCommissionHistory**](docs/RebateApi.md#rebateBrokerCommissionHistory) | **GET** /rebate/broker/commission_history | The broker obtains the user\'s commission rebate records *RebateApi* | [**rebateBrokerTransactionHistory**](docs/RebateApi.md#rebateBrokerTransactionHistory) | **GET** /rebate/broker/transaction_history | The broker obtains the user\'s trading history -*RebateApi* | [**rebateUserInfo**](docs/RebateApi.md#rebateUserInfo) | **GET** /rebate/user/info | 用户获取返佣信息 -*RebateApi* | [**userSubRelation**](docs/RebateApi.md#userSubRelation) | **GET** /rebate/user/sub_relation | 用户下级关系 +*RebateApi* | [**rebateUserInfo**](docs/RebateApi.md#rebateUserInfo) | **GET** /rebate/user/info | User retrieves rebate information +*RebateApi* | [**userSubRelation**](docs/RebateApi.md#userSubRelation) | **GET** /rebate/user/sub_relation | User-subordinate relationship *SpotApi* | [**listCurrencies**](docs/SpotApi.md#listCurrencies) | **GET** /spot/currencies | List all currencies\' details *SpotApi* | [**getCurrency**](docs/SpotApi.md#getCurrency) | **GET** /spot/currencies/{currency} | Get details of a specific currency *SpotApi* | [**listCurrencyPairs**](docs/SpotApi.md#listCurrencyPairs) | **GET** /spot/currency_pairs | List all currency pairs supported @@ -298,7 +298,7 @@ Class | Method | HTTP request | Description *SpotApi* | [**getSystemTime**](docs/SpotApi.md#getSystemTime) | **GET** /spot/time | Get server current time *SpotApi* | [**countdownCancelAllSpot**](docs/SpotApi.md#countdownCancelAllSpot) | **POST** /spot/countdown_cancel_all | Countdown cancel orders *SpotApi* | [**amendBatchOrders**](docs/SpotApi.md#amendBatchOrders) | **POST** /spot/amend_batch_orders | Batch modification of orders -*SpotApi* | [**getSpotInsuranceHistory**](docs/SpotApi.md#getSpotInsuranceHistory) | **GET** /spot/insurance_history | 查询现货保险基金历史数据 +*SpotApi* | [**getSpotInsuranceHistory**](docs/SpotApi.md#getSpotInsuranceHistory) | **GET** /spot/insurance_history | Query spot insurance fund historical data *SpotApi* | [**listSpotPriceTriggeredOrders**](docs/SpotApi.md#listSpotPriceTriggeredOrders) | **GET** /spot/price_orders | Retrieve running auto order list *SpotApi* | [**createSpotPriceTriggeredOrder**](docs/SpotApi.md#createSpotPriceTriggeredOrder) | **POST** /spot/price_orders | Create a price-triggered order *SpotApi* | [**cancelSpotPriceTriggeredOrderList**](docs/SpotApi.md#cancelSpotPriceTriggeredOrderList) | **DELETE** /spot/price_orders | Cancel all open orders @@ -314,7 +314,7 @@ Class | Method | HTTP request | Description *SubAccountApi* | [**deleteSubAccountKeys**](docs/SubAccountApi.md#deleteSubAccountKeys) | **DELETE** /sub_accounts/{user_id}/keys/{key} | Delete API key of the sub-account *SubAccountApi* | [**lockSubAccount**](docs/SubAccountApi.md#lockSubAccount) | **POST** /sub_accounts/{user_id}/lock | Lock the sub-account *SubAccountApi* | [**unlockSubAccount**](docs/SubAccountApi.md#unlockSubAccount) | **POST** /sub_accounts/{user_id}/unlock | Unlock the sub-account -*SubAccountApi* | [**listUnifiedMode**](docs/SubAccountApi.md#listUnifiedMode) | **GET** /sub_accounts/unified_mode | 获取子帐号模式 +*SubAccountApi* | [**listUnifiedMode**](docs/SubAccountApi.md#listUnifiedMode) | **GET** /sub_accounts/unified_mode | Get sub-account mode *UnifiedApi* | [**listUnifiedAccounts**](docs/UnifiedApi.md#listUnifiedAccounts) | **GET** /unified/accounts | Get unified account information *UnifiedApi* | [**getUnifiedBorrowable**](docs/UnifiedApi.md#getUnifiedBorrowable) | **GET** /unified/borrowable | Query about the maximum borrowing for the unified account *UnifiedApi* | [**getUnifiedTransferable**](docs/UnifiedApi.md#getUnifiedTransferable) | **GET** /unified/transferable | Query about the maximum transferable for the unified account @@ -322,17 +322,17 @@ Class | Method | HTTP request | Description *UnifiedApi* | [**createUnifiedLoan**](docs/UnifiedApi.md#createUnifiedLoan) | **POST** /unified/loans | Borrow or repay *UnifiedApi* | [**listUnifiedLoanRecords**](docs/UnifiedApi.md#listUnifiedLoanRecords) | **GET** /unified/loan_records | Get load records *UnifiedApi* | [**listUnifiedLoanInterestRecords**](docs/UnifiedApi.md#listUnifiedLoanInterestRecords) | **GET** /unified/interest_records | List interest records -*UnifiedApi* | [**getUnifiedRiskUnits**](docs/UnifiedApi.md#getUnifiedRiskUnits) | **GET** /unified/risk_units | 获取用户风险单元详情,仅在组合保证金模式有效 +*UnifiedApi* | [**getUnifiedRiskUnits**](docs/UnifiedApi.md#getUnifiedRiskUnits) | **GET** /unified/risk_units | Get user risk unit details *UnifiedApi* | [**getUnifiedMode**](docs/UnifiedApi.md#getUnifiedMode) | **GET** /unified/unified_mode | Query mode of the unified account *UnifiedApi* | [**setUnifiedMode**](docs/UnifiedApi.md#setUnifiedMode) | **PUT** /unified/unified_mode | Set mode of the unified account *UnifiedApi* | [**getUnifiedEstimateRate**](docs/UnifiedApi.md#getUnifiedEstimateRate) | **GET** /unified/estimate_rate | Get unified estimate rate -*UnifiedApi* | [**listCurrencyDiscountTiers**](docs/UnifiedApi.md#listCurrencyDiscountTiers) | **GET** /unified/currency_discount_tiers | list currency discount tiers -*UnifiedApi* | [**listLoanMarginTiers**](docs/UnifiedApi.md#listLoanMarginTiers) | **GET** /unified/loan_margin_tiers | 查询统一账户借贷梯度保证金 -*UnifiedApi* | [**calculatePortfolioMargin**](docs/UnifiedApi.md#calculatePortfolioMargin) | **POST** /unified/portfolio_calculator | 组合保证金计算器计算 -*UnifiedApi* | [**getUserLeverageCurrencyConfig**](docs/UnifiedApi.md#getUserLeverageCurrencyConfig) | **GET** /unified/leverage/user_currency_config | 用户最大、最小可设置币种杠杆倍数 -*UnifiedApi* | [**getUserLeverageCurrencySetting**](docs/UnifiedApi.md#getUserLeverageCurrencySetting) | **GET** /unified/leverage/user_currency_setting | 获取用户币种杠杆倍数,currency不传则查询全部币种 -*UnifiedApi* | [**setUserLeverageCurrencySetting**](docs/UnifiedApi.md#setUserLeverageCurrencySetting) | **POST** /unified/leverage/user_currency_setting | 设置借贷币种杠杆倍数 -*UnifiedApi* | [**getHistoryLoanRate**](docs/UnifiedApi.md#getHistoryLoanRate) | **GET** /unified/history_loan_rate | 获取历史借币利率 +*UnifiedApi* | [**listCurrencyDiscountTiers**](docs/UnifiedApi.md#listCurrencyDiscountTiers) | **GET** /unified/currency_discount_tiers | List currency discount tiers +*UnifiedApi* | [**listLoanMarginTiers**](docs/UnifiedApi.md#listLoanMarginTiers) | **GET** /unified/loan_margin_tiers | List loan margin tiers +*UnifiedApi* | [**calculatePortfolioMargin**](docs/UnifiedApi.md#calculatePortfolioMargin) | **POST** /unified/portfolio_calculator | Portfolio margin calculator +*UnifiedApi* | [**getUserLeverageCurrencyConfig**](docs/UnifiedApi.md#getUserLeverageCurrencyConfig) | **GET** /unified/leverage/user_currency_config | Minimum currency leverage that can be set +*UnifiedApi* | [**getUserLeverageCurrencySetting**](docs/UnifiedApi.md#getUserLeverageCurrencySetting) | **GET** /unified/leverage/user_currency_setting | Get the leverage multiple of the user currency +*UnifiedApi* | [**setUserLeverageCurrencySetting**](docs/UnifiedApi.md#setUserLeverageCurrencySetting) | **POST** /unified/leverage/user_currency_setting | Set the loan currency leverage +*UnifiedApi* | [**getHistoryLoanRate**](docs/UnifiedApi.md#getHistoryLoanRate) | **GET** /unified/history_loan_rate | get historical lending rates *WalletApi* | [**listCurrencyChains**](docs/WalletApi.md#listCurrencyChains) | **GET** /wallet/currency_chains | List chains supported for specified currency *WalletApi* | [**getDepositAddress**](docs/WalletApi.md#getDepositAddress) | **GET** /wallet/deposit_address | Generate currency deposit address *WalletApi* | [**listWithdrawals**](docs/WalletApi.md#listWithdrawals) | **GET** /wallet/withdrawals | Retrieve withdrawal records @@ -341,7 +341,7 @@ Class | Method | HTTP request | Description *WalletApi* | [**listSubAccountTransfers**](docs/WalletApi.md#listSubAccountTransfers) | **GET** /wallet/sub_account_transfers | Retrieve transfer records between main and sub accounts *WalletApi* | [**transferWithSubAccount**](docs/WalletApi.md#transferWithSubAccount) | **POST** /wallet/sub_account_transfers | Transfer between main and sub accounts *WalletApi* | [**subAccountToSubAccount**](docs/WalletApi.md#subAccountToSubAccount) | **POST** /wallet/sub_account_to_sub_account | Sub-account transfers to sub-account -*WalletApi* | [**getTransferOrderStatus**](docs/WalletApi.md#getTransferOrderStatus) | **GET** /wallet/order_status | 划转状态查询 +*WalletApi* | [**getTransferOrderStatus**](docs/WalletApi.md#getTransferOrderStatus) | **GET** /wallet/order_status | Transfer status query *WalletApi* | [**listWithdrawStatus**](docs/WalletApi.md#listWithdrawStatus) | **GET** /wallet/withdraw_status | Retrieve withdrawal status *WalletApi* | [**listSubAccountBalances**](docs/WalletApi.md#listSubAccountBalances) | **GET** /wallet/sub_account_balances | Retrieve sub account balances *WalletApi* | [**listSubAccountMarginBalances**](docs/WalletApi.md#listSubAccountMarginBalances) | **GET** /wallet/sub_account_margin_balances | Query sub accounts\' margin balances @@ -353,9 +353,9 @@ Class | Method | HTTP request | Description *WalletApi* | [**listSmallBalance**](docs/WalletApi.md#listSmallBalance) | **GET** /wallet/small_balance | List small balance *WalletApi* | [**convertSmallBalance**](docs/WalletApi.md#convertSmallBalance) | **POST** /wallet/small_balance | Convert small balance *WalletApi* | [**listSmallBalanceHistory**](docs/WalletApi.md#listSmallBalanceHistory) | **GET** /wallet/small_balance_history | List small balance history -*WalletApi* | [**listPushOrders**](docs/WalletApi.md#listPushOrders) | **GET** /wallet/push | 获取UID转帐历史纪录 +*WalletApi* | [**listPushOrders**](docs/WalletApi.md#listPushOrders) | **GET** /wallet/push | Retrieve the UID transfer history *WithdrawalApi* | [**withdraw**](docs/WithdrawalApi.md#withdraw) | **POST** /withdrawals | Withdraw -*WithdrawalApi* | [**withdrawPushOrder**](docs/WithdrawalApi.md#withdrawPushOrder) | **POST** /withdrawals/push | UID 转帐 +*WithdrawalApi* | [**withdrawPushOrder**](docs/WithdrawalApi.md#withdrawPushOrder) | **POST** /withdrawals/push | UID transfer *WithdrawalApi* | [**cancelWithdrawal**](docs/WithdrawalApi.md#cancelWithdrawal) | **DELETE** /withdrawals/{withdrawal_id} | Cancel withdrawal with specified ID @@ -416,6 +416,7 @@ Class | Method | HTTP request | Description - [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) @@ -453,10 +454,6 @@ Class | Method | HTTP request | Description - [FuturesTicker](docs/FuturesTicker.md) - [FuturesTrade](docs/FuturesTrade.md) - [IndexConstituent](docs/IndexConstituent.md) - - [InlineObject](docs/InlineObject.md) - - [InlineObject1](docs/InlineObject1.md) - - [InlineResponse200](docs/InlineResponse200.md) - - [InlineResponse2001](docs/InlineResponse2001.md) - [InsuranceRecord](docs/InsuranceRecord.md) - [LedgerRecord](docs/LedgerRecord.md) - [LiquidateOrder](docs/LiquidateOrder.md) @@ -562,6 +559,7 @@ Class | Method | HTTP request | Description - [TradeFee](docs/TradeFee.md) - [TransactionID](docs/TransactionID.md) - [Transfer](docs/Transfer.md) + - [TransferOrderStatus](docs/TransferOrderStatus.md) - [TriggerOrderResponse](docs/TriggerOrderResponse.md) - [TriggerTime](docs/TriggerTime.md) - [UidPushOrder](docs/UidPushOrder.md) diff --git a/api/accountApi.ts b/api/accountApi.ts index b9d3f0f..52bf8d8 100644 --- a/api/accountApi.ts +++ b/api/accountApi.ts @@ -9,11 +9,11 @@ * Do not edit the class manually. */ + /* tslint:disable:no-unused-locals */ import { AccountDetail } from '../model/accountDetail'; import { AccountRateLimit } from '../model/accountRateLimit'; -import { InlineObject1 } from '../model/inlineObject1'; -import { InlineResponse2001 } from '../model/inlineResponse2001'; +import { DebitFee } from '../model/debitFee'; import { StpGroup } from '../model/stpGroup'; import { StpGroupUser } from '../model/stpGroupUser'; import { ObjectSerializer } from '../model/models'; @@ -36,13 +36,13 @@ export class AccountApi { } /** - * + * * @summary Get account detail */ - public async getAccountDetail(): Promise<{ response: AxiosResponse; body: AccountDetail }> { + public async getAccountDetail() : Promise<{ response: AxiosResponse; body: AccountDetail; }> { const localVarPath = this.client.basePath + '/account/detail'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -51,6 +51,7 @@ export class AccountApi { localVarHeaderParams.Accept = produces.join(','); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -59,17 +60,17 @@ export class AccountApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'AccountDetail', authSettings); + return this.client.request(config, "AccountDetail", authSettings); } /** - * - * @summary 获取用户成交比率限频信息 + * + * @summary Get user transaction rate limit information */ - public async getAccountRateLimit(): Promise<{ response: AxiosResponse; body: Array }> { + public async getAccountRateLimit() : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/account/rate_limit'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -78,6 +79,7 @@ export class AccountApi { localVarHeaderParams.Accept = produces.join(','); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -86,7 +88,7 @@ export class AccountApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** @@ -95,10 +97,10 @@ export class AccountApi { * @param opts Optional parameters * @param opts.name Perform a fuzzy search based on the name */ - public async listSTPGroups(opts: { name?: string }): Promise<{ response: AxiosResponse; body: Array }> { + public async listSTPGroups(opts: { name?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/account/stp_groups'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -109,9 +111,10 @@ export class AccountApi { opts = opts || {}; if (opts.name !== undefined) { - localVarQueryParameters['name'] = ObjectSerializer.serialize(opts.name, 'string'); + localVarQueryParameters['name'] = ObjectSerializer.serialize(opts.name, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -120,18 +123,18 @@ export class AccountApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** * Only the main account is allowed to create a new STP user group * @summary Create STP Group - * @param stpGroup + * @param stpGroup */ - public async createSTPGroup(stpGroup: StpGroup): Promise<{ response: AxiosResponse; body: StpGroup }> { + public async createSTPGroup(stpGroup: StpGroup) : Promise<{ response: AxiosResponse; body: StpGroup; }> { const localVarPath = this.client.basePath + '/account/stp_groups'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -145,16 +148,17 @@ export class AccountApi { throw new Error('Required parameter stpGroup was null or undefined when calling createSTPGroup.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(stpGroup, 'StpGroup'), + data: ObjectSerializer.serialize(stpGroup, "StpGroup") }; const authSettings = ['apiv4']; - return this.client.request(config, 'StpGroup', authSettings); + return this.client.request(config, "StpGroup", authSettings); } /** @@ -162,12 +166,11 @@ export class AccountApi { * @summary List users of the STP group * @param stpId STP Group ID */ - public async listSTPGroupsUsers(stpId: number): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/account/stp_groups/{stp_id}/users'.replace('{' + 'stp_id' + '}', encodeURIComponent(String(stpId))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listSTPGroupsUsers(stpId: number) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/account/stp_groups/{stp_id}/users' + .replace('{' + 'stp_id' + '}', encodeURIComponent(String(stpId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -181,6 +184,7 @@ export class AccountApi { throw new Error('Required parameter stpId was null or undefined when calling listSTPGroupsUsers.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -189,7 +193,7 @@ export class AccountApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** @@ -198,15 +202,11 @@ export class AccountApi { * @param stpId STP Group ID * @param requestBody User ID */ - public async addSTPGroupUsers( - stpId: number, - requestBody: Array, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/account/stp_groups/{stp_id}/users'.replace('{' + 'stp_id' + '}', encodeURIComponent(String(stpId))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async addSTPGroupUsers(stpId: number, requestBody: Array) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/account/stp_groups/{stp_id}/users' + .replace('{' + 'stp_id' + '}', encodeURIComponent(String(stpId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -225,16 +225,17 @@ export class AccountApi { throw new Error('Required parameter requestBody was null or undefined when calling addSTPGroupUsers.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(requestBody, 'Array'), + data: ObjectSerializer.serialize(requestBody, "Array") }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** @@ -243,15 +244,11 @@ export class AccountApi { * @param stpId STP Group ID * @param userId STP user ID, multiple can be separated by commas */ - public async deleteSTPGroupUsers( - stpId: number, - userId: number, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/account/stp_groups/{stp_id}/users'.replace('{' + 'stp_id' + '}', encodeURIComponent(String(stpId))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async deleteSTPGroupUsers(stpId: number, userId: number) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/account/stp_groups/{stp_id}/users' + .replace('{' + 'stp_id' + '}', encodeURIComponent(String(stpId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -270,7 +267,8 @@ export class AccountApi { throw new Error('Required parameter userId was null or undefined when calling deleteSTPGroupUsers.'); } - localVarQueryParameters['user_id'] = ObjectSerializer.serialize(userId, 'number'); + localVarQueryParameters['user_id'] = ObjectSerializer.serialize(userId, "number"); + const config: AxiosRequestConfig = { method: 'DELETE', @@ -280,17 +278,17 @@ export class AccountApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * 查询当前帐户的GT抵扣配置 - * @summary 查询GT抵扣配置 + * Query the current GT deduction configuration for the account. + * @summary Query GT deduction configuration. */ - public async getDebitFee(): Promise<{ response: AxiosResponse; body: InlineResponse2001 }> { + public async getDebitFee() : Promise<{ response: AxiosResponse; body: DebitFee; }> { const localVarPath = this.client.basePath + '/account/debit_fee'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -299,6 +297,7 @@ export class AccountApi { localVarHeaderParams.Accept = produces.join(','); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -307,33 +306,34 @@ export class AccountApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'InlineResponse2001', authSettings); + return this.client.request(config, "DebitFee", authSettings); } /** - * 开启或关闭当前帐户的GT抵扣 - * @summary 设定GT抵扣 - * @param inlineObject1 + * Enable or disable GT deduction for the current account. + * @summary Set GT deduction. + * @param debitFee */ - public async setDebitFee(inlineObject1: InlineObject1): Promise<{ response: AxiosResponse; body?: any }> { + public async setDebitFee(debitFee: DebitFee) : Promise<{ response: AxiosResponse; body?: any; }> { const localVarPath = this.client.basePath + '/account/debit_fee'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); - // verify required parameter 'inlineObject1' is not null or undefined - if (inlineObject1 === null || inlineObject1 === undefined) { - throw new Error('Required parameter inlineObject1 was null or undefined when calling setDebitFee.'); + // verify required parameter 'debitFee' is not null or undefined + if (debitFee === null || debitFee === undefined) { + throw new Error('Required parameter debitFee was null or undefined when calling setDebitFee.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(inlineObject1, 'InlineObject1'), + data: ObjectSerializer.serialize(debitFee, "DebitFee") }; const authSettings = ['apiv4']; - return this.client.request(config, '', authSettings); + return this.client.request(config, "", authSettings); } } diff --git a/api/apiClient.ts b/api/apiClient.ts index b9917d3..6d16dbb 100644 --- a/api/apiClient.ts +++ b/api/apiClient.ts @@ -9,24 +9,35 @@ * Do not edit the class manually. */ + /* eslint-disable @typescript-eslint/no-floating-promises */ -import { Authentication, GateApiV4Auth, HttpBasicAuth, HttpBearerAuth, OAuth, ObjectSerializer } from '../model/models'; +import { + Authentication, + GateApiV4Auth, + HttpBasicAuth, + HttpBearerAuth, + OAuth, + ObjectSerializer +} from "../model/models"; -import JSONBig from 'json-bigint'; +import JSONBig from 'json-bigint'; import globalAxios, { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios'; + export class ApiClient { - protected _basePath = 'https://api.gateio.ws/api/v4'; + + protected _basePath: string = 'https://api.gateio.ws/api/v4'; protected _defaultHeaders: any = {}; protected authentications: { [key: string]: Authentication } = { - apiv4: new GateApiV4Auth(), - }; + 'apiv4': new GateApiV4Auth(), + } constructor(basePath?: string, protected axiosInstance: AxiosInstance = globalAxios) { this._basePath = basePath || this._basePath; + this.axiosInstance.defaults.transformResponse = [ (data) => { try { @@ -35,7 +46,7 @@ export class ApiClient { console.error('Failed to parse JSON:', error); return data; } - }, + } ]; } @@ -56,14 +67,14 @@ export class ApiClient { } public setApiKeySecret(key: string, secret: string) { - const auth = this.authentications['apiv4'] as GateApiV4Auth; + let auth = this.authentications['apiv4'] as GateApiV4Auth; auth.key = key; auth.secret = secret; } public applyToRequest(config: AxiosRequestConfig, authSettings: Array): AxiosRequestConfig { - for (const auth of authSettings) { - const authenticator = this.authentications[auth]; + for (let auth of authSettings) { + let authenticator = this.authentications[auth]; if (authenticator) { config = authenticator.applyToRequest(config); } @@ -71,21 +82,15 @@ export class ApiClient { return config; } - public async request( - config: AxiosRequestConfig, - responseType: string, - authSettings: Array, - ): Promise<{ response: AxiosResponse; body: T }> { - return Promise.resolve(config) - .then((c) => this.applyToRequest(c, authSettings)) - .then((c) => { - return this.axiosInstance.request(c).then((rsp) => { - let body = rsp.data; - if (responseType.length > 0) { - body = ObjectSerializer.deserialize(rsp.data, responseType); - } - return { response: rsp, body: body }; - }); + public async request(config: AxiosRequestConfig, responseType: string, authSettings: Array): Promise<{ response: AxiosResponse; body: T; }> { + return Promise.resolve(config).then(c => this.applyToRequest(c, authSettings)).then(c => { + return this.axiosInstance.request(c).then(rsp => { + let body = rsp.data; + if (responseType.length > 0) { + body = ObjectSerializer.deserialize(rsp.data, responseType); + } + return { response: rsp, body: body }; }); + }); } } diff --git a/api/apis.ts b/api/apis.ts index d14bb96..638cfa0 100644 --- a/api/apis.ts +++ b/api/apis.ts @@ -1,4 +1,4 @@ -export * from './apiClient'; +export * from "./apiClient"; export * from './accountApi'; import { AccountApi } from './accountApi'; export * from './collateralLoanApi'; @@ -34,22 +34,4 @@ import { WalletApi } from './walletApi'; export * from './withdrawalApi'; import { WithdrawalApi } from './withdrawalApi'; -export const APIS = [ - AccountApi, - CollateralLoanApi, - DeliveryApi, - EarnApi, - EarnUniApi, - FlashSwapApi, - FuturesApi, - MarginApi, - MarginUniApi, - MultiCollateralLoanApi, - OptionsApi, - RebateApi, - SpotApi, - SubAccountApi, - UnifiedApi, - WalletApi, - WithdrawalApi, -]; +export const APIS = [AccountApi, CollateralLoanApi, DeliveryApi, EarnApi, EarnUniApi, FlashSwapApi, FuturesApi, MarginApi, MarginUniApi, MultiCollateralLoanApi, OptionsApi, RebateApi, SpotApi, SubAccountApi, UnifiedApi, WalletApi, WithdrawalApi]; diff --git a/api/collateralLoanApi.ts b/api/collateralLoanApi.ts index 7d63e31..814e7b8 100644 --- a/api/collateralLoanApi.ts +++ b/api/collateralLoanApi.ts @@ -9,6 +9,7 @@ * Do not edit the class manually. */ + /* tslint:disable:no-unused-locals */ import { CollateralAlign } from '../model/collateralAlign'; import { CollateralLoanCurrency } from '../model/collateralLoanCurrency'; @@ -41,7 +42,7 @@ export class CollateralLoanApi { } /** - * + * * @summary List Orders * @param opts Optional parameters * @param opts.page Page number @@ -49,15 +50,10 @@ export class CollateralLoanApi { * @param opts.collateralCurrency Collateral * @param opts.borrowCurrency Borrowed currency */ - public async listCollateralLoanOrders(opts: { - page?: number; - limit?: number; - collateralCurrency?: string; - borrowCurrency?: string; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listCollateralLoanOrders(opts: { page?: number, limit?: number, collateralCurrency?: string, borrowCurrency?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/loan/collateral/orders'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -68,24 +64,22 @@ export class CollateralLoanApi { opts = opts || {}; if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.collateralCurrency !== undefined) { - localVarQueryParameters['collateral_currency'] = ObjectSerializer.serialize( - opts.collateralCurrency, - 'string', - ); + localVarQueryParameters['collateral_currency'] = ObjectSerializer.serialize(opts.collateralCurrency, "string"); } if (opts.borrowCurrency !== undefined) { - localVarQueryParameters['borrow_currency'] = ObjectSerializer.serialize(opts.borrowCurrency, 'string'); + localVarQueryParameters['borrow_currency'] = ObjectSerializer.serialize(opts.borrowCurrency, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -94,20 +88,18 @@ export class CollateralLoanApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Place order - * @param createCollateralOrder + * @param createCollateralOrder */ - public async createCollateralLoan( - createCollateralOrder: CreateCollateralOrder, - ): Promise<{ response: AxiosResponse; body: OrderResp }> { + public async createCollateralLoan(createCollateralOrder: CreateCollateralOrder) : Promise<{ response: AxiosResponse; body: OrderResp; }> { const localVarPath = this.client.basePath + '/loan/collateral/orders'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -118,36 +110,32 @@ export class CollateralLoanApi { // verify required parameter 'createCollateralOrder' is not null or undefined if (createCollateralOrder === null || createCollateralOrder === undefined) { - throw new Error( - 'Required parameter createCollateralOrder was null or undefined when calling createCollateralLoan.', - ); + throw new Error('Required parameter createCollateralOrder was null or undefined when calling createCollateralLoan.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(createCollateralOrder, 'CreateCollateralOrder'), + data: ObjectSerializer.serialize(createCollateralOrder, "CreateCollateralOrder") }; const authSettings = ['apiv4']; - return this.client.request(config, 'OrderResp', authSettings); + return this.client.request(config, "OrderResp", authSettings); } /** - * + * * @summary Get a single order * @param orderId Order ID returned on successful order creation */ - public async getCollateralLoanOrderDetail( - orderId: number, - ): Promise<{ response: AxiosResponse; body: CollateralOrder }> { - const localVarPath = - this.client.basePath + - '/loan/collateral/orders/{order_id}'.replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getCollateralLoanOrderDetail(orderId: number) : Promise<{ response: AxiosResponse; body: CollateralOrder; }> { + const localVarPath = this.client.basePath + '/loan/collateral/orders/{order_id}' + .replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -158,11 +146,10 @@ export class CollateralLoanApi { // verify required parameter 'orderId' is not null or undefined if (orderId === null || orderId === undefined) { - throw new Error( - 'Required parameter orderId was null or undefined when calling getCollateralLoanOrderDetail.', - ); + throw new Error('Required parameter orderId was null or undefined when calling getCollateralLoanOrderDetail.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -171,18 +158,18 @@ export class CollateralLoanApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'CollateralOrder', authSettings); + return this.client.request(config, "CollateralOrder", authSettings); } /** - * + * * @summary Repayment - * @param repayLoan + * @param repayLoan */ - public async repayCollateralLoan(repayLoan: RepayLoan): Promise<{ response: AxiosResponse; body: RepayResp }> { + public async repayCollateralLoan(repayLoan: RepayLoan) : Promise<{ response: AxiosResponse; body: RepayResp; }> { const localVarPath = this.client.basePath + '/loan/collateral/repay'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -196,20 +183,21 @@ export class CollateralLoanApi { throw new Error('Required parameter repayLoan was null or undefined when calling repayCollateralLoan.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(repayLoan, 'RepayLoan'), + data: ObjectSerializer.serialize(repayLoan, "RepayLoan") }; const authSettings = ['apiv4']; - return this.client.request(config, 'RepayResp', authSettings); + return this.client.request(config, "RepayResp", authSettings); } /** - * + * * @summary Repayment history * @param source Operation type: repay - Regular repayment, liquidate - Liquidation * @param opts Optional parameters @@ -220,20 +208,10 @@ export class CollateralLoanApi { * @param opts.from Start timestamp of the query * @param opts.to Time range ending, default to current time */ - public async listRepayRecords( - source: string, - opts: { - borrowCurrency?: string; - collateralCurrency?: string; - page?: number; - limit?: number; - from?: number; - to?: number; - }, - ): Promise<{ response: AxiosResponse; body: Array }> { + public async listRepayRecords(source: string, opts: { borrowCurrency?: string, collateralCurrency?: string, page?: number, limit?: number, from?: number, to?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/loan/collateral/repay_records'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -248,35 +226,33 @@ export class CollateralLoanApi { } opts = opts || {}; - localVarQueryParameters['source'] = ObjectSerializer.serialize(source, 'string'); + localVarQueryParameters['source'] = ObjectSerializer.serialize(source, "string"); if (opts.borrowCurrency !== undefined) { - localVarQueryParameters['borrow_currency'] = ObjectSerializer.serialize(opts.borrowCurrency, 'string'); + localVarQueryParameters['borrow_currency'] = ObjectSerializer.serialize(opts.borrowCurrency, "string"); } if (opts.collateralCurrency !== undefined) { - localVarQueryParameters['collateral_currency'] = ObjectSerializer.serialize( - opts.collateralCurrency, - 'string', - ); + localVarQueryParameters['collateral_currency'] = ObjectSerializer.serialize(opts.collateralCurrency, "string"); } if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -285,11 +261,11 @@ export class CollateralLoanApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Query collateral adjustment records * @param opts Optional parameters * @param opts.page Page number @@ -299,17 +275,10 @@ export class CollateralLoanApi { * @param opts.borrowCurrency Borrowed currency * @param opts.collateralCurrency Collateral */ - public async listCollateralRecords(opts: { - page?: number; - limit?: number; - from?: number; - to?: number; - borrowCurrency?: string; - collateralCurrency?: string; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listCollateralRecords(opts: { page?: number, limit?: number, from?: number, to?: number, borrowCurrency?: string, collateralCurrency?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/loan/collateral/collaterals'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -320,32 +289,30 @@ export class CollateralLoanApi { opts = opts || {}; if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.borrowCurrency !== undefined) { - localVarQueryParameters['borrow_currency'] = ObjectSerializer.serialize(opts.borrowCurrency, 'string'); + localVarQueryParameters['borrow_currency'] = ObjectSerializer.serialize(opts.borrowCurrency, "string"); } if (opts.collateralCurrency !== undefined) { - localVarQueryParameters['collateral_currency'] = ObjectSerializer.serialize( - opts.collateralCurrency, - 'string', - ); + localVarQueryParameters['collateral_currency'] = ObjectSerializer.serialize(opts.collateralCurrency, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -354,44 +321,45 @@ export class CollateralLoanApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Increase or redeem collateral - * @param collateralAlign + * @param collateralAlign */ - public async operateCollateral(collateralAlign: CollateralAlign): Promise<{ response: AxiosResponse; body?: any }> { + public async operateCollateral(collateralAlign: CollateralAlign) : Promise<{ response: AxiosResponse; body?: any; }> { const localVarPath = this.client.basePath + '/loan/collateral/collaterals'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); // verify required parameter 'collateralAlign' is not null or undefined if (collateralAlign === null || collateralAlign === undefined) { throw new Error('Required parameter collateralAlign was null or undefined when calling operateCollateral.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(collateralAlign, 'CollateralAlign'), + data: ObjectSerializer.serialize(collateralAlign, "CollateralAlign") }; const authSettings = ['apiv4']; - return this.client.request(config, '', authSettings); + return this.client.request(config, "", authSettings); } /** - * + * * @summary Query the total borrowing and collateral amount for the user */ - public async getUserTotalAmount(): Promise<{ response: AxiosResponse; body: UserTotalAmount }> { + public async getUserTotalAmount() : Promise<{ response: AxiosResponse; body: UserTotalAmount; }> { const localVarPath = this.client.basePath + '/loan/collateral/total_amount'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -400,6 +368,7 @@ export class CollateralLoanApi { localVarHeaderParams.Accept = produces.join(','); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -408,22 +377,19 @@ export class CollateralLoanApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'UserTotalAmount', authSettings); + return this.client.request(config, "UserTotalAmount", authSettings); } /** - * + * * @summary Query user\'s collateralization ratio * @param collateralCurrency Collateral * @param borrowCurrency Borrowed currency */ - public async getUserLtvInfo( - collateralCurrency: string, - borrowCurrency: string, - ): Promise<{ response: AxiosResponse; body: UserLtvInfo }> { + public async getUserLtvInfo(collateralCurrency: string, borrowCurrency: string) : Promise<{ response: AxiosResponse; body: UserLtvInfo; }> { const localVarPath = this.client.basePath + '/loan/collateral/ltv'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -442,9 +408,10 @@ export class CollateralLoanApi { throw new Error('Required parameter borrowCurrency was null or undefined when calling getUserLtvInfo.'); } - localVarQueryParameters['collateral_currency'] = ObjectSerializer.serialize(collateralCurrency, 'string'); + localVarQueryParameters['collateral_currency'] = ObjectSerializer.serialize(collateralCurrency, "string"); + + localVarQueryParameters['borrow_currency'] = ObjectSerializer.serialize(borrowCurrency, "string"); - localVarQueryParameters['borrow_currency'] = ObjectSerializer.serialize(borrowCurrency, 'string'); const config: AxiosRequestConfig = { method: 'GET', @@ -454,21 +421,19 @@ export class CollateralLoanApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'UserLtvInfo', authSettings); + return this.client.request(config, "UserLtvInfo", authSettings); } /** - * + * * @summary Query supported borrowing and collateral currencies * @param opts Optional parameters * @param opts.loanCurrency 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. */ - public async listCollateralCurrencies(opts: { - loanCurrency?: string; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listCollateralCurrencies(opts: { loanCurrency?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/loan/collateral/currencies'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -479,9 +444,10 @@ export class CollateralLoanApi { opts = opts || {}; if (opts.loanCurrency !== undefined) { - localVarQueryParameters['loan_currency'] = ObjectSerializer.serialize(opts.loanCurrency, 'string'); + localVarQueryParameters['loan_currency'] = ObjectSerializer.serialize(opts.loanCurrency, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -490,10 +456,6 @@ export class CollateralLoanApi { }; const authSettings = []; - return this.client.request>( - config, - 'Array', - authSettings, - ); + return this.client.request>(config, "Array", authSettings); } } diff --git a/api/deliveryApi.ts b/api/deliveryApi.ts index 5828fde..9514044 100644 --- a/api/deliveryApi.ts +++ b/api/deliveryApi.ts @@ -9,6 +9,7 @@ * Do not edit the class manually. */ + /* tslint:disable:no-unused-locals */ import { DeliveryCandlestick } from '../model/deliveryCandlestick'; import { DeliveryContract } from '../model/deliveryContract'; @@ -47,18 +48,15 @@ export class DeliveryApi { } /** - * + * * @summary List all futures contracts * @param settle Settle currency */ - public async listDeliveryContracts( - settle: 'usdt', - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/delivery/{settle}/contracts'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listDeliveryContracts(settle: 'usdt') : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/delivery/{settle}/contracts' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -72,6 +70,7 @@ export class DeliveryApi { throw new Error('Required parameter settle was null or undefined when calling listDeliveryContracts.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -80,26 +79,21 @@ export class DeliveryApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Get a single contract * @param settle Settle currency * @param contract Futures contract */ - public async getDeliveryContract( - settle: 'usdt', - contract: string, - ): Promise<{ response: AxiosResponse; body: DeliveryContract }> { - const localVarPath = - this.client.basePath + - '/delivery/{settle}/contracts/{contract}' - .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) - .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getDeliveryContract(settle: 'usdt', contract: string) : Promise<{ response: AxiosResponse; body: DeliveryContract; }> { + const localVarPath = this.client.basePath + '/delivery/{settle}/contracts/{contract}' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) + .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -118,6 +112,7 @@ export class DeliveryApi { throw new Error('Required parameter contract was null or undefined when calling getDeliveryContract.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -126,7 +121,7 @@ export class DeliveryApi { }; const authSettings = []; - return this.client.request(config, 'DeliveryContract', authSettings); + return this.client.request(config, "DeliveryContract", authSettings); } /** @@ -139,16 +134,11 @@ export class DeliveryApi { * @param opts.limit Maximum number of order depth data in asks or bids * @param opts.withId Whether the order book update ID will be returned. This ID increases by 1 on every order book update */ - public async listDeliveryOrderBook( - settle: 'usdt', - contract: string, - opts: { interval?: '0' | '0.1' | '0.01'; limit?: number; withId?: boolean }, - ): Promise<{ response: AxiosResponse; body: FuturesOrderBook }> { - const localVarPath = - this.client.basePath + - '/delivery/{settle}/order_book'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listDeliveryOrderBook(settle: 'usdt', contract: string, opts: { interval?: '0' | '0.1' | '0.01', limit?: number, withId?: boolean, } ) : Promise<{ response: AxiosResponse; body: FuturesOrderBook; }> { + const localVarPath = this.client.basePath + '/delivery/{settle}/order_book' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -168,20 +158,21 @@ export class DeliveryApi { } opts = opts || {}; - localVarQueryParameters['contract'] = ObjectSerializer.serialize(contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(contract, "string"); if (opts.interval !== undefined) { localVarQueryParameters['interval'] = ObjectSerializer.serialize(opts.interval, "'0' | '0.1' | '0.01'"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.withId !== undefined) { - localVarQueryParameters['with_id'] = ObjectSerializer.serialize(opts.withId, 'boolean'); + localVarQueryParameters['with_id'] = ObjectSerializer.serialize(opts.withId, "boolean"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -190,30 +181,25 @@ export class DeliveryApi { }; const authSettings = []; - return this.client.request(config, 'FuturesOrderBook', authSettings); + return this.client.request(config, "FuturesOrderBook", authSettings); } /** - * + * * @summary Futures trading history * @param settle Settle currency * @param contract Futures contract * @param opts Optional parameters * @param opts.limit Maximum number of records to be returned in a single list * @param opts.lastId 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 opts.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 opts.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 opts.to Specify end time in Unix seconds, default to current time */ - public async listDeliveryTrades( - settle: 'usdt', - contract: string, - opts: { limit?: number; lastId?: string; from?: number; to?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/delivery/{settle}/trades'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listDeliveryTrades(settle: 'usdt', contract: string, opts: { limit?: number, lastId?: string, from?: number, to?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/delivery/{settle}/trades' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -233,24 +219,25 @@ export class DeliveryApi { } opts = opts || {}; - localVarQueryParameters['contract'] = ObjectSerializer.serialize(contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(contract, "string"); if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.lastId !== undefined) { - localVarQueryParameters['last_id'] = ObjectSerializer.serialize(opts.lastId, 'string'); + localVarQueryParameters['last_id'] = ObjectSerializer.serialize(opts.lastId, "string"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -259,7 +246,7 @@ export class DeliveryApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** @@ -273,37 +260,11 @@ export class DeliveryApi { * @param opts.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 opts.interval Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0 */ - public async listDeliveryCandlesticks( - settle: 'usdt', - contract: string, - opts: { - from?: number; - to?: number; - limit?: number; - interval?: - | '10s' - | '30s' - | '1m' - | '5m' - | '15m' - | '30m' - | '1h' - | '2h' - | '4h' - | '6h' - | '8h' - | '12h' - | '1d' - | '7d' - | '1w' - | '30d'; - }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/delivery/{settle}/candlesticks'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listDeliveryCandlesticks(settle: 'usdt', contract: string, opts: { from?: number, to?: number, limit?: number, interval?: '10s' | '30s' | '1m' | '5m' | '15m' | '30m' | '1h' | '2h' | '4h' | '6h' | '8h' | '12h' | '1d' | '7d' | '1w' | '30d', } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/delivery/{settle}/candlesticks' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -323,27 +284,25 @@ export class DeliveryApi { } opts = opts || {}; - localVarQueryParameters['contract'] = ObjectSerializer.serialize(contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(contract, "string"); if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.interval !== undefined) { - localVarQueryParameters['interval'] = ObjectSerializer.serialize( - opts.interval, - "'10s' | '30s' | '1m' | '5m' | '15m' | '30m' | '1h' | '2h' | '4h' | '6h' | '8h' | '12h' | '1d' | '7d' | '1w' | '30d'", - ); + localVarQueryParameters['interval'] = ObjectSerializer.serialize(opts.interval, "'10s' | '30s' | '1m' | '5m' | '15m' | '30m' | '1h' | '2h' | '4h' | '6h' | '8h' | '12h' | '1d' | '7d' | '1w' | '30d'"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -352,25 +311,21 @@ export class DeliveryApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary List futures tickers * @param settle Settle currency * @param opts Optional parameters * @param opts.contract Futures contract */ - public async listDeliveryTickers( - settle: 'usdt', - opts: { contract?: string }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/delivery/{settle}/tickers'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listDeliveryTickers(settle: 'usdt', opts: { contract?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/delivery/{settle}/tickers' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -386,9 +341,10 @@ export class DeliveryApi { opts = opts || {}; if (opts.contract !== undefined) { - localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -397,25 +353,21 @@ export class DeliveryApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Futures insurance balance history * @param settle Settle currency * @param opts Optional parameters * @param opts.limit Maximum number of records to be returned in a single list */ - public async listDeliveryInsuranceLedger( - settle: 'usdt', - opts: { limit?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/delivery/{settle}/insurance'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listDeliveryInsuranceLedger(settle: 'usdt', opts: { limit?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/delivery/{settle}/insurance' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -426,16 +378,15 @@ export class DeliveryApi { // verify required parameter 'settle' is not null or undefined if (settle === null || settle === undefined) { - throw new Error( - 'Required parameter settle was null or undefined when calling listDeliveryInsuranceLedger.', - ); + throw new Error('Required parameter settle was null or undefined when calling listDeliveryInsuranceLedger.'); } opts = opts || {}; if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -444,20 +395,19 @@ export class DeliveryApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Query futures account * @param settle Settle currency */ - public async listDeliveryAccounts(settle: 'usdt'): Promise<{ response: AxiosResponse; body: FuturesAccount }> { - const localVarPath = - this.client.basePath + - '/delivery/{settle}/accounts'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listDeliveryAccounts(settle: 'usdt') : Promise<{ response: AxiosResponse; body: FuturesAccount; }> { + const localVarPath = this.client.basePath + '/delivery/{settle}/accounts' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -471,6 +421,7 @@ export class DeliveryApi { throw new Error('Required parameter settle was null or undefined when calling listDeliveryAccounts.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -479,11 +430,11 @@ export class DeliveryApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'FuturesAccount', authSettings); + return this.client.request(config, "FuturesAccount", authSettings); } /** - * + * * @summary Query account book * @param settle Settle currency * @param opts Optional parameters @@ -492,20 +443,11 @@ export class DeliveryApi { * @param opts.to End timestamp * @param opts.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 */ - public async listDeliveryAccountBook( - settle: 'usdt', - opts: { - limit?: number; - from?: number; - to?: number; - type?: 'dnw' | 'pnl' | 'fee' | 'refr' | 'fund' | 'point_dnw' | 'point_fee' | 'point_refr'; - }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/delivery/{settle}/account_book'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listDeliveryAccountBook(settle: 'usdt', opts: { limit?: number, from?: number, to?: number, type?: 'dnw' | 'pnl' | 'fee' | 'refr' | 'fund' | 'point_dnw' | 'point_fee' | 'point_refr', } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/delivery/{settle}/account_book' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -521,24 +463,22 @@ export class DeliveryApi { opts = opts || {}; if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.type !== undefined) { - localVarQueryParameters['type'] = ObjectSerializer.serialize( - opts.type, - "'dnw' | 'pnl' | 'fee' | 'refr' | 'fund' | 'point_dnw' | 'point_fee' | 'point_refr'", - ); + localVarQueryParameters['type'] = ObjectSerializer.serialize(opts.type, "'dnw' | 'pnl' | 'fee' | 'refr' | 'fund' | 'point_dnw' | 'point_fee' | 'point_refr'"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -547,20 +487,19 @@ export class DeliveryApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary List all positions of a user * @param settle Settle currency */ - public async listDeliveryPositions(settle: 'usdt'): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/delivery/{settle}/positions'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listDeliveryPositions(settle: 'usdt') : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/delivery/{settle}/positions' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -574,6 +513,7 @@ export class DeliveryApi { throw new Error('Required parameter settle was null or undefined when calling listDeliveryPositions.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -582,26 +522,21 @@ export class DeliveryApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Get single position * @param settle Settle currency * @param contract Futures contract */ - public async getDeliveryPosition( - settle: 'usdt', - contract: string, - ): Promise<{ response: AxiosResponse; body: Position }> { - const localVarPath = - this.client.basePath + - '/delivery/{settle}/positions/{contract}' - .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) - .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getDeliveryPosition(settle: 'usdt', contract: string) : Promise<{ response: AxiosResponse; body: Position; }> { + const localVarPath = this.client.basePath + '/delivery/{settle}/positions/{contract}' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) + .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -620,6 +555,7 @@ export class DeliveryApi { throw new Error('Required parameter contract was null or undefined when calling getDeliveryPosition.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -628,28 +564,22 @@ export class DeliveryApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'Position', authSettings); + return this.client.request(config, "Position", authSettings); } /** - * + * * @summary Update position margin * @param settle Settle currency * @param contract Futures contract * @param change Margin change. Use positive number to increase margin, negative number otherwise. */ - public async updateDeliveryPositionMargin( - settle: 'usdt', - contract: string, - change: string, - ): Promise<{ response: AxiosResponse; body: Position }> { - const localVarPath = - this.client.basePath + - '/delivery/{settle}/positions/{contract}/margin' - .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) - .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async updateDeliveryPositionMargin(settle: 'usdt', contract: string, change: string) : Promise<{ response: AxiosResponse; body: Position; }> { + const localVarPath = this.client.basePath + '/delivery/{settle}/positions/{contract}/margin' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) + .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -660,26 +590,21 @@ export class DeliveryApi { // verify required parameter 'settle' is not null or undefined if (settle === null || settle === undefined) { - throw new Error( - 'Required parameter settle was null or undefined when calling updateDeliveryPositionMargin.', - ); + throw new Error('Required parameter settle was null or undefined when calling updateDeliveryPositionMargin.'); } // verify required parameter 'contract' is not null or undefined if (contract === null || contract === undefined) { - throw new Error( - 'Required parameter contract was null or undefined when calling updateDeliveryPositionMargin.', - ); + throw new Error('Required parameter contract was null or undefined when calling updateDeliveryPositionMargin.'); } // verify required parameter 'change' is not null or undefined if (change === null || change === undefined) { - throw new Error( - 'Required parameter change was null or undefined when calling updateDeliveryPositionMargin.', - ); + throw new Error('Required parameter change was null or undefined when calling updateDeliveryPositionMargin.'); } - localVarQueryParameters['change'] = ObjectSerializer.serialize(change, 'string'); + localVarQueryParameters['change'] = ObjectSerializer.serialize(change, "string"); + const config: AxiosRequestConfig = { method: 'POST', @@ -689,28 +614,22 @@ export class DeliveryApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'Position', authSettings); + return this.client.request(config, "Position", authSettings); } /** - * + * * @summary Update position leverage * @param settle Settle currency * @param contract Futures contract * @param leverage New position leverage */ - public async updateDeliveryPositionLeverage( - settle: 'usdt', - contract: string, - leverage: string, - ): Promise<{ response: AxiosResponse; body: Position }> { - const localVarPath = - this.client.basePath + - '/delivery/{settle}/positions/{contract}/leverage' - .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) - .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async updateDeliveryPositionLeverage(settle: 'usdt', contract: string, leverage: string) : Promise<{ response: AxiosResponse; body: Position; }> { + const localVarPath = this.client.basePath + '/delivery/{settle}/positions/{contract}/leverage' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) + .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -721,26 +640,21 @@ export class DeliveryApi { // verify required parameter 'settle' is not null or undefined if (settle === null || settle === undefined) { - throw new Error( - 'Required parameter settle was null or undefined when calling updateDeliveryPositionLeverage.', - ); + throw new Error('Required parameter settle was null or undefined when calling updateDeliveryPositionLeverage.'); } // verify required parameter 'contract' is not null or undefined if (contract === null || contract === undefined) { - throw new Error( - 'Required parameter contract was null or undefined when calling updateDeliveryPositionLeverage.', - ); + throw new Error('Required parameter contract was null or undefined when calling updateDeliveryPositionLeverage.'); } // verify required parameter 'leverage' is not null or undefined if (leverage === null || leverage === undefined) { - throw new Error( - 'Required parameter leverage was null or undefined when calling updateDeliveryPositionLeverage.', - ); + throw new Error('Required parameter leverage was null or undefined when calling updateDeliveryPositionLeverage.'); } - localVarQueryParameters['leverage'] = ObjectSerializer.serialize(leverage, 'string'); + localVarQueryParameters['leverage'] = ObjectSerializer.serialize(leverage, "string"); + const config: AxiosRequestConfig = { method: 'POST', @@ -750,28 +664,22 @@ export class DeliveryApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'Position', authSettings); + return this.client.request(config, "Position", authSettings); } /** - * + * * @summary Update position risk limit * @param settle Settle currency * @param contract Futures contract * @param riskLimit New position risk limit */ - public async updateDeliveryPositionRiskLimit( - settle: 'usdt', - contract: string, - riskLimit: string, - ): Promise<{ response: AxiosResponse; body: Position }> { - const localVarPath = - this.client.basePath + - '/delivery/{settle}/positions/{contract}/risk_limit' - .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) - .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async updateDeliveryPositionRiskLimit(settle: 'usdt', contract: string, riskLimit: string) : Promise<{ response: AxiosResponse; body: Position; }> { + const localVarPath = this.client.basePath + '/delivery/{settle}/positions/{contract}/risk_limit' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) + .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -782,26 +690,21 @@ export class DeliveryApi { // verify required parameter 'settle' is not null or undefined if (settle === null || settle === undefined) { - throw new Error( - 'Required parameter settle was null or undefined when calling updateDeliveryPositionRiskLimit.', - ); + throw new Error('Required parameter settle was null or undefined when calling updateDeliveryPositionRiskLimit.'); } // verify required parameter 'contract' is not null or undefined if (contract === null || contract === undefined) { - throw new Error( - 'Required parameter contract was null or undefined when calling updateDeliveryPositionRiskLimit.', - ); + throw new Error('Required parameter contract was null or undefined when calling updateDeliveryPositionRiskLimit.'); } // verify required parameter 'riskLimit' is not null or undefined if (riskLimit === null || riskLimit === undefined) { - throw new Error( - 'Required parameter riskLimit was null or undefined when calling updateDeliveryPositionRiskLimit.', - ); + throw new Error('Required parameter riskLimit was null or undefined when calling updateDeliveryPositionRiskLimit.'); } - localVarQueryParameters['risk_limit'] = ObjectSerializer.serialize(riskLimit, 'string'); + localVarQueryParameters['risk_limit'] = ObjectSerializer.serialize(riskLimit, "string"); + const config: AxiosRequestConfig = { method: 'POST', @@ -811,7 +714,7 @@ export class DeliveryApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'Position', authSettings); + return this.client.request(config, "Position", authSettings); } /** @@ -826,16 +729,11 @@ export class DeliveryApi { * @param opts.lastId Specify list staring point using the `id` of last record in previous list-query results * @param opts.countTotal Whether to return total number matched. Default to 0(no return) */ - public async listDeliveryOrders( - settle: 'usdt', - status: 'open' | 'finished', - opts: { contract?: string; limit?: number; offset?: number; lastId?: string; countTotal?: 0 | 1 }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/delivery/{settle}/orders'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listDeliveryOrders(settle: 'usdt', status: 'open' | 'finished', opts: { contract?: string, limit?: number, offset?: number, lastId?: string, countTotal?: 0 | 1, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/delivery/{settle}/orders' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -856,27 +754,28 @@ export class DeliveryApi { opts = opts || {}; if (opts.contract !== undefined) { - localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, "string"); } localVarQueryParameters['status'] = ObjectSerializer.serialize(status, "'open' | 'finished'"); if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } if (opts.lastId !== undefined) { - localVarQueryParameters['last_id'] = ObjectSerializer.serialize(opts.lastId, 'string'); + localVarQueryParameters['last_id'] = ObjectSerializer.serialize(opts.lastId, "string"); } if (opts.countTotal !== undefined) { - localVarQueryParameters['count_total'] = ObjectSerializer.serialize(opts.countTotal, '0 | 1'); + localVarQueryParameters['count_total'] = ObjectSerializer.serialize(opts.countTotal, "0 | 1"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -885,24 +784,20 @@ export class DeliveryApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** * Zero-filled order cannot be retrieved 10 minutes after order cancellation * @summary Create a futures order * @param settle Settle currency - * @param futuresOrder + * @param futuresOrder */ - public async createDeliveryOrder( - settle: 'usdt', - futuresOrder: FuturesOrder, - ): Promise<{ response: AxiosResponse; body: FuturesOrder }> { - const localVarPath = - this.client.basePath + - '/delivery/{settle}/orders'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async createDeliveryOrder(settle: 'usdt', futuresOrder: FuturesOrder) : Promise<{ response: AxiosResponse; body: FuturesOrder; }> { + const localVarPath = this.client.basePath + '/delivery/{settle}/orders' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -921,16 +816,17 @@ export class DeliveryApi { throw new Error('Required parameter futuresOrder was null or undefined when calling createDeliveryOrder.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(futuresOrder, 'FuturesOrder'), + data: ObjectSerializer.serialize(futuresOrder, "FuturesOrder") }; const authSettings = ['apiv4']; - return this.client.request(config, 'FuturesOrder', authSettings); + return this.client.request(config, "FuturesOrder", authSettings); } /** @@ -941,16 +837,11 @@ export class DeliveryApi { * @param opts Optional parameters * @param opts.side All bids or asks. Both included if not specified */ - public async cancelDeliveryOrders( - settle: 'usdt', - contract: string, - opts: { side?: 'ask' | 'bid' }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/delivery/{settle}/orders'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async cancelDeliveryOrders(settle: 'usdt', contract: string, opts: { side?: 'ask' | 'bid', } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/delivery/{settle}/orders' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -970,12 +861,13 @@ export class DeliveryApi { } opts = opts || {}; - localVarQueryParameters['contract'] = ObjectSerializer.serialize(contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(contract, "string"); if (opts.side !== undefined) { localVarQueryParameters['side'] = ObjectSerializer.serialize(opts.side, "'ask' | 'bid'"); } + const config: AxiosRequestConfig = { method: 'DELETE', params: localVarQueryParameters, @@ -984,7 +876,7 @@ export class DeliveryApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** @@ -993,17 +885,12 @@ export class DeliveryApi { * @param settle Settle currency * @param orderId Retrieve the data of the order with the specified ID */ - public async getDeliveryOrder( - settle: 'usdt', - orderId: string, - ): Promise<{ response: AxiosResponse; body: FuturesOrder }> { - const localVarPath = - this.client.basePath + - '/delivery/{settle}/orders/{order_id}' - .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) - .replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getDeliveryOrder(settle: 'usdt', orderId: string) : Promise<{ response: AxiosResponse; body: FuturesOrder; }> { + const localVarPath = this.client.basePath + '/delivery/{settle}/orders/{order_id}' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) + .replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1022,6 +909,7 @@ export class DeliveryApi { throw new Error('Required parameter orderId was null or undefined when calling getDeliveryOrder.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -1030,26 +918,21 @@ export class DeliveryApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'FuturesOrder', authSettings); + return this.client.request(config, "FuturesOrder", authSettings); } /** - * + * * @summary Cancel a single order * @param settle Settle currency * @param orderId Retrieve the data of the order with the specified ID */ - public async cancelDeliveryOrder( - settle: 'usdt', - orderId: string, - ): Promise<{ response: AxiosResponse; body: FuturesOrder }> { - const localVarPath = - this.client.basePath + - '/delivery/{settle}/orders/{order_id}' - .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) - .replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async cancelDeliveryOrder(settle: 'usdt', orderId: string) : Promise<{ response: AxiosResponse; body: FuturesOrder; }> { + const localVarPath = this.client.basePath + '/delivery/{settle}/orders/{order_id}' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) + .replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1068,6 +951,7 @@ export class DeliveryApi { throw new Error('Required parameter orderId was null or undefined when calling cancelDeliveryOrder.'); } + const config: AxiosRequestConfig = { method: 'DELETE', params: localVarQueryParameters, @@ -1076,11 +960,11 @@ export class DeliveryApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'FuturesOrder', authSettings); + return this.client.request(config, "FuturesOrder", authSettings); } /** - * + * * @summary List personal trading history * @param settle Settle currency * @param opts Optional parameters @@ -1091,22 +975,11 @@ export class DeliveryApi { * @param opts.lastId Specify list staring point using the `id` of last record in previous list-query results * @param opts.countTotal Whether to return total number matched. Default to 0(no return) */ - public async getMyDeliveryTrades( - settle: 'usdt', - opts: { - contract?: string; - order?: number; - limit?: number; - offset?: number; - lastId?: string; - countTotal?: 0 | 1; - }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/delivery/{settle}/my_trades'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getMyDeliveryTrades(settle: 'usdt', opts: { contract?: string, order?: number, limit?: number, offset?: number, lastId?: string, countTotal?: 0 | 1, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/delivery/{settle}/my_trades' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1122,29 +995,30 @@ export class DeliveryApi { opts = opts || {}; if (opts.contract !== undefined) { - localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, "string"); } if (opts.order !== undefined) { - localVarQueryParameters['order'] = ObjectSerializer.serialize(opts.order, 'number'); + localVarQueryParameters['order'] = ObjectSerializer.serialize(opts.order, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } if (opts.lastId !== undefined) { - localVarQueryParameters['last_id'] = ObjectSerializer.serialize(opts.lastId, 'string'); + localVarQueryParameters['last_id'] = ObjectSerializer.serialize(opts.lastId, "string"); } if (opts.countTotal !== undefined) { - localVarQueryParameters['count_total'] = ObjectSerializer.serialize(opts.countTotal, '0 | 1'); + localVarQueryParameters['count_total'] = ObjectSerializer.serialize(opts.countTotal, "0 | 1"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -1153,26 +1027,22 @@ export class DeliveryApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary List position close history * @param settle Settle currency * @param opts Optional parameters * @param opts.contract Futures contract * @param opts.limit Maximum number of records to be returned in a single list */ - public async listDeliveryPositionClose( - settle: 'usdt', - opts: { contract?: string; limit?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/delivery/{settle}/position_close'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listDeliveryPositionClose(settle: 'usdt', opts: { contract?: string, limit?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/delivery/{settle}/position_close' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1188,13 +1058,14 @@ export class DeliveryApi { opts = opts || {}; if (opts.contract !== undefined) { - localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, "string"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -1203,11 +1074,11 @@ export class DeliveryApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary List liquidation history * @param settle Settle currency * @param opts Optional parameters @@ -1215,15 +1086,11 @@ export class DeliveryApi { * @param opts.limit Maximum number of records to be returned in a single list * @param opts.at Specify a liquidation timestamp */ - public async listDeliveryLiquidates( - settle: 'usdt', - opts: { contract?: string; limit?: number; at?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/delivery/{settle}/liquidates'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listDeliveryLiquidates(settle: 'usdt', opts: { contract?: string, limit?: number, at?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/delivery/{settle}/liquidates' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1239,17 +1106,18 @@ export class DeliveryApi { opts = opts || {}; if (opts.contract !== undefined) { - localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, "string"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.at !== undefined) { - localVarQueryParameters['at'] = ObjectSerializer.serialize(opts.at, 'number'); + localVarQueryParameters['at'] = ObjectSerializer.serialize(opts.at, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -1258,11 +1126,11 @@ export class DeliveryApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary List settlement history * @param settle Settle currency * @param opts Optional parameters @@ -1270,15 +1138,11 @@ export class DeliveryApi { * @param opts.limit Maximum number of records to be returned in a single list * @param opts.at Specify a settlement timestamp */ - public async listDeliverySettlements( - settle: 'usdt', - opts: { contract?: string; limit?: number; at?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/delivery/{settle}/settlements'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listDeliverySettlements(settle: 'usdt', opts: { contract?: string, limit?: number, at?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/delivery/{settle}/settlements' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1294,17 +1158,18 @@ export class DeliveryApi { opts = opts || {}; if (opts.contract !== undefined) { - localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, "string"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.at !== undefined) { - localVarQueryParameters['at'] = ObjectSerializer.serialize(opts.at, 'number'); + localVarQueryParameters['at'] = ObjectSerializer.serialize(opts.at, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -1313,11 +1178,11 @@ export class DeliveryApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * contract 参数不传,默认查询前 100 个市场的风险限额,limit 和 offset 对应市场维度的分页查询,不对应返回数组的长度,仅当 contract 参数为空时生效 + * 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. * @summary List risk limit tiers * @param settle Settle currency * @param opts Optional parameters @@ -1325,15 +1190,11 @@ export class DeliveryApi { * @param opts.limit Maximum number of records to be returned in a single list * @param opts.offset List offset, starting from 0 */ - public async listDeliveryRiskLimitTiers( - settle: 'usdt', - opts: { contract?: string; limit?: number; offset?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/delivery/{settle}/risk_limit_tiers'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listDeliveryRiskLimitTiers(settle: 'usdt', opts: { contract?: string, limit?: number, offset?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/delivery/{settle}/risk_limit_tiers' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1349,17 +1210,18 @@ export class DeliveryApi { opts = opts || {}; if (opts.contract !== undefined) { - localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, "string"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -1368,11 +1230,11 @@ export class DeliveryApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary List all auto orders * @param settle Settle currency * @param status Only list the orders with this status @@ -1381,16 +1243,11 @@ export class DeliveryApi { * @param opts.limit Maximum number of records to be returned in a single list * @param opts.offset List offset, starting from 0 */ - public async listPriceTriggeredDeliveryOrders( - settle: 'usdt', - status: 'open' | 'finished', - opts: { contract?: string; limit?: number; offset?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/delivery/{settle}/price_orders'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listPriceTriggeredDeliveryOrders(settle: 'usdt', status: 'open' | 'finished', opts: { contract?: string, limit?: number, offset?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/delivery/{settle}/price_orders' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1401,33 +1258,30 @@ export class DeliveryApi { // verify required parameter 'settle' is not null or undefined if (settle === null || settle === undefined) { - throw new Error( - 'Required parameter settle was null or undefined when calling listPriceTriggeredDeliveryOrders.', - ); + throw new Error('Required parameter settle was null or undefined when calling listPriceTriggeredDeliveryOrders.'); } // verify required parameter 'status' is not null or undefined if (status === null || status === undefined) { - throw new Error( - 'Required parameter status was null or undefined when calling listPriceTriggeredDeliveryOrders.', - ); + throw new Error('Required parameter status was null or undefined when calling listPriceTriggeredDeliveryOrders.'); } opts = opts || {}; localVarQueryParameters['status'] = ObjectSerializer.serialize(status, "'open' | 'finished'"); if (opts.contract !== undefined) { - localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, "string"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -1436,28 +1290,20 @@ export class DeliveryApi { }; const authSettings = ['apiv4']; - return this.client.request>( - config, - 'Array', - authSettings, - ); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Create a price-triggered order * @param settle Settle currency - * @param futuresPriceTriggeredOrder + * @param futuresPriceTriggeredOrder */ - public async createPriceTriggeredDeliveryOrder( - settle: 'usdt', - futuresPriceTriggeredOrder: FuturesPriceTriggeredOrder, - ): Promise<{ response: AxiosResponse; body: TriggerOrderResponse }> { - const localVarPath = - this.client.basePath + - '/delivery/{settle}/price_orders'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async createPriceTriggeredDeliveryOrder(settle: 'usdt', futuresPriceTriggeredOrder: FuturesPriceTriggeredOrder) : Promise<{ response: AxiosResponse; body: TriggerOrderResponse; }> { + const localVarPath = this.client.basePath + '/delivery/{settle}/price_orders' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1468,45 +1314,38 @@ export class DeliveryApi { // verify required parameter 'settle' is not null or undefined if (settle === null || settle === undefined) { - throw new Error( - 'Required parameter settle was null or undefined when calling createPriceTriggeredDeliveryOrder.', - ); + throw new Error('Required parameter settle was null or undefined when calling createPriceTriggeredDeliveryOrder.'); } // verify required parameter 'futuresPriceTriggeredOrder' is not null or undefined if (futuresPriceTriggeredOrder === null || futuresPriceTriggeredOrder === undefined) { - throw new Error( - 'Required parameter futuresPriceTriggeredOrder was null or undefined when calling createPriceTriggeredDeliveryOrder.', - ); + throw new Error('Required parameter futuresPriceTriggeredOrder was null or undefined when calling createPriceTriggeredDeliveryOrder.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(futuresPriceTriggeredOrder, 'FuturesPriceTriggeredOrder'), + data: ObjectSerializer.serialize(futuresPriceTriggeredOrder, "FuturesPriceTriggeredOrder") }; const authSettings = ['apiv4']; - return this.client.request(config, 'TriggerOrderResponse', authSettings); + return this.client.request(config, "TriggerOrderResponse", authSettings); } /** - * + * * @summary Cancel all open orders * @param settle Settle currency * @param contract Futures contract */ - public async cancelPriceTriggeredDeliveryOrderList( - settle: 'usdt', - contract: string, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/delivery/{settle}/price_orders'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async cancelPriceTriggeredDeliveryOrderList(settle: 'usdt', contract: string) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/delivery/{settle}/price_orders' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1517,19 +1356,16 @@ export class DeliveryApi { // verify required parameter 'settle' is not null or undefined if (settle === null || settle === undefined) { - throw new Error( - 'Required parameter settle was null or undefined when calling cancelPriceTriggeredDeliveryOrderList.', - ); + throw new Error('Required parameter settle was null or undefined when calling cancelPriceTriggeredDeliveryOrderList.'); } // verify required parameter 'contract' is not null or undefined if (contract === null || contract === undefined) { - throw new Error( - 'Required parameter contract was null or undefined when calling cancelPriceTriggeredDeliveryOrderList.', - ); + throw new Error('Required parameter contract was null or undefined when calling cancelPriceTriggeredDeliveryOrderList.'); } - localVarQueryParameters['contract'] = ObjectSerializer.serialize(contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(contract, "string"); + const config: AxiosRequestConfig = { method: 'DELETE', @@ -1539,30 +1375,21 @@ export class DeliveryApi { }; const authSettings = ['apiv4']; - return this.client.request>( - config, - 'Array', - authSettings, - ); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Get a price-triggered order * @param settle Settle currency * @param orderId Retrieve the data of the order with the specified ID */ - public async getPriceTriggeredDeliveryOrder( - settle: 'usdt', - orderId: string, - ): Promise<{ response: AxiosResponse; body: FuturesPriceTriggeredOrder }> { - const localVarPath = - this.client.basePath + - '/delivery/{settle}/price_orders/{order_id}' - .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) - .replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getPriceTriggeredDeliveryOrder(settle: 'usdt', orderId: string) : Promise<{ response: AxiosResponse; body: FuturesPriceTriggeredOrder; }> { + const localVarPath = this.client.basePath + '/delivery/{settle}/price_orders/{order_id}' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) + .replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1573,18 +1400,15 @@ export class DeliveryApi { // verify required parameter 'settle' is not null or undefined if (settle === null || settle === undefined) { - throw new Error( - 'Required parameter settle was null or undefined when calling getPriceTriggeredDeliveryOrder.', - ); + throw new Error('Required parameter settle was null or undefined when calling getPriceTriggeredDeliveryOrder.'); } // verify required parameter 'orderId' is not null or undefined if (orderId === null || orderId === undefined) { - throw new Error( - 'Required parameter orderId was null or undefined when calling getPriceTriggeredDeliveryOrder.', - ); + throw new Error('Required parameter orderId was null or undefined when calling getPriceTriggeredDeliveryOrder.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -1593,26 +1417,21 @@ export class DeliveryApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'FuturesPriceTriggeredOrder', authSettings); + return this.client.request(config, "FuturesPriceTriggeredOrder", authSettings); } /** - * + * * @summary cancel a price-triggered order * @param settle Settle currency * @param orderId Retrieve the data of the order with the specified ID */ - public async cancelPriceTriggeredDeliveryOrder( - settle: 'usdt', - orderId: string, - ): Promise<{ response: AxiosResponse; body: FuturesPriceTriggeredOrder }> { - const localVarPath = - this.client.basePath + - '/delivery/{settle}/price_orders/{order_id}' - .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) - .replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async cancelPriceTriggeredDeliveryOrder(settle: 'usdt', orderId: string) : Promise<{ response: AxiosResponse; body: FuturesPriceTriggeredOrder; }> { + const localVarPath = this.client.basePath + '/delivery/{settle}/price_orders/{order_id}' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) + .replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1623,18 +1442,15 @@ export class DeliveryApi { // verify required parameter 'settle' is not null or undefined if (settle === null || settle === undefined) { - throw new Error( - 'Required parameter settle was null or undefined when calling cancelPriceTriggeredDeliveryOrder.', - ); + throw new Error('Required parameter settle was null or undefined when calling cancelPriceTriggeredDeliveryOrder.'); } // verify required parameter 'orderId' is not null or undefined if (orderId === null || orderId === undefined) { - throw new Error( - 'Required parameter orderId was null or undefined when calling cancelPriceTriggeredDeliveryOrder.', - ); + throw new Error('Required parameter orderId was null or undefined when calling cancelPriceTriggeredDeliveryOrder.'); } + const config: AxiosRequestConfig = { method: 'DELETE', params: localVarQueryParameters, @@ -1643,6 +1459,6 @@ export class DeliveryApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'FuturesPriceTriggeredOrder', authSettings); + return this.client.request(config, "FuturesPriceTriggeredOrder", authSettings); } } diff --git a/api/earnApi.ts b/api/earnApi.ts index 1dae806..32b266a 100644 --- a/api/earnApi.ts +++ b/api/earnApi.ts @@ -9,6 +9,7 @@ * Do not edit the class manually. */ + /* tslint:disable:no-unused-locals */ import { DualGetOrders } from '../model/dualGetOrders'; import { DualGetPlans } from '../model/dualGetPlans'; @@ -37,40 +38,41 @@ export class EarnApi { } /** - * + * * @summary ETH2 swap - * @param eth2Swap + * @param eth2Swap */ - public async swapETH2(eth2Swap: Eth2Swap): Promise<{ response: AxiosResponse; body?: any }> { + public async swapETH2(eth2Swap: Eth2Swap) : Promise<{ response: AxiosResponse; body?: any; }> { const localVarPath = this.client.basePath + '/earn/staking/eth2/swap'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); // verify required parameter 'eth2Swap' is not null or undefined if (eth2Swap === null || eth2Swap === undefined) { throw new Error('Required parameter eth2Swap was null or undefined when calling swapETH2.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(eth2Swap, 'Eth2Swap'), + data: ObjectSerializer.serialize(eth2Swap, "Eth2Swap") }; const authSettings = ['apiv4']; - return this.client.request(config, '', authSettings); + return this.client.request(config, "", authSettings); } /** - * + * * @summary Dual Investment product list */ - public async listDualInvestmentPlans(): Promise<{ response: AxiosResponse; body: Array }> { + public async listDualInvestmentPlans() : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/earn/dual/investment_plan'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -79,6 +81,7 @@ export class EarnApi { localVarHeaderParams.Accept = produces.join(','); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -87,17 +90,17 @@ export class EarnApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Dual Investment order list */ - public async listDualOrders(): Promise<{ response: AxiosResponse; body: Array }> { + public async listDualOrders() : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/earn/dual/orders'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -106,6 +109,7 @@ export class EarnApi { localVarHeaderParams.Accept = produces.join(','); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -114,42 +118,39 @@ export class EarnApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Place Dual Investment order - * @param placeDualInvestmentOrder + * @param placeDualInvestmentOrder */ - public async placeDualOrder( - placeDualInvestmentOrder: PlaceDualInvestmentOrder, - ): Promise<{ response: AxiosResponse; body?: any }> { + public async placeDualOrder(placeDualInvestmentOrder: PlaceDualInvestmentOrder) : Promise<{ response: AxiosResponse; body?: any; }> { const localVarPath = this.client.basePath + '/earn/dual/orders'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); // verify required parameter 'placeDualInvestmentOrder' is not null or undefined if (placeDualInvestmentOrder === null || placeDualInvestmentOrder === undefined) { - throw new Error( - 'Required parameter placeDualInvestmentOrder was null or undefined when calling placeDualOrder.', - ); + throw new Error('Required parameter placeDualInvestmentOrder was null or undefined when calling placeDualOrder.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(placeDualInvestmentOrder, 'PlaceDualInvestmentOrder'), + data: ObjectSerializer.serialize(placeDualInvestmentOrder, "PlaceDualInvestmentOrder") }; const authSettings = ['apiv4']; - return this.client.request(config, '', authSettings); + return this.client.request(config, "", authSettings); } /** - * + * * @summary Structured Product List * @param status Status (default: all) `in_process`-processing `will_begin`-unstarted `wait_settlement`-unsettled `done`-finish * @param opts Optional parameters @@ -157,13 +158,10 @@ export class EarnApi { * @param opts.page Page number * @param opts.limit Maximum number of records to be returned in a single list */ - public async listStructuredProducts( - status: string, - opts: { type?: string; page?: number; limit?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { + public async listStructuredProducts(status: string, opts: { type?: string, page?: number, limit?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/earn/structured/products'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -179,19 +177,20 @@ export class EarnApi { opts = opts || {}; if (opts.type !== undefined) { - localVarQueryParameters['type'] = ObjectSerializer.serialize(opts.type, 'string'); + localVarQueryParameters['type'] = ObjectSerializer.serialize(opts.type, "string"); } - localVarQueryParameters['status'] = ObjectSerializer.serialize(status, 'string'); + localVarQueryParameters['status'] = ObjectSerializer.serialize(status, "string"); if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -200,15 +199,11 @@ export class EarnApi { }; const authSettings = []; - return this.client.request>( - config, - 'Array', - authSettings, - ); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Structured Product Order List * @param opts Optional parameters * @param opts.from Start timestamp @@ -216,15 +211,10 @@ export class EarnApi { * @param opts.page Page number * @param opts.limit Maximum number of records to be returned in a single list */ - public async listStructuredOrders(opts: { - from?: number; - to?: number; - page?: number; - limit?: number; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listStructuredOrders(opts: { from?: number, to?: number, page?: number, limit?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/earn/structured/orders'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -235,21 +225,22 @@ export class EarnApi { opts = opts || {}; if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -258,35 +249,34 @@ export class EarnApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Place Structured Product Order - * @param structuredBuy + * @param structuredBuy */ - public async placeStructuredOrder(structuredBuy: StructuredBuy): Promise<{ response: AxiosResponse; body?: any }> { + public async placeStructuredOrder(structuredBuy: StructuredBuy) : Promise<{ response: AxiosResponse; body?: any; }> { const localVarPath = this.client.basePath + '/earn/structured/orders'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); // verify required parameter 'structuredBuy' is not null or undefined if (structuredBuy === null || structuredBuy === undefined) { - throw new Error( - 'Required parameter structuredBuy was null or undefined when calling placeStructuredOrder.', - ); + throw new Error('Required parameter structuredBuy was null or undefined when calling placeStructuredOrder.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(structuredBuy, 'StructuredBuy'), + data: ObjectSerializer.serialize(structuredBuy, "StructuredBuy") }; const authSettings = ['apiv4']; - return this.client.request(config, '', authSettings); + return this.client.request(config, "", authSettings); } } diff --git a/api/earnUniApi.ts b/api/earnUniApi.ts index ced08f5..056cfc7 100644 --- a/api/earnUniApi.ts +++ b/api/earnUniApi.ts @@ -9,6 +9,7 @@ * Do not edit the class manually. */ + /* tslint:disable:no-unused-locals */ import { CreateUniLend } from '../model/createUniLend'; import { PatchUniLend } from '../model/patchUniLend'; @@ -39,13 +40,13 @@ export class EarnUniApi { } /** - * + * * @summary List currencies for lending */ - public async listUniCurrencies(): Promise<{ response: AxiosResponse; body: Array }> { + public async listUniCurrencies() : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/earn/uni/currencies'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -54,6 +55,7 @@ export class EarnUniApi { localVarHeaderParams.Accept = produces.join(','); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -62,20 +64,19 @@ export class EarnUniApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Get currency detail for lending * @param currency Currency */ - public async getUniCurrency(currency: string): Promise<{ response: AxiosResponse; body: UniCurrency }> { - const localVarPath = - this.client.basePath + - '/earn/uni/currencies/{currency}'.replace('{' + 'currency' + '}', encodeURIComponent(String(currency))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getUniCurrency(currency: string) : Promise<{ response: AxiosResponse; body: UniCurrency; }> { + const localVarPath = this.client.basePath + '/earn/uni/currencies/{currency}' + .replace('{' + 'currency' + '}', encodeURIComponent(String(currency))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -89,6 +90,7 @@ export class EarnUniApi { throw new Error('Required parameter currency was null or undefined when calling getUniCurrency.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -97,25 +99,21 @@ export class EarnUniApi { }; const authSettings = []; - return this.client.request(config, 'UniCurrency', authSettings); + return this.client.request(config, "UniCurrency", authSettings); } /** - * + * * @summary List user\'s lending orders * @param opts Optional parameters * @param opts.currency Retrieve data of the specified currency * @param opts.page Page number * @param opts.limit Maximum response items. Default: 100, minimum: 1, Maximum: 100 */ - public async listUserUniLends(opts: { - currency?: string; - page?: number; - limit?: number; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listUserUniLends(opts: { currency?: string, page?: number, limit?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/earn/uni/lends'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -126,17 +124,18 @@ export class EarnUniApi { opts = opts || {}; if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, "string"); } if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -145,65 +144,67 @@ export class EarnUniApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * `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`: 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. * @summary Lend or redeem - * @param createUniLend + * @param createUniLend */ - public async createUniLend(createUniLend: CreateUniLend): Promise<{ response: AxiosResponse; body?: any }> { + public async createUniLend(createUniLend: CreateUniLend) : Promise<{ response: AxiosResponse; body?: any; }> { const localVarPath = this.client.basePath + '/earn/uni/lends'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); // verify required parameter 'createUniLend' is not null or undefined if (createUniLend === null || createUniLend === undefined) { throw new Error('Required parameter createUniLend was null or undefined when calling createUniLend.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(createUniLend, 'CreateUniLend'), + data: ObjectSerializer.serialize(createUniLend, "CreateUniLend") }; const authSettings = ['apiv4']; - return this.client.request(config, '', authSettings); + return this.client.request(config, "", authSettings); } /** * Currently only supports amending the minimum interest rate (hour) * @summary Amend lending order - * @param patchUniLend + * @param patchUniLend */ - public async changeUniLend(patchUniLend: PatchUniLend): Promise<{ response: AxiosResponse; body?: any }> { + public async changeUniLend(patchUniLend: PatchUniLend) : Promise<{ response: AxiosResponse; body?: any; }> { const localVarPath = this.client.basePath + '/earn/uni/lends'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); // verify required parameter 'patchUniLend' is not null or undefined if (patchUniLend === null || patchUniLend === undefined) { throw new Error('Required parameter patchUniLend was null or undefined when calling changeUniLend.'); } + const config: AxiosRequestConfig = { method: 'PATCH', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(patchUniLend, 'PatchUniLend'), + data: ObjectSerializer.serialize(patchUniLend, "PatchUniLend") }; const authSettings = ['apiv4']; - return this.client.request(config, '', authSettings); + return this.client.request(config, "", authSettings); } /** - * + * * @summary List records of lending * @param opts Optional parameters * @param opts.currency Retrieve data of the specified currency @@ -213,17 +214,10 @@ export class EarnUniApi { * @param opts.to End timestamp * @param opts.type type: lend - lend, redeem - redeem */ - public async listUniLendRecords(opts: { - currency?: string; - page?: number; - limit?: number; - from?: number; - to?: number; - type?: 'lend' | 'redeem'; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listUniLendRecords(opts: { currency?: string, page?: number, limit?: number, from?: number, to?: number, type?: 'lend' | 'redeem', } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/earn/uni/lend_records'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -234,29 +228,30 @@ export class EarnUniApi { opts = opts || {}; if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, "string"); } if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.type !== undefined) { localVarQueryParameters['type'] = ObjectSerializer.serialize(opts.type, "'lend' | 'redeem'"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -265,20 +260,19 @@ export class EarnUniApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Get the user\'s total interest income of specified currency * @param currency Currency */ - public async getUniInterest(currency: string): Promise<{ response: AxiosResponse; body: UniLendInterest }> { - const localVarPath = - this.client.basePath + - '/earn/uni/interests/{currency}'.replace('{' + 'currency' + '}', encodeURIComponent(String(currency))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getUniInterest(currency: string) : Promise<{ response: AxiosResponse; body: UniLendInterest; }> { + const localVarPath = this.client.basePath + '/earn/uni/interests/{currency}' + .replace('{' + 'currency' + '}', encodeURIComponent(String(currency))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -292,6 +286,7 @@ export class EarnUniApi { throw new Error('Required parameter currency was null or undefined when calling getUniInterest.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -300,11 +295,11 @@ export class EarnUniApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'UniLendInterest', authSettings); + return this.client.request(config, "UniLendInterest", authSettings); } /** - * + * * @summary List interest records * @param opts Optional parameters * @param opts.currency Retrieve data of the specified currency @@ -313,16 +308,10 @@ export class EarnUniApi { * @param opts.from Start timestamp * @param opts.to End timestamp */ - public async listUniInterestRecords(opts: { - currency?: string; - page?: number; - limit?: number; - from?: number; - to?: number; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listUniInterestRecords(opts: { currency?: string, page?: number, limit?: number, from?: number, to?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/earn/uni/interest_records'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -333,25 +322,26 @@ export class EarnUniApi { opts = opts || {}; if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, "string"); } if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -360,56 +350,47 @@ export class EarnUniApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Set interest reinvestment toggle - * @param uniInterestMode + * @param uniInterestMode */ - public async switchInterestReinvest( - uniInterestMode: UniInterestMode, - ): Promise<{ response: AxiosResponse; body?: any }> { + public async switchInterestReinvest(uniInterestMode: UniInterestMode) : Promise<{ response: AxiosResponse; body?: any; }> { const localVarPath = this.client.basePath + '/earn/uni/interest_reinvest'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); // verify required parameter 'uniInterestMode' is not null or undefined if (uniInterestMode === null || uniInterestMode === undefined) { - throw new Error( - 'Required parameter uniInterestMode was null or undefined when calling switchInterestReinvest.', - ); + throw new Error('Required parameter uniInterestMode was null or undefined when calling switchInterestReinvest.'); } + const config: AxiosRequestConfig = { method: 'PUT', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(uniInterestMode, 'UniInterestMode'), + data: ObjectSerializer.serialize(uniInterestMode, "UniInterestMode") }; const authSettings = ['apiv4']; - return this.client.request(config, '', authSettings); + return this.client.request(config, "", authSettings); } /** - * + * * @summary query currency interest compounding status * @param currency Currency */ - public async getUniInterestStatus( - currency: string, - ): Promise<{ response: AxiosResponse; body: UniCurrencyInterest }> { - const localVarPath = - this.client.basePath + - '/earn/uni/interest_status/{currency}'.replace( - '{' + 'currency' + '}', - encodeURIComponent(String(currency)), - ); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getUniInterestStatus(currency: string) : Promise<{ response: AxiosResponse; body: UniCurrencyInterest; }> { + const localVarPath = this.client.basePath + '/earn/uni/interest_status/{currency}' + .replace('{' + 'currency' + '}', encodeURIComponent(String(currency))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -423,6 +404,7 @@ export class EarnUniApi { throw new Error('Required parameter currency was null or undefined when calling getUniInterestStatus.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -431,6 +413,6 @@ export class EarnUniApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'UniCurrencyInterest', authSettings); + return this.client.request(config, "UniCurrencyInterest", authSettings); } } diff --git a/api/flashSwapApi.ts b/api/flashSwapApi.ts index 72708d5..8699223 100644 --- a/api/flashSwapApi.ts +++ b/api/flashSwapApi.ts @@ -9,6 +9,7 @@ * Do not edit the class manually. */ + /* tslint:disable:no-unused-locals */ import { FlashSwapCurrencyPair } from '../model/flashSwapCurrencyPair'; import { FlashSwapOrder } from '../model/flashSwapOrder'; @@ -40,16 +41,12 @@ export class FlashSwapApi { * @param opts Optional parameters * @param opts.currency Retrieve data of the specified currency * @param opts.page Page number - * @param opts.limit 列表返回的最大数量。默认为1000,最小1,最大1000。 + * @param opts.limit Maximum response items. Default: 100, minimum: 1, Maximum: 1000 */ - public async listFlashSwapCurrencyPair(opts: { - currency?: string; - page?: number; - limit?: number; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listFlashSwapCurrencyPair(opts: { currency?: string, page?: number, limit?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/flash_swap/currency_pairs'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -60,17 +57,18 @@ export class FlashSwapApi { opts = opts || {}; if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, "string"); } if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -79,11 +77,11 @@ export class FlashSwapApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary List all flash swap orders * @param opts Optional parameters * @param opts.status Flash swap order status `1` - success `2` - failure @@ -93,17 +91,10 @@ export class FlashSwapApi { * @param opts.limit Maximum number of records to be returned in a single list * @param opts.page Page number */ - public async listFlashSwapOrders(opts: { - status?: number; - sellCurrency?: string; - buyCurrency?: string; - reverse?: boolean; - limit?: number; - page?: number; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listFlashSwapOrders(opts: { status?: number, sellCurrency?: string, buyCurrency?: string, reverse?: boolean, limit?: number, page?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/flash_swap/orders'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -114,29 +105,30 @@ export class FlashSwapApi { opts = opts || {}; if (opts.status !== undefined) { - localVarQueryParameters['status'] = ObjectSerializer.serialize(opts.status, 'number'); + localVarQueryParameters['status'] = ObjectSerializer.serialize(opts.status, "number"); } if (opts.sellCurrency !== undefined) { - localVarQueryParameters['sell_currency'] = ObjectSerializer.serialize(opts.sellCurrency, 'string'); + localVarQueryParameters['sell_currency'] = ObjectSerializer.serialize(opts.sellCurrency, "string"); } if (opts.buyCurrency !== undefined) { - localVarQueryParameters['buy_currency'] = ObjectSerializer.serialize(opts.buyCurrency, 'string'); + localVarQueryParameters['buy_currency'] = ObjectSerializer.serialize(opts.buyCurrency, "string"); } if (opts.reverse !== undefined) { - localVarQueryParameters['reverse'] = ObjectSerializer.serialize(opts.reverse, 'boolean'); + localVarQueryParameters['reverse'] = ObjectSerializer.serialize(opts.reverse, "boolean"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -145,20 +137,18 @@ export class FlashSwapApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** * Initiate a flash swap preview in advance because order creation requires a preview result * @summary Create a flash swap order - * @param flashSwapOrderRequest + * @param flashSwapOrderRequest */ - public async createFlashSwapOrder( - flashSwapOrderRequest: FlashSwapOrderRequest, - ): Promise<{ response: AxiosResponse; body: FlashSwapOrder }> { + public async createFlashSwapOrder(flashSwapOrderRequest: FlashSwapOrderRequest) : Promise<{ response: AxiosResponse; body: FlashSwapOrder; }> { const localVarPath = this.client.basePath + '/flash_swap/orders'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -169,34 +159,32 @@ export class FlashSwapApi { // verify required parameter 'flashSwapOrderRequest' is not null or undefined if (flashSwapOrderRequest === null || flashSwapOrderRequest === undefined) { - throw new Error( - 'Required parameter flashSwapOrderRequest was null or undefined when calling createFlashSwapOrder.', - ); + throw new Error('Required parameter flashSwapOrderRequest was null or undefined when calling createFlashSwapOrder.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(flashSwapOrderRequest, 'FlashSwapOrderRequest'), + data: ObjectSerializer.serialize(flashSwapOrderRequest, "FlashSwapOrderRequest") }; const authSettings = ['apiv4']; - return this.client.request(config, 'FlashSwapOrder', authSettings); + return this.client.request(config, "FlashSwapOrder", authSettings); } /** - * + * * @summary Get a single flash swap order\'s detail * @param orderId Flash swap order ID */ - public async getFlashSwapOrder(orderId: number): Promise<{ response: AxiosResponse; body: FlashSwapOrder }> { - const localVarPath = - this.client.basePath + - '/flash_swap/orders/{order_id}'.replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getFlashSwapOrder(orderId: number) : Promise<{ response: AxiosResponse; body: FlashSwapOrder; }> { + const localVarPath = this.client.basePath + '/flash_swap/orders/{order_id}' + .replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -210,6 +198,7 @@ export class FlashSwapApi { throw new Error('Required parameter orderId was null or undefined when calling getFlashSwapOrder.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -218,20 +207,18 @@ export class FlashSwapApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'FlashSwapOrder', authSettings); + return this.client.request(config, "FlashSwapOrder", authSettings); } /** - * + * * @summary Initiate a flash swap order preview - * @param flashSwapPreviewRequest + * @param flashSwapPreviewRequest */ - public async previewFlashSwapOrder( - flashSwapPreviewRequest: FlashSwapPreviewRequest, - ): Promise<{ response: AxiosResponse; body: FlashSwapOrderPreview }> { + public async previewFlashSwapOrder(flashSwapPreviewRequest: FlashSwapPreviewRequest) : Promise<{ response: AxiosResponse; body: FlashSwapOrderPreview; }> { const localVarPath = this.client.basePath + '/flash_swap/orders/preview'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -242,20 +229,19 @@ export class FlashSwapApi { // verify required parameter 'flashSwapPreviewRequest' is not null or undefined if (flashSwapPreviewRequest === null || flashSwapPreviewRequest === undefined) { - throw new Error( - 'Required parameter flashSwapPreviewRequest was null or undefined when calling previewFlashSwapOrder.', - ); + throw new Error('Required parameter flashSwapPreviewRequest was null or undefined when calling previewFlashSwapOrder.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(flashSwapPreviewRequest, 'FlashSwapPreviewRequest'), + data: ObjectSerializer.serialize(flashSwapPreviewRequest, "FlashSwapPreviewRequest") }; const authSettings = ['apiv4']; - return this.client.request(config, 'FlashSwapOrderPreview', authSettings); + return this.client.request(config, "FlashSwapOrderPreview", authSettings); } } diff --git a/api/futuresApi.ts b/api/futuresApi.ts index 681094c..5aadb21 100644 --- a/api/futuresApi.ts +++ b/api/futuresApi.ts @@ -9,6 +9,7 @@ * Do not edit the class manually. */ + /* tslint:disable:no-unused-locals */ import { BatchAmendOrderReq } from '../model/batchAmendOrderReq'; import { BatchFuturesOrder } from '../model/batchFuturesOrder'; @@ -60,22 +61,18 @@ export class FuturesApi { } /** - * + * * @summary List all futures contracts * @param settle Settle currency * @param opts Optional parameters * @param opts.limit Maximum number of records to be returned in a single list * @param opts.offset List offset, starting from 0 */ - public async listFuturesContracts( - settle: 'btc' | 'usdt', - opts: { limit?: number; offset?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/contracts'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listFuturesContracts(settle: 'btc' | 'usdt', opts: { limit?: number, offset?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/contracts' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -91,13 +88,14 @@ export class FuturesApi { opts = opts || {}; if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -106,26 +104,21 @@ export class FuturesApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Get a single contract * @param settle Settle currency * @param contract Futures contract */ - public async getFuturesContract( - settle: 'btc' | 'usdt', - contract: string, - ): Promise<{ response: AxiosResponse; body: Contract }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/contracts/{contract}' - .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) - .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getFuturesContract(settle: 'btc' | 'usdt', contract: string) : Promise<{ response: AxiosResponse; body: Contract; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/contracts/{contract}' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) + .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -144,6 +137,7 @@ export class FuturesApi { throw new Error('Required parameter contract was null or undefined when calling getFuturesContract.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -152,7 +146,7 @@ export class FuturesApi { }; const authSettings = []; - return this.client.request(config, 'Contract', authSettings); + return this.client.request(config, "Contract", authSettings); } /** @@ -165,16 +159,11 @@ export class FuturesApi { * @param opts.limit Maximum number of order depth data in asks or bids * @param opts.withId Whether the order book update ID will be returned. This ID increases by 1 on every order book update */ - public async listFuturesOrderBook( - settle: 'btc' | 'usdt', - contract: string, - opts: { interval?: string; limit?: number; withId?: boolean }, - ): Promise<{ response: AxiosResponse; body: FuturesOrderBook }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/order_book'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listFuturesOrderBook(settle: 'btc' | 'usdt', contract: string, opts: { interval?: string, limit?: number, withId?: boolean, } ) : Promise<{ response: AxiosResponse; body: FuturesOrderBook; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/order_book' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -194,20 +183,21 @@ export class FuturesApi { } opts = opts || {}; - localVarQueryParameters['contract'] = ObjectSerializer.serialize(contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(contract, "string"); if (opts.interval !== undefined) { - localVarQueryParameters['interval'] = ObjectSerializer.serialize(opts.interval, 'string'); + localVarQueryParameters['interval'] = ObjectSerializer.serialize(opts.interval, "string"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.withId !== undefined) { - localVarQueryParameters['with_id'] = ObjectSerializer.serialize(opts.withId, 'boolean'); + localVarQueryParameters['with_id'] = ObjectSerializer.serialize(opts.withId, "boolean"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -216,11 +206,11 @@ export class FuturesApi { }; const authSettings = []; - return this.client.request(config, 'FuturesOrderBook', authSettings); + return this.client.request(config, "FuturesOrderBook", authSettings); } /** - * + * * @summary Futures trading history * @param settle Settle currency * @param contract Futures contract @@ -228,19 +218,14 @@ export class FuturesApi { * @param opts.limit Maximum number of records to be returned in a single list * @param opts.offset List offset, starting from 0 * @param opts.lastId 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 opts.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 opts.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 opts.to Specify end time in Unix seconds, default to current time */ - public async listFuturesTrades( - settle: 'btc' | 'usdt', - contract: string, - opts: { limit?: number; offset?: number; lastId?: string; from?: number; to?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/trades'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listFuturesTrades(settle: 'btc' | 'usdt', contract: string, opts: { limit?: number, offset?: number, lastId?: string, from?: number, to?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/trades' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -260,28 +245,29 @@ export class FuturesApi { } opts = opts || {}; - localVarQueryParameters['contract'] = ObjectSerializer.serialize(contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(contract, "string"); if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } if (opts.lastId !== undefined) { - localVarQueryParameters['last_id'] = ObjectSerializer.serialize(opts.lastId, 'string'); + localVarQueryParameters['last_id'] = ObjectSerializer.serialize(opts.lastId, "string"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -290,7 +276,7 @@ export class FuturesApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** @@ -304,16 +290,11 @@ export class FuturesApi { * @param opts.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 opts.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 */ - public async listFuturesCandlesticks( - settle: 'btc' | 'usdt', - contract: string, - opts: { from?: number; to?: number; limit?: number; interval?: string }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/candlesticks'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listFuturesCandlesticks(settle: 'btc' | 'usdt', contract: string, opts: { from?: number, to?: number, limit?: number, interval?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/candlesticks' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -333,24 +314,25 @@ export class FuturesApi { } opts = opts || {}; - localVarQueryParameters['contract'] = ObjectSerializer.serialize(contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(contract, "string"); if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.interval !== undefined) { - localVarQueryParameters['interval'] = ObjectSerializer.serialize(opts.interval, 'string'); + localVarQueryParameters['interval'] = ObjectSerializer.serialize(opts.interval, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -359,7 +341,7 @@ export class FuturesApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** @@ -373,16 +355,11 @@ export class FuturesApi { * @param opts.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 opts.interval Interval time between data points */ - public async listFuturesPremiumIndex( - settle: 'btc' | 'usdt', - contract: string, - opts: { from?: number; to?: number; limit?: number; interval?: string }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/premium_index'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listFuturesPremiumIndex(settle: 'btc' | 'usdt', contract: string, opts: { from?: number, to?: number, limit?: number, interval?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/premium_index' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -402,24 +379,25 @@ export class FuturesApi { } opts = opts || {}; - localVarQueryParameters['contract'] = ObjectSerializer.serialize(contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(contract, "string"); if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.interval !== undefined) { - localVarQueryParameters['interval'] = ObjectSerializer.serialize(opts.interval, 'string'); + localVarQueryParameters['interval'] = ObjectSerializer.serialize(opts.interval, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -428,25 +406,21 @@ export class FuturesApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary List futures tickers * @param settle Settle currency * @param opts Optional parameters * @param opts.contract Futures contract, return related data only if specified */ - public async listFuturesTickers( - settle: 'btc' | 'usdt', - opts: { contract?: string }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/tickers'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listFuturesTickers(settle: 'btc' | 'usdt', opts: { contract?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/tickers' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -462,9 +436,10 @@ export class FuturesApi { opts = opts || {}; if (opts.contract !== undefined) { - localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -473,11 +448,11 @@ export class FuturesApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Funding rate history * @param settle Settle currency * @param contract Futures contract @@ -486,16 +461,11 @@ export class FuturesApi { * @param opts.from Start timestamp * @param opts.to End timestamp */ - public async listFuturesFundingRateHistory( - settle: 'btc' | 'usdt', - contract: string, - opts: { limit?: number; from?: number; to?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/funding_rate'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listFuturesFundingRateHistory(settle: 'btc' | 'usdt', contract: string, opts: { limit?: number, from?: number, to?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/funding_rate' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -506,33 +476,30 @@ export class FuturesApi { // verify required parameter 'settle' is not null or undefined if (settle === null || settle === undefined) { - throw new Error( - 'Required parameter settle was null or undefined when calling listFuturesFundingRateHistory.', - ); + throw new Error('Required parameter settle was null or undefined when calling listFuturesFundingRateHistory.'); } // verify required parameter 'contract' is not null or undefined if (contract === null || contract === undefined) { - throw new Error( - 'Required parameter contract was null or undefined when calling listFuturesFundingRateHistory.', - ); + throw new Error('Required parameter contract was null or undefined when calling listFuturesFundingRateHistory.'); } opts = opts || {}; - localVarQueryParameters['contract'] = ObjectSerializer.serialize(contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(contract, "string"); if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -541,25 +508,21 @@ export class FuturesApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Futures insurance balance history * @param settle Settle currency * @param opts Optional parameters * @param opts.limit Maximum number of records to be returned in a single list */ - public async listFuturesInsuranceLedger( - settle: 'btc' | 'usdt', - opts: { limit?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/insurance'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listFuturesInsuranceLedger(settle: 'btc' | 'usdt', opts: { limit?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/insurance' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -575,9 +538,10 @@ export class FuturesApi { opts = opts || {}; if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -586,29 +550,24 @@ export class FuturesApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Futures stats * @param settle Settle currency * @param contract Futures contract * @param opts Optional parameters * @param opts.from Start timestamp - * @param opts.interval - * @param opts.limit + * @param opts.interval + * @param opts.limit */ - public async listContractStats( - settle: 'btc' | 'usdt', - contract: string, - opts: { from?: number; interval?: string; limit?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/contract_stats'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listContractStats(settle: 'btc' | 'usdt', contract: string, opts: { from?: number, interval?: string, limit?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/contract_stats' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -628,20 +587,21 @@ export class FuturesApi { } opts = opts || {}; - localVarQueryParameters['contract'] = ObjectSerializer.serialize(contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(contract, "string"); if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.interval !== undefined) { - localVarQueryParameters['interval'] = ObjectSerializer.serialize(opts.interval, 'string'); + localVarQueryParameters['interval'] = ObjectSerializer.serialize(opts.interval, "string"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -650,26 +610,21 @@ export class FuturesApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Get index constituents * @param settle Settle currency * @param index Index name */ - public async getIndexConstituents( - settle: 'btc' | 'usdt', - index: string, - ): Promise<{ response: AxiosResponse; body: FuturesIndexConstituents }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/index_constituents/{index}' - .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) - .replace('{' + 'index' + '}', encodeURIComponent(String(index))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getIndexConstituents(settle: 'btc' | 'usdt', index: string) : Promise<{ response: AxiosResponse; body: FuturesIndexConstituents; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/index_constituents/{index}' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) + .replace('{' + 'index' + '}', encodeURIComponent(String(index))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -688,6 +643,7 @@ export class FuturesApi { throw new Error('Required parameter index was null or undefined when calling getIndexConstituents.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -696,7 +652,7 @@ export class FuturesApi { }; const authSettings = []; - return this.client.request(config, 'FuturesIndexConstituents', authSettings); + return this.client.request(config, "FuturesIndexConstituents", authSettings); } /** @@ -709,15 +665,11 @@ export class FuturesApi { * @param opts.to End timestamp * @param opts.limit Maximum number of records to be returned in a single list */ - public async listLiquidatedOrders( - settle: 'btc' | 'usdt', - opts: { contract?: string; from?: number; to?: number; limit?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/liq_orders'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listLiquidatedOrders(settle: 'btc' | 'usdt', opts: { contract?: string, from?: number, to?: number, limit?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/liq_orders' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -733,21 +685,22 @@ export class FuturesApi { opts = opts || {}; if (opts.contract !== undefined) { - localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, "string"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -756,11 +709,11 @@ export class FuturesApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * contract 参数不传,默认查询前 100 个市场的风险限额,limit 和 offset 对应市场维度的分页查询,不对应返回数组的长度,仅当 contract 参数为空时生效 + * 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. * @summary List risk limit tiers * @param settle Settle currency * @param opts Optional parameters @@ -768,15 +721,11 @@ export class FuturesApi { * @param opts.limit Maximum number of records to be returned in a single list * @param opts.offset List offset, starting from 0 */ - public async listFuturesRiskLimitTiers( - settle: 'btc' | 'usdt', - opts: { contract?: string; limit?: number; offset?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/risk_limit_tiers'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listFuturesRiskLimitTiers(settle: 'btc' | 'usdt', opts: { contract?: string, limit?: number, offset?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/risk_limit_tiers' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -792,17 +741,18 @@ export class FuturesApi { opts = opts || {}; if (opts.contract !== undefined) { - localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, "string"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -811,22 +761,19 @@ export class FuturesApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Query futures account * @param settle Settle currency */ - public async listFuturesAccounts( - settle: 'btc' | 'usdt', - ): Promise<{ response: AxiosResponse; body: FuturesAccount }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/accounts'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listFuturesAccounts(settle: 'btc' | 'usdt') : Promise<{ response: AxiosResponse; body: FuturesAccount; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/accounts' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -840,6 +787,7 @@ export class FuturesApi { throw new Error('Required parameter settle was null or undefined when calling listFuturesAccounts.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -848,7 +796,7 @@ export class FuturesApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'FuturesAccount', authSettings); + return this.client.request(config, "FuturesAccount", authSettings); } /** @@ -863,15 +811,11 @@ export class FuturesApi { * @param opts.to End timestamp * @param opts.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 */ - public async listFuturesAccountBook( - settle: 'btc' | 'usdt', - opts: { contract?: string; limit?: number; offset?: number; from?: number; to?: number; type?: string }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/account_book'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listFuturesAccountBook(settle: 'btc' | 'usdt', opts: { contract?: string, limit?: number, offset?: number, from?: number, to?: number, type?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/account_book' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -887,29 +831,30 @@ export class FuturesApi { opts = opts || {}; if (opts.contract !== undefined) { - localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, "string"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.type !== undefined) { - localVarQueryParameters['type'] = ObjectSerializer.serialize(opts.type, 'string'); + localVarQueryParameters['type'] = ObjectSerializer.serialize(opts.type, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -918,11 +863,11 @@ export class FuturesApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary List all positions of a user * @param settle Settle currency * @param opts Optional parameters @@ -930,15 +875,11 @@ export class FuturesApi { * @param opts.limit Maximum number of records to be returned in a single list * @param opts.offset List offset, starting from 0 */ - public async listPositions( - settle: 'btc' | 'usdt', - opts: { holding?: boolean; limit?: number; offset?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/positions'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listPositions(settle: 'btc' | 'usdt', opts: { holding?: boolean, limit?: number, offset?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/positions' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -954,17 +895,18 @@ export class FuturesApi { opts = opts || {}; if (opts.holding !== undefined) { - localVarQueryParameters['holding'] = ObjectSerializer.serialize(opts.holding, 'boolean'); + localVarQueryParameters['holding'] = ObjectSerializer.serialize(opts.holding, "boolean"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -973,26 +915,21 @@ export class FuturesApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Get single position * @param settle Settle currency * @param contract Futures contract */ - public async getPosition( - settle: 'btc' | 'usdt', - contract: string, - ): Promise<{ response: AxiosResponse; body: Position }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/positions/{contract}' - .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) - .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getPosition(settle: 'btc' | 'usdt', contract: string) : Promise<{ response: AxiosResponse; body: Position; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/positions/{contract}' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) + .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1011,6 +948,7 @@ export class FuturesApi { throw new Error('Required parameter contract was null or undefined when calling getPosition.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -1019,28 +957,22 @@ export class FuturesApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'Position', authSettings); + return this.client.request(config, "Position", authSettings); } /** - * + * * @summary Update position margin * @param settle Settle currency * @param contract Futures contract * @param change Margin change. Use positive number to increase margin, negative number otherwise. */ - public async updatePositionMargin( - settle: 'btc' | 'usdt', - contract: string, - change: string, - ): Promise<{ response: AxiosResponse; body: Position }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/positions/{contract}/margin' - .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) - .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async updatePositionMargin(settle: 'btc' | 'usdt', contract: string, change: string) : Promise<{ response: AxiosResponse; body: Position; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/positions/{contract}/margin' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) + .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1064,7 +996,8 @@ export class FuturesApi { throw new Error('Required parameter change was null or undefined when calling updatePositionMargin.'); } - localVarQueryParameters['change'] = ObjectSerializer.serialize(change, 'string'); + localVarQueryParameters['change'] = ObjectSerializer.serialize(change, "string"); + const config: AxiosRequestConfig = { method: 'POST', @@ -1074,11 +1007,11 @@ export class FuturesApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'Position', authSettings); + return this.client.request(config, "Position", authSettings); } /** - * + * * @summary Update position leverage * @param settle Settle currency * @param contract Futures contract @@ -1086,19 +1019,12 @@ export class FuturesApi { * @param opts Optional parameters * @param opts.crossLeverageLimit Cross margin leverage(valid only when `leverage` is 0) */ - public async updatePositionLeverage( - settle: 'btc' | 'usdt', - contract: string, - leverage: string, - opts: { crossLeverageLimit?: string }, - ): Promise<{ response: AxiosResponse; body: Position }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/positions/{contract}/leverage' - .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) - .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async updatePositionLeverage(settle: 'btc' | 'usdt', contract: string, leverage: string, opts: { crossLeverageLimit?: string, } ) : Promise<{ response: AxiosResponse; body: Position; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/positions/{contract}/leverage' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) + .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1123,15 +1049,13 @@ export class FuturesApi { } opts = opts || {}; - localVarQueryParameters['leverage'] = ObjectSerializer.serialize(leverage, 'string'); + localVarQueryParameters['leverage'] = ObjectSerializer.serialize(leverage, "string"); if (opts.crossLeverageLimit !== undefined) { - localVarQueryParameters['cross_leverage_limit'] = ObjectSerializer.serialize( - opts.crossLeverageLimit, - 'string', - ); + localVarQueryParameters['cross_leverage_limit'] = ObjectSerializer.serialize(opts.crossLeverageLimit, "string"); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, @@ -1140,28 +1064,22 @@ export class FuturesApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'Position', authSettings); + return this.client.request(config, "Position", authSettings); } /** - * + * * @summary Update position risk limit * @param settle Settle currency * @param contract Futures contract - * @param riskLimit 新的风险限额价值 + * @param riskLimit New Risk Limit Value */ - public async updatePositionRiskLimit( - settle: 'btc' | 'usdt', - contract: string, - riskLimit: string, - ): Promise<{ response: AxiosResponse; body: Position }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/positions/{contract}/risk_limit' - .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) - .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async updatePositionRiskLimit(settle: 'btc' | 'usdt', contract: string, riskLimit: string) : Promise<{ response: AxiosResponse; body: Position; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/positions/{contract}/risk_limit' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) + .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1185,7 +1103,8 @@ export class FuturesApi { throw new Error('Required parameter riskLimit was null or undefined when calling updatePositionRiskLimit.'); } - localVarQueryParameters['risk_limit'] = ObjectSerializer.serialize(riskLimit, 'string'); + localVarQueryParameters['risk_limit'] = ObjectSerializer.serialize(riskLimit, "string"); + const config: AxiosRequestConfig = { method: 'POST', @@ -1195,7 +1114,7 @@ export class FuturesApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'Position', authSettings); + return this.client.request(config, "Position", authSettings); } /** @@ -1204,15 +1123,11 @@ export class FuturesApi { * @param settle Settle currency * @param dualMode Whether to enable dual mode */ - public async setDualMode( - settle: 'btc' | 'usdt', - dualMode: boolean, - ): Promise<{ response: AxiosResponse; body: FuturesAccount }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/dual_mode'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async setDualMode(settle: 'btc' | 'usdt', dualMode: boolean) : Promise<{ response: AxiosResponse; body: FuturesAccount; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/dual_mode' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1231,7 +1146,8 @@ export class FuturesApi { throw new Error('Required parameter dualMode was null or undefined when calling setDualMode.'); } - localVarQueryParameters['dual_mode'] = ObjectSerializer.serialize(dualMode, 'boolean'); + localVarQueryParameters['dual_mode'] = ObjectSerializer.serialize(dualMode, "boolean"); + const config: AxiosRequestConfig = { method: 'POST', @@ -1241,26 +1157,21 @@ export class FuturesApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'FuturesAccount', authSettings); + return this.client.request(config, "FuturesAccount", authSettings); } /** - * + * * @summary Retrieve position detail in dual mode * @param settle Settle currency * @param contract Futures contract */ - public async getDualModePosition( - settle: 'btc' | 'usdt', - contract: string, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/dual_comp/positions/{contract}' - .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) - .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getDualModePosition(settle: 'btc' | 'usdt', contract: string) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/dual_comp/positions/{contract}' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) + .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1279,6 +1190,7 @@ export class FuturesApi { throw new Error('Required parameter contract was null or undefined when calling getDualModePosition.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -1287,30 +1199,23 @@ export class FuturesApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Update position margin in dual mode * @param settle Settle currency * @param contract Futures contract * @param change Margin change. Use positive number to increase margin, negative number otherwise. * @param dualSide Long or short position */ - public async updateDualModePositionMargin( - settle: 'btc' | 'usdt', - contract: string, - change: string, - dualSide: string, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/dual_comp/positions/{contract}/margin' - .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) - .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async updateDualModePositionMargin(settle: 'btc' | 'usdt', contract: string, change: string, dualSide: string) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/dual_comp/positions/{contract}/margin' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) + .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1321,35 +1226,28 @@ export class FuturesApi { // verify required parameter 'settle' is not null or undefined if (settle === null || settle === undefined) { - throw new Error( - 'Required parameter settle was null or undefined when calling updateDualModePositionMargin.', - ); + throw new Error('Required parameter settle was null or undefined when calling updateDualModePositionMargin.'); } // verify required parameter 'contract' is not null or undefined if (contract === null || contract === undefined) { - throw new Error( - 'Required parameter contract was null or undefined when calling updateDualModePositionMargin.', - ); + throw new Error('Required parameter contract was null or undefined when calling updateDualModePositionMargin.'); } // verify required parameter 'change' is not null or undefined if (change === null || change === undefined) { - throw new Error( - 'Required parameter change was null or undefined when calling updateDualModePositionMargin.', - ); + throw new Error('Required parameter change was null or undefined when calling updateDualModePositionMargin.'); } // verify required parameter 'dualSide' is not null or undefined if (dualSide === null || dualSide === undefined) { - throw new Error( - 'Required parameter dualSide was null or undefined when calling updateDualModePositionMargin.', - ); + throw new Error('Required parameter dualSide was null or undefined when calling updateDualModePositionMargin.'); } - localVarQueryParameters['change'] = ObjectSerializer.serialize(change, 'string'); + localVarQueryParameters['change'] = ObjectSerializer.serialize(change, "string"); + + localVarQueryParameters['dual_side'] = ObjectSerializer.serialize(dualSide, "string"); - localVarQueryParameters['dual_side'] = ObjectSerializer.serialize(dualSide, 'string'); const config: AxiosRequestConfig = { method: 'POST', @@ -1359,11 +1257,11 @@ export class FuturesApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Update position leverage in dual mode * @param settle Settle currency * @param contract Futures contract @@ -1371,19 +1269,12 @@ export class FuturesApi { * @param opts Optional parameters * @param opts.crossLeverageLimit Cross margin leverage(valid only when `leverage` is 0) */ - public async updateDualModePositionLeverage( - settle: 'btc' | 'usdt', - contract: string, - leverage: string, - opts: { crossLeverageLimit?: string }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/dual_comp/positions/{contract}/leverage' - .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) - .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async updateDualModePositionLeverage(settle: 'btc' | 'usdt', contract: string, leverage: string, opts: { crossLeverageLimit?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/dual_comp/positions/{contract}/leverage' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) + .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1394,35 +1285,27 @@ export class FuturesApi { // verify required parameter 'settle' is not null or undefined if (settle === null || settle === undefined) { - throw new Error( - 'Required parameter settle was null or undefined when calling updateDualModePositionLeverage.', - ); + throw new Error('Required parameter settle was null or undefined when calling updateDualModePositionLeverage.'); } // verify required parameter 'contract' is not null or undefined if (contract === null || contract === undefined) { - throw new Error( - 'Required parameter contract was null or undefined when calling updateDualModePositionLeverage.', - ); + throw new Error('Required parameter contract was null or undefined when calling updateDualModePositionLeverage.'); } // verify required parameter 'leverage' is not null or undefined if (leverage === null || leverage === undefined) { - throw new Error( - 'Required parameter leverage was null or undefined when calling updateDualModePositionLeverage.', - ); + throw new Error('Required parameter leverage was null or undefined when calling updateDualModePositionLeverage.'); } opts = opts || {}; - localVarQueryParameters['leverage'] = ObjectSerializer.serialize(leverage, 'string'); + localVarQueryParameters['leverage'] = ObjectSerializer.serialize(leverage, "string"); if (opts.crossLeverageLimit !== undefined) { - localVarQueryParameters['cross_leverage_limit'] = ObjectSerializer.serialize( - opts.crossLeverageLimit, - 'string', - ); + localVarQueryParameters['cross_leverage_limit'] = ObjectSerializer.serialize(opts.crossLeverageLimit, "string"); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, @@ -1431,28 +1314,22 @@ export class FuturesApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Update position risk limit in dual mode * @param settle Settle currency * @param contract Futures contract - * @param riskLimit 新的风险限额价值 + * @param riskLimit New Risk Limit Value */ - public async updateDualModePositionRiskLimit( - settle: 'btc' | 'usdt', - contract: string, - riskLimit: string, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/dual_comp/positions/{contract}/risk_limit' - .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) - .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async updateDualModePositionRiskLimit(settle: 'btc' | 'usdt', contract: string, riskLimit: string) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/dual_comp/positions/{contract}/risk_limit' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) + .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1463,26 +1340,21 @@ export class FuturesApi { // verify required parameter 'settle' is not null or undefined if (settle === null || settle === undefined) { - throw new Error( - 'Required parameter settle was null or undefined when calling updateDualModePositionRiskLimit.', - ); + throw new Error('Required parameter settle was null or undefined when calling updateDualModePositionRiskLimit.'); } // verify required parameter 'contract' is not null or undefined if (contract === null || contract === undefined) { - throw new Error( - 'Required parameter contract was null or undefined when calling updateDualModePositionRiskLimit.', - ); + throw new Error('Required parameter contract was null or undefined when calling updateDualModePositionRiskLimit.'); } // verify required parameter 'riskLimit' is not null or undefined if (riskLimit === null || riskLimit === undefined) { - throw new Error( - 'Required parameter riskLimit was null or undefined when calling updateDualModePositionRiskLimit.', - ); + throw new Error('Required parameter riskLimit was null or undefined when calling updateDualModePositionRiskLimit.'); } - localVarQueryParameters['risk_limit'] = ObjectSerializer.serialize(riskLimit, 'string'); + localVarQueryParameters['risk_limit'] = ObjectSerializer.serialize(riskLimit, "string"); + const config: AxiosRequestConfig = { method: 'POST', @@ -1492,7 +1364,7 @@ export class FuturesApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** @@ -1506,16 +1378,11 @@ export class FuturesApi { * @param opts.offset List offset, starting from 0 * @param opts.lastId Specify list staring point using the `id` of last record in previous list-query results */ - public async listFuturesOrders( - settle: 'btc' | 'usdt', - status: string, - opts: { contract?: string; limit?: number; offset?: number; lastId?: string }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/orders'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listFuturesOrders(settle: 'btc' | 'usdt', status: string, opts: { contract?: string, limit?: number, offset?: number, lastId?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/orders' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1536,23 +1403,24 @@ export class FuturesApi { opts = opts || {}; if (opts.contract !== undefined) { - localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, "string"); } - localVarQueryParameters['status'] = ObjectSerializer.serialize(status, 'string'); + localVarQueryParameters['status'] = ObjectSerializer.serialize(status, "string"); if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } if (opts.lastId !== undefined) { - localVarQueryParameters['last_id'] = ObjectSerializer.serialize(opts.lastId, 'string'); + localVarQueryParameters['last_id'] = ObjectSerializer.serialize(opts.lastId, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -1561,27 +1429,22 @@ export class FuturesApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * - Creating futures orders requires `size`, which is number of contracts instead of currency amount. You can use `quanto_multiplier` in contract detail response to know how much currency 1 size contract represents - Zero-filled order cannot be retrieved 10 minutes after order cancellation. You will get a 404 not found for such orders - Set `reduce_only` to `true` can keep the position from changing side when reducing position size - In single position mode, to close a position, you need to set `size` to 0 and `close` to `true` - In dual position mode, to close one side position, you need to set `auto_size` side, `reduce_only` to true and `size` to 0 - Set `stp_act` to decide the strategy of self-trade prevention. For detailed usage, refer to the `stp_act` parameter in request body + * - Creating futures orders requires `size`, which is number of contracts instead of currency amount. You can use `quanto_multiplier` in contract detail response to know how much currency 1 size contract represents - Zero-filled order cannot be retrieved 10 minutes after order cancellation. You will get a 404 not found for such orders - Set `reduce_only` to `true` can keep the position from changing side when reducing position size - In single position mode, to close a position, you need to set `size` to 0 and `close` to `true` - In dual position mode, to close one side position, you need to set `auto_size` side, `reduce_only` to true and `size` to 0 - Set `stp_act` to decide the strategy of self-trade prevention. For detailed usage, refer to the `stp_act` parameter in request body * @summary Create a futures order * @param settle Settle currency - * @param futuresOrder + * @param futuresOrder * @param opts Optional parameters - * @param opts.xGateExptime 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 + * @param opts.xGateExptime Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected */ - public async createFuturesOrder( - settle: 'btc' | 'usdt', - futuresOrder: FuturesOrder, - opts: { xGateExptime?: number }, - ): Promise<{ response: AxiosResponse; body: FuturesOrder }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/orders'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async createFuturesOrder(settle: 'btc' | 'usdt', futuresOrder: FuturesOrder, opts: { xGateExptime?: number, } ) : Promise<{ response: AxiosResponse; body: FuturesOrder; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/orders' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1602,7 +1465,7 @@ export class FuturesApi { opts = opts || {}; if (opts.xGateExptime !== undefined) { - localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'number'); + localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, "number"); } const config: AxiosRequestConfig = { @@ -1610,11 +1473,11 @@ export class FuturesApi { params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(futuresOrder, 'FuturesOrder'), + data: ObjectSerializer.serialize(futuresOrder, "FuturesOrder") }; const authSettings = ['apiv4']; - return this.client.request(config, 'FuturesOrder', authSettings); + return this.client.request(config, "FuturesOrder", authSettings); } /** @@ -1623,19 +1486,14 @@ export class FuturesApi { * @param settle Settle currency * @param contract Futures contract * @param opts Optional parameters - * @param opts.xGateExptime 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 + * @param opts.xGateExptime Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected * @param opts.side All bids or asks. Both included if not specified */ - public async cancelFuturesOrders( - settle: 'btc' | 'usdt', - contract: string, - opts: { xGateExptime?: number; side?: string }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/orders'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async cancelFuturesOrders(settle: 'btc' | 'usdt', contract: string, opts: { xGateExptime?: number, side?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/orders' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1655,14 +1513,14 @@ export class FuturesApi { } opts = opts || {}; - localVarQueryParameters['contract'] = ObjectSerializer.serialize(contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(contract, "string"); if (opts.side !== undefined) { - localVarQueryParameters['side'] = ObjectSerializer.serialize(opts.side, 'string'); + localVarQueryParameters['side'] = ObjectSerializer.serialize(opts.side, "string"); } if (opts.xGateExptime !== undefined) { - localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'number'); + localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, "number"); } const config: AxiosRequestConfig = { @@ -1673,11 +1531,11 @@ export class FuturesApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary List Futures Orders By Time Range * @param settle Settle currency * @param opts Optional parameters @@ -1687,15 +1545,11 @@ export class FuturesApi { * @param opts.limit Maximum number of records to be returned in a single list * @param opts.offset List offset, starting from 0 */ - public async getOrdersWithTimeRange( - settle: 'btc' | 'usdt', - opts: { contract?: string; from?: number; to?: number; limit?: number; offset?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/orders_timerange'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getOrdersWithTimeRange(settle: 'btc' | 'usdt', opts: { contract?: string, from?: number, to?: number, limit?: number, offset?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/orders_timerange' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1711,25 +1565,26 @@ export class FuturesApi { opts = opts || {}; if (opts.contract !== undefined) { - localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, "string"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -1738,27 +1593,22 @@ export class FuturesApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** * - 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 * @summary Create a batch of futures orders * @param settle Settle currency - * @param futuresOrder + * @param futuresOrder * @param opts Optional parameters - * @param opts.xGateExptime 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 + * @param opts.xGateExptime Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected */ - public async createBatchFuturesOrder( - settle: 'btc' | 'usdt', - futuresOrder: Array, - opts: { xGateExptime?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/batch_orders'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async createBatchFuturesOrder(settle: 'btc' | 'usdt', futuresOrder: Array, opts: { xGateExptime?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/batch_orders' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1774,14 +1624,12 @@ export class FuturesApi { // verify required parameter 'futuresOrder' is not null or undefined if (futuresOrder === null || futuresOrder === undefined) { - throw new Error( - 'Required parameter futuresOrder was null or undefined when calling createBatchFuturesOrder.', - ); + throw new Error('Required parameter futuresOrder was null or undefined when calling createBatchFuturesOrder.'); } opts = opts || {}; if (opts.xGateExptime !== undefined) { - localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'number'); + localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, "number"); } const config: AxiosRequestConfig = { @@ -1789,30 +1637,25 @@ export class FuturesApi { params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(futuresOrder, 'Array'), + data: ObjectSerializer.serialize(futuresOrder, "Array") }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * - Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. + * - Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported. * @summary Get a single order * @param settle Settle currency * @param orderId 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. */ - public async getFuturesOrder( - settle: 'btc' | 'usdt', - orderId: string, - ): Promise<{ response: AxiosResponse; body: FuturesOrder }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/orders/{order_id}' - .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) - .replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getFuturesOrder(settle: 'btc' | 'usdt', orderId: string) : Promise<{ response: AxiosResponse; body: FuturesOrder; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/orders/{order_id}' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) + .replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1831,6 +1674,7 @@ export class FuturesApi { throw new Error('Required parameter orderId was null or undefined when calling getFuturesOrder.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -1839,31 +1683,24 @@ export class FuturesApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'FuturesOrder', authSettings); + return this.client.request(config, "FuturesOrder", authSettings); } /** - * + * * @summary Amend an order * @param settle Settle currency * @param orderId 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. - * @param futuresOrderAmendment + * @param futuresOrderAmendment * @param opts Optional parameters - * @param opts.xGateExptime 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 + * @param opts.xGateExptime Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected */ - public async amendFuturesOrder( - settle: 'btc' | 'usdt', - orderId: string, - futuresOrderAmendment: FuturesOrderAmendment, - opts: { xGateExptime?: number }, - ): Promise<{ response: AxiosResponse; body: FuturesOrder }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/orders/{order_id}' - .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) - .replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async amendFuturesOrder(settle: 'btc' | 'usdt', orderId: string, futuresOrderAmendment: FuturesOrderAmendment, opts: { xGateExptime?: number, } ) : Promise<{ response: AxiosResponse; body: FuturesOrder; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/orders/{order_id}' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) + .replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1884,14 +1721,12 @@ export class FuturesApi { // verify required parameter 'futuresOrderAmendment' is not null or undefined if (futuresOrderAmendment === null || futuresOrderAmendment === undefined) { - throw new Error( - 'Required parameter futuresOrderAmendment was null or undefined when calling amendFuturesOrder.', - ); + throw new Error('Required parameter futuresOrderAmendment was null or undefined when calling amendFuturesOrder.'); } opts = opts || {}; if (opts.xGateExptime !== undefined) { - localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'number'); + localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, "number"); } const config: AxiosRequestConfig = { @@ -1899,33 +1734,27 @@ export class FuturesApi { params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(futuresOrderAmendment, 'FuturesOrderAmendment'), + data: ObjectSerializer.serialize(futuresOrderAmendment, "FuturesOrderAmendment") }; const authSettings = ['apiv4']; - return this.client.request(config, 'FuturesOrder', authSettings); + return this.client.request(config, "FuturesOrder", authSettings); } /** - * + * * @summary Cancel a single order * @param settle Settle currency * @param orderId 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. * @param opts Optional parameters - * @param opts.xGateExptime 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 + * @param opts.xGateExptime Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected */ - public async cancelFuturesOrder( - settle: 'btc' | 'usdt', - orderId: string, - opts: { xGateExptime?: number }, - ): Promise<{ response: AxiosResponse; body: FuturesOrder }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/orders/{order_id}' - .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) - .replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async cancelFuturesOrder(settle: 'btc' | 'usdt', orderId: string, opts: { xGateExptime?: number, } ) : Promise<{ response: AxiosResponse; body: FuturesOrder; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/orders/{order_id}' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) + .replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1946,7 +1775,7 @@ export class FuturesApi { opts = opts || {}; if (opts.xGateExptime !== undefined) { - localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'number'); + localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, "number"); } const config: AxiosRequestConfig = { @@ -1957,7 +1786,7 @@ export class FuturesApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'FuturesOrder', authSettings); + return this.client.request(config, "FuturesOrder", authSettings); } /** @@ -1971,15 +1800,11 @@ export class FuturesApi { * @param opts.offset List offset, starting from 0 * @param opts.lastId 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\'. */ - public async getMyTrades( - settle: 'btc' | 'usdt', - opts: { contract?: string; order?: number; limit?: number; offset?: number; lastId?: string }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/my_trades'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getMyTrades(settle: 'btc' | 'usdt', opts: { contract?: string, order?: number, limit?: number, offset?: number, lastId?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/my_trades' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1995,25 +1820,26 @@ export class FuturesApi { opts = opts || {}; if (opts.contract !== undefined) { - localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, "string"); } if (opts.order !== undefined) { - localVarQueryParameters['order'] = ObjectSerializer.serialize(opts.order, 'number'); + localVarQueryParameters['order'] = ObjectSerializer.serialize(opts.order, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } if (opts.lastId !== undefined) { - localVarQueryParameters['last_id'] = ObjectSerializer.serialize(opts.lastId, 'string'); + localVarQueryParameters['last_id'] = ObjectSerializer.serialize(opts.lastId, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -2022,11 +1848,11 @@ export class FuturesApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary List personal trading history by time range * @param settle Settle currency * @param opts Optional parameters @@ -2037,15 +1863,11 @@ export class FuturesApi { * @param opts.offset List offset, starting from 0 * @param opts.role Query role, maker or taker. */ - public async getMyTradesWithTimeRange( - settle: 'btc' | 'usdt', - opts: { contract?: string; from?: number; to?: number; limit?: number; offset?: number; role?: string }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/my_trades_timerange'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getMyTradesWithTimeRange(settle: 'btc' | 'usdt', opts: { contract?: string, from?: number, to?: number, limit?: number, offset?: number, role?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/my_trades_timerange' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -2061,29 +1883,30 @@ export class FuturesApi { opts = opts || {}; if (opts.contract !== undefined) { - localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, "string"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } if (opts.role !== undefined) { - localVarQueryParameters['role'] = ObjectSerializer.serialize(opts.role, 'string'); + localVarQueryParameters['role'] = ObjectSerializer.serialize(opts.role, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -2092,15 +1915,11 @@ export class FuturesApi { }; const authSettings = ['apiv4']; - return this.client.request>( - config, - 'Array', - authSettings, - ); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary List position close history * @param settle Settle currency * @param opts Optional parameters @@ -2112,23 +1931,11 @@ export class FuturesApi { * @param opts.side Query side. long or shot * @param opts.pnl Query profit or loss */ - public async listPositionClose( - settle: 'btc' | 'usdt', - opts: { - contract?: string; - limit?: number; - offset?: number; - from?: number; - to?: number; - side?: string; - pnl?: string; - }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/position_close'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listPositionClose(settle: 'btc' | 'usdt', opts: { contract?: string, limit?: number, offset?: number, from?: number, to?: number, side?: string, pnl?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/position_close' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -2144,33 +1951,34 @@ export class FuturesApi { opts = opts || {}; if (opts.contract !== undefined) { - localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, "string"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.side !== undefined) { - localVarQueryParameters['side'] = ObjectSerializer.serialize(opts.side, 'string'); + localVarQueryParameters['side'] = ObjectSerializer.serialize(opts.side, "string"); } if (opts.pnl !== undefined) { - localVarQueryParameters['pnl'] = ObjectSerializer.serialize(opts.pnl, 'string'); + localVarQueryParameters['pnl'] = ObjectSerializer.serialize(opts.pnl, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -2179,11 +1987,11 @@ export class FuturesApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary List liquidation history * @param settle Settle currency * @param opts Optional parameters @@ -2191,15 +1999,11 @@ export class FuturesApi { * @param opts.limit Maximum number of records to be returned in a single list * @param opts.at Specify a liquidation timestamp */ - public async listLiquidates( - settle: 'btc' | 'usdt', - opts: { contract?: string; limit?: number; at?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/liquidates'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listLiquidates(settle: 'btc' | 'usdt', opts: { contract?: string, limit?: number, at?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/liquidates' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -2215,17 +2019,18 @@ export class FuturesApi { opts = opts || {}; if (opts.contract !== undefined) { - localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, "string"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.at !== undefined) { - localVarQueryParameters['at'] = ObjectSerializer.serialize(opts.at, 'number'); + localVarQueryParameters['at'] = ObjectSerializer.serialize(opts.at, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -2234,11 +2039,11 @@ export class FuturesApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary List Auto-Deleveraging History * @param settle Settle currency * @param opts Optional parameters @@ -2246,15 +2051,11 @@ export class FuturesApi { * @param opts.limit Maximum number of records to be returned in a single list * @param opts.at Specify an auto-deleveraging timestamp */ - public async listAutoDeleverages( - settle: 'btc' | 'usdt', - opts: { contract?: string; limit?: number; at?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/auto_deleverages'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listAutoDeleverages(settle: 'btc' | 'usdt', opts: { contract?: string, limit?: number, at?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/auto_deleverages' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -2270,17 +2071,18 @@ export class FuturesApi { opts = opts || {}; if (opts.contract !== undefined) { - localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, "string"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.at !== undefined) { - localVarQueryParameters['at'] = ObjectSerializer.serialize(opts.at, 'number'); + localVarQueryParameters['at'] = ObjectSerializer.serialize(opts.at, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -2289,24 +2091,20 @@ export class FuturesApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** * 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. * @summary Countdown cancel orders * @param settle Settle currency - * @param countdownCancelAllFuturesTask + * @param countdownCancelAllFuturesTask */ - public async countdownCancelAllFutures( - settle: 'btc' | 'usdt', - countdownCancelAllFuturesTask: CountdownCancelAllFuturesTask, - ): Promise<{ response: AxiosResponse; body: TriggerTime }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/countdown_cancel_all'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async countdownCancelAllFutures(settle: 'btc' | 'usdt', countdownCancelAllFuturesTask: CountdownCancelAllFuturesTask) : Promise<{ response: AxiosResponse; body: TriggerTime; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/countdown_cancel_all' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -2322,39 +2120,34 @@ export class FuturesApi { // verify required parameter 'countdownCancelAllFuturesTask' is not null or undefined if (countdownCancelAllFuturesTask === null || countdownCancelAllFuturesTask === undefined) { - throw new Error( - 'Required parameter countdownCancelAllFuturesTask was null or undefined when calling countdownCancelAllFutures.', - ); + throw new Error('Required parameter countdownCancelAllFuturesTask was null or undefined when calling countdownCancelAllFutures.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(countdownCancelAllFuturesTask, 'CountdownCancelAllFuturesTask'), + data: ObjectSerializer.serialize(countdownCancelAllFuturesTask, "CountdownCancelAllFuturesTask") }; const authSettings = ['apiv4']; - return this.client.request(config, 'TriggerTime', authSettings); + return this.client.request(config, "TriggerTime", authSettings); } /** - * + * * @summary Query user trading fee rates * @param settle Settle currency * @param opts Optional parameters * @param opts.contract Futures contract, return related data only if specified */ - public async getFuturesFee( - settle: 'btc' | 'usdt', - opts: { contract?: string }, - ): Promise<{ response: AxiosResponse; body: { [key: string]: FuturesFee } }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/fee'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getFuturesFee(settle: 'btc' | 'usdt', opts: { contract?: string, } ) : Promise<{ response: AxiosResponse; body: { [key: string]: FuturesFee; }; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/fee' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -2370,9 +2163,10 @@ export class FuturesApi { opts = opts || {}; if (opts.contract !== undefined) { - localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -2381,31 +2175,22 @@ export class FuturesApi { }; const authSettings = ['apiv4']; - return this.client.request<{ [key: string]: FuturesFee }>( - config, - '{ [key: string]: FuturesFee; }', - authSettings, - ); + return this.client.request<{ [key: string]: FuturesFee; }>(config, "{ [key: string]: FuturesFee; }", authSettings); } /** * Multiple distinct order ID list can be specified。Each request can cancel a maximum of 20 records. * @summary Cancel a batch of orders with an ID list * @param settle Settle currency - * @param requestBody + * @param requestBody * @param opts Optional parameters - * @param opts.xGateExptime 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 + * @param opts.xGateExptime Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected */ - public async cancelBatchFutureOrders( - settle: 'btc' | 'usdt', - requestBody: Array, - opts: { xGateExptime?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/batch_cancel_orders'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async cancelBatchFutureOrders(settle: 'btc' | 'usdt', requestBody: Array, opts: { xGateExptime?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/batch_cancel_orders' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -2421,14 +2206,12 @@ export class FuturesApi { // verify required parameter 'requestBody' is not null or undefined if (requestBody === null || requestBody === undefined) { - throw new Error( - 'Required parameter requestBody was null or undefined when calling cancelBatchFutureOrders.', - ); + throw new Error('Required parameter requestBody was null or undefined when calling cancelBatchFutureOrders.'); } opts = opts || {}; if (opts.xGateExptime !== undefined) { - localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'number'); + localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, "number"); } const config: AxiosRequestConfig = { @@ -2436,35 +2219,26 @@ export class FuturesApi { params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(requestBody, 'Array'), + data: ObjectSerializer.serialize(requestBody, "Array") }; const authSettings = ['apiv4']; - return this.client.request>( - config, - 'Array', - authSettings, - ); + return this.client.request>(config, "Array", authSettings); } /** - * 可以指定多个不同的订单id。一次请求最多只能修改 10 个订单 - * @summary 批量修改指定 ID 的订单 + * You can specify multiple different order IDs. You can only modify up to 10 orders in one request. + * @summary Batch modify orders with specified IDs * @param settle Settle currency - * @param batchAmendOrderReq + * @param batchAmendOrderReq * @param opts Optional parameters - * @param opts.xGateExptime 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 + * @param opts.xGateExptime Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected */ - public async amendBatchFutureOrders( - settle: 'btc' | 'usdt', - batchAmendOrderReq: Array, - opts: { xGateExptime?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/batch_amend_orders'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async amendBatchFutureOrders(settle: 'btc' | 'usdt', batchAmendOrderReq: Array, opts: { xGateExptime?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/batch_amend_orders' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -2480,14 +2254,12 @@ export class FuturesApi { // verify required parameter 'batchAmendOrderReq' is not null or undefined if (batchAmendOrderReq === null || batchAmendOrderReq === undefined) { - throw new Error( - 'Required parameter batchAmendOrderReq was null or undefined when calling amendBatchFutureOrders.', - ); + throw new Error('Required parameter batchAmendOrderReq was null or undefined when calling amendBatchFutureOrders.'); } opts = opts || {}; if (opts.xGateExptime !== undefined) { - localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'number'); + localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, "number"); } const config: AxiosRequestConfig = { @@ -2495,15 +2267,15 @@ export class FuturesApi { params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(batchAmendOrderReq, 'Array'), + data: ObjectSerializer.serialize(batchAmendOrderReq, "Array") }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary List all auto orders * @param settle Settle currency * @param status Only list the orders with this status @@ -2512,16 +2284,11 @@ export class FuturesApi { * @param opts.limit Maximum number of records to be returned in a single list * @param opts.offset List offset, starting from 0 */ - public async listPriceTriggeredOrders( - settle: 'btc' | 'usdt', - status: 'open' | 'finished', - opts: { contract?: string; limit?: number; offset?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/price_orders'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listPriceTriggeredOrders(settle: 'btc' | 'usdt', status: 'open' | 'finished', opts: { contract?: string, limit?: number, offset?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/price_orders' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -2544,17 +2311,18 @@ export class FuturesApi { localVarQueryParameters['status'] = ObjectSerializer.serialize(status, "'open' | 'finished'"); if (opts.contract !== undefined) { - localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, "string"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -2563,28 +2331,20 @@ export class FuturesApi { }; const authSettings = ['apiv4']; - return this.client.request>( - config, - 'Array', - authSettings, - ); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Create a price-triggered order * @param settle Settle currency - * @param futuresPriceTriggeredOrder + * @param futuresPriceTriggeredOrder */ - public async createPriceTriggeredOrder( - settle: 'btc' | 'usdt', - futuresPriceTriggeredOrder: FuturesPriceTriggeredOrder, - ): Promise<{ response: AxiosResponse; body: TriggerOrderResponse }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/price_orders'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async createPriceTriggeredOrder(settle: 'btc' | 'usdt', futuresPriceTriggeredOrder: FuturesPriceTriggeredOrder) : Promise<{ response: AxiosResponse; body: TriggerOrderResponse; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/price_orders' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -2600,39 +2360,34 @@ export class FuturesApi { // verify required parameter 'futuresPriceTriggeredOrder' is not null or undefined if (futuresPriceTriggeredOrder === null || futuresPriceTriggeredOrder === undefined) { - throw new Error( - 'Required parameter futuresPriceTriggeredOrder was null or undefined when calling createPriceTriggeredOrder.', - ); + throw new Error('Required parameter futuresPriceTriggeredOrder was null or undefined when calling createPriceTriggeredOrder.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(futuresPriceTriggeredOrder, 'FuturesPriceTriggeredOrder'), + data: ObjectSerializer.serialize(futuresPriceTriggeredOrder, "FuturesPriceTriggeredOrder") }; const authSettings = ['apiv4']; - return this.client.request(config, 'TriggerOrderResponse', authSettings); + return this.client.request(config, "TriggerOrderResponse", authSettings); } /** - * + * * @summary Cancel all open orders * @param settle Settle currency * @param opts Optional parameters * @param opts.contract Futures contract, return related data only if specified */ - public async cancelPriceTriggeredOrderList( - settle: 'btc' | 'usdt', - opts: { contract?: string }, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/price_orders'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async cancelPriceTriggeredOrderList(settle: 'btc' | 'usdt', opts: { contract?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/price_orders' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -2643,16 +2398,15 @@ export class FuturesApi { // verify required parameter 'settle' is not null or undefined if (settle === null || settle === undefined) { - throw new Error( - 'Required parameter settle was null or undefined when calling cancelPriceTriggeredOrderList.', - ); + throw new Error('Required parameter settle was null or undefined when calling cancelPriceTriggeredOrderList.'); } opts = opts || {}; if (opts.contract !== undefined) { - localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, "string"); } + const config: AxiosRequestConfig = { method: 'DELETE', params: localVarQueryParameters, @@ -2661,30 +2415,21 @@ export class FuturesApi { }; const authSettings = ['apiv4']; - return this.client.request>( - config, - 'Array', - authSettings, - ); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Get a price-triggered order * @param settle Settle currency * @param orderId Retrieve the data of the order with the specified ID */ - public async getPriceTriggeredOrder( - settle: 'btc' | 'usdt', - orderId: string, - ): Promise<{ response: AxiosResponse; body: FuturesPriceTriggeredOrder }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/price_orders/{order_id}' - .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) - .replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getPriceTriggeredOrder(settle: 'btc' | 'usdt', orderId: string) : Promise<{ response: AxiosResponse; body: FuturesPriceTriggeredOrder; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/price_orders/{order_id}' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) + .replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -2703,6 +2448,7 @@ export class FuturesApi { throw new Error('Required parameter orderId was null or undefined when calling getPriceTriggeredOrder.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -2711,26 +2457,21 @@ export class FuturesApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'FuturesPriceTriggeredOrder', authSettings); + return this.client.request(config, "FuturesPriceTriggeredOrder", authSettings); } /** - * + * * @summary cancel a price-triggered order * @param settle Settle currency * @param orderId Retrieve the data of the order with the specified ID */ - public async cancelPriceTriggeredOrder( - settle: 'btc' | 'usdt', - orderId: string, - ): Promise<{ response: AxiosResponse; body: FuturesPriceTriggeredOrder }> { - const localVarPath = - this.client.basePath + - '/futures/{settle}/price_orders/{order_id}' - .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) - .replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async cancelPriceTriggeredOrder(settle: 'btc' | 'usdt', orderId: string) : Promise<{ response: AxiosResponse; body: FuturesPriceTriggeredOrder; }> { + const localVarPath = this.client.basePath + '/futures/{settle}/price_orders/{order_id}' + .replace('{' + 'settle' + '}', encodeURIComponent(String(settle))) + .replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -2749,6 +2490,7 @@ export class FuturesApi { throw new Error('Required parameter orderId was null or undefined when calling cancelPriceTriggeredOrder.'); } + const config: AxiosRequestConfig = { method: 'DELETE', params: localVarQueryParameters, @@ -2757,6 +2499,6 @@ export class FuturesApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'FuturesPriceTriggeredOrder', authSettings); + return this.client.request(config, "FuturesPriceTriggeredOrder", authSettings); } } diff --git a/api/marginApi.ts b/api/marginApi.ts index aa69372..c161f66 100644 --- a/api/marginApi.ts +++ b/api/marginApi.ts @@ -9,6 +9,7 @@ * Do not edit the class manually. */ + /* tslint:disable:no-unused-locals */ import { AutoRepaySetting } from '../model/autoRepaySetting'; import { CrossMarginAccount } from '../model/crossMarginAccount'; @@ -44,17 +45,15 @@ export class MarginApi { } /** - * + * * @summary Margin account list * @param opts Optional parameters * @param opts.currencyPair Currency pair */ - public async listMarginAccounts(opts: { - currencyPair?: string; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listMarginAccounts(opts: { currencyPair?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/margin/accounts'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -65,9 +64,10 @@ export class MarginApi { opts = opts || {}; if (opts.currencyPair !== undefined) { - localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, 'string'); + localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -76,7 +76,7 @@ export class MarginApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** @@ -91,18 +91,10 @@ export class MarginApi { * @param opts.page Page number * @param opts.limit Maximum number of records to be returned in a single list */ - public async listMarginAccountBook(opts: { - currency?: string; - currencyPair?: string; - type?: string; - from?: number; - to?: number; - page?: number; - limit?: number; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listMarginAccountBook(opts: { currency?: string, currencyPair?: string, type?: string, from?: number, to?: number, page?: number, limit?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/margin/account_book'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -113,33 +105,34 @@ export class MarginApi { opts = opts || {}; if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, "string"); } if (opts.currencyPair !== undefined) { - localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, 'string'); + localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, "string"); } if (opts.type !== undefined) { - localVarQueryParameters['type'] = ObjectSerializer.serialize(opts.type, 'string'); + localVarQueryParameters['type'] = ObjectSerializer.serialize(opts.type, "string"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -148,21 +141,19 @@ export class MarginApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Funding account list * @param opts Optional parameters * @param opts.currency Retrieve data of the specified currency */ - public async listFundingAccounts(opts: { - currency?: string; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listFundingAccounts(opts: { currency?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/margin/funding_accounts'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -173,9 +164,10 @@ export class MarginApi { opts = opts || {}; if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -184,17 +176,17 @@ export class MarginApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Retrieve user auto repayment setting */ - public async getAutoRepayStatus(): Promise<{ response: AxiosResponse; body: AutoRepaySetting }> { + public async getAutoRepayStatus() : Promise<{ response: AxiosResponse; body: AutoRepaySetting; }> { const localVarPath = this.client.basePath + '/margin/auto_repay'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -203,6 +195,7 @@ export class MarginApi { localVarHeaderParams.Accept = produces.join(','); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -211,18 +204,18 @@ export class MarginApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'AutoRepaySetting', authSettings); + return this.client.request(config, "AutoRepaySetting", authSettings); } /** - * + * * @summary Update user\'s auto repayment setting * @param status New auto repayment status. `on` - enabled, `off` - disabled */ - public async setAutoRepay(status: string): Promise<{ response: AxiosResponse; body: AutoRepaySetting }> { + public async setAutoRepay(status: string) : Promise<{ response: AxiosResponse; body: AutoRepaySetting; }> { const localVarPath = this.client.basePath + '/margin/auto_repay'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -236,7 +229,8 @@ export class MarginApi { throw new Error('Required parameter status was null or undefined when calling setAutoRepay.'); } - localVarQueryParameters['status'] = ObjectSerializer.serialize(status, 'string'); + localVarQueryParameters['status'] = ObjectSerializer.serialize(status, "string"); + const config: AxiosRequestConfig = { method: 'POST', @@ -246,23 +240,20 @@ export class MarginApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'AutoRepaySetting', authSettings); + return this.client.request(config, "AutoRepaySetting", authSettings); } /** - * + * * @summary Get the max transferable amount for a specific margin currency * @param currency Retrieve data of the specified currency * @param opts Optional parameters * @param opts.currencyPair Currency pair */ - public async getMarginTransferable( - currency: string, - opts: { currencyPair?: string }, - ): Promise<{ response: AxiosResponse; body: MarginTransferable }> { + public async getMarginTransferable(currency: string, opts: { currencyPair?: string, } ) : Promise<{ response: AxiosResponse; body: MarginTransferable; }> { const localVarPath = this.client.basePath + '/margin/transferable'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -277,12 +268,13 @@ export class MarginApi { } opts = opts || {}; - localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, "string"); if (opts.currencyPair !== undefined) { - localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, 'string'); + localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -291,17 +283,17 @@ export class MarginApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'MarginTransferable', authSettings); + return this.client.request(config, "MarginTransferable", authSettings); } /** - * - * @summary Currencies supported by cross margin. + * + * @summary Currencies supported by cross margin.(deprecated) */ - public async listCrossMarginCurrencies(): Promise<{ response: AxiosResponse; body: Array }> { + public async listCrossMarginCurrencies() : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/margin/cross/currencies'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -310,6 +302,7 @@ export class MarginApi { localVarHeaderParams.Accept = produces.join(','); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -318,22 +311,19 @@ export class MarginApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * - * @summary Retrieve detail of one single currency supported by cross margin + * + * @summary Retrieve detail of one single currency supported by cross margin. (deprecated) * @param currency Currency name */ - public async getCrossMarginCurrency( - currency: string, - ): Promise<{ response: AxiosResponse; body: CrossMarginCurrency }> { - const localVarPath = - this.client.basePath + - '/margin/cross/currencies/{currency}'.replace('{' + 'currency' + '}', encodeURIComponent(String(currency))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getCrossMarginCurrency(currency: string) : Promise<{ response: AxiosResponse; body: CrossMarginCurrency; }> { + const localVarPath = this.client.basePath + '/margin/cross/currencies/{currency}' + .replace('{' + 'currency' + '}', encodeURIComponent(String(currency))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -347,6 +337,7 @@ export class MarginApi { throw new Error('Required parameter currency was null or undefined when calling getCrossMarginCurrency.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -355,17 +346,17 @@ export class MarginApi { }; const authSettings = []; - return this.client.request(config, 'CrossMarginCurrency', authSettings); + return this.client.request(config, "CrossMarginCurrency", authSettings); } /** - * - * @summary Retrieve cross margin account + * + * @summary Retrieve cross margin account. (deprecated) */ - public async getCrossMarginAccount(): Promise<{ response: AxiosResponse; body: CrossMarginAccount }> { + public async getCrossMarginAccount() : Promise<{ response: AxiosResponse; body: CrossMarginAccount; }> { const localVarPath = this.client.basePath + '/margin/cross/accounts'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -374,6 +365,7 @@ export class MarginApi { localVarHeaderParams.Accept = produces.join(','); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -382,12 +374,12 @@ export class MarginApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'CrossMarginAccount', authSettings); + return this.client.request(config, "CrossMarginAccount", authSettings); } /** - * 记录查询时间范围不允许超过 30 天。 使用 limit&page分页功能检索数据时最大分页数量为100,000条,即 (limit * page - 1) <= 100000。 - * @summary Retrieve cross margin account change history + * 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. + * @summary Retrieve cross margin account change history. (deprecated) * @param opts Optional parameters * @param opts.currency Filter by currency * @param opts.from Start timestamp of the query @@ -396,17 +388,10 @@ export class MarginApi { * @param opts.limit Maximum number of records to be returned in a single list * @param opts.type Only retrieve changes of the specified type. All types will be returned if not specified. */ - public async listCrossMarginAccountBook(opts: { - currency?: string; - from?: number; - to?: number; - page?: number; - limit?: number; - type?: string; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listCrossMarginAccountBook(opts: { currency?: string, from?: number, to?: number, page?: number, limit?: number, type?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/margin/cross/account_book'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -417,29 +402,30 @@ export class MarginApi { opts = opts || {}; if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, "string"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.type !== undefined) { - localVarQueryParameters['type'] = ObjectSerializer.serialize(opts.type, 'string'); + localVarQueryParameters['type'] = ObjectSerializer.serialize(opts.type, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -448,16 +434,12 @@ export class MarginApi { }; const authSettings = ['apiv4']; - return this.client.request>( - config, - 'Array', - authSettings, - ); + return this.client.request>(config, "Array", authSettings); } /** * Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. - * @summary List cross margin borrow history + * @summary List cross margin borrow history. (deprecated) * @param status Filter by status. Supported values are 2 and 3. (deprecated.) * @param opts Optional parameters * @param opts.currency Filter by currency @@ -465,13 +447,10 @@ export class MarginApi { * @param opts.offset List offset, starting from 0 * @param opts.reverse Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results */ - public async listCrossMarginLoans( - status: number, - opts: { currency?: string; limit?: number; offset?: number; reverse?: boolean }, - ): Promise<{ response: AxiosResponse; body: Array }> { + public async listCrossMarginLoans(status: number, opts: { currency?: string, limit?: number, offset?: number, reverse?: boolean, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/margin/cross/loans'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -486,24 +465,25 @@ export class MarginApi { } opts = opts || {}; - localVarQueryParameters['status'] = ObjectSerializer.serialize(status, 'number'); + localVarQueryParameters['status'] = ObjectSerializer.serialize(status, "number"); if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, "string"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } if (opts.reverse !== undefined) { - localVarQueryParameters['reverse'] = ObjectSerializer.serialize(opts.reverse, 'boolean'); + localVarQueryParameters['reverse'] = ObjectSerializer.serialize(opts.reverse, "boolean"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -512,20 +492,18 @@ export class MarginApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** * Borrow amount cannot be less than currency minimum borrow amount - * @summary Create a cross margin borrow loan - * @param crossMarginLoan + * @summary Create a cross margin borrow loan. (deprecated) + * @param crossMarginLoan */ - public async createCrossMarginLoan( - crossMarginLoan: CrossMarginLoan, - ): Promise<{ response: AxiosResponse; body: CrossMarginLoan }> { + public async createCrossMarginLoan(crossMarginLoan: CrossMarginLoan) : Promise<{ response: AxiosResponse; body: CrossMarginLoan; }> { const localVarPath = this.client.basePath + '/margin/cross/loans'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -536,34 +514,32 @@ export class MarginApi { // verify required parameter 'crossMarginLoan' is not null or undefined if (crossMarginLoan === null || crossMarginLoan === undefined) { - throw new Error( - 'Required parameter crossMarginLoan was null or undefined when calling createCrossMarginLoan.', - ); + throw new Error('Required parameter crossMarginLoan was null or undefined when calling createCrossMarginLoan.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(crossMarginLoan, 'CrossMarginLoan'), + data: ObjectSerializer.serialize(crossMarginLoan, "CrossMarginLoan") }; const authSettings = ['apiv4']; - return this.client.request(config, 'CrossMarginLoan', authSettings); + return this.client.request(config, "CrossMarginLoan", authSettings); } /** - * - * @summary Retrieve single borrow loan detail + * + * @summary Retrieve single borrow loan detail. (deprecated) * @param loanId Borrow loan ID */ - public async getCrossMarginLoan(loanId: string): Promise<{ response: AxiosResponse; body: CrossMarginLoan }> { - const localVarPath = - this.client.basePath + - '/margin/cross/loans/{loan_id}'.replace('{' + 'loan_id' + '}', encodeURIComponent(String(loanId))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getCrossMarginLoan(loanId: string) : Promise<{ response: AxiosResponse; body: CrossMarginLoan; }> { + const localVarPath = this.client.basePath + '/margin/cross/loans/{loan_id}' + .replace('{' + 'loan_id' + '}', encodeURIComponent(String(loanId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -577,6 +553,7 @@ export class MarginApi { throw new Error('Required parameter loanId was null or undefined when calling getCrossMarginLoan.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -585,29 +562,23 @@ export class MarginApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'CrossMarginLoan', authSettings); + return this.client.request(config, "CrossMarginLoan", authSettings); } /** * Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. - * @summary Retrieve cross margin repayments + * @summary Retrieve cross margin repayments. (deprecated) * @param opts Optional parameters - * @param opts.currency - * @param opts.loanId + * @param opts.currency + * @param opts.loanId * @param opts.limit Maximum number of records to be returned in a single list * @param opts.offset List offset, starting from 0 * @param opts.reverse Whether to sort in descending order, which is the default. Set `reverse=false` to return ascending results */ - public async listCrossMarginRepayments(opts: { - currency?: string; - loanId?: string; - limit?: number; - offset?: number; - reverse?: boolean; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listCrossMarginRepayments(opts: { currency?: string, loanId?: string, limit?: number, offset?: number, reverse?: boolean, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/margin/cross/repayments'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -618,25 +589,26 @@ export class MarginApi { opts = opts || {}; if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, "string"); } if (opts.loanId !== undefined) { - localVarQueryParameters['loan_id'] = ObjectSerializer.serialize(opts.loanId, 'string'); + localVarQueryParameters['loan_id'] = ObjectSerializer.serialize(opts.loanId, "string"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } if (opts.reverse !== undefined) { - localVarQueryParameters['reverse'] = ObjectSerializer.serialize(opts.reverse, 'boolean'); + localVarQueryParameters['reverse'] = ObjectSerializer.serialize(opts.reverse, "boolean"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -645,20 +617,18 @@ export class MarginApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** * 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 - * @summary Cross margin repayments - * @param crossMarginRepayRequest + * @summary Cross margin repayments. (deprecated) + * @param crossMarginRepayRequest */ - public async repayCrossMarginLoan( - crossMarginRepayRequest: CrossMarginRepayRequest, - ): Promise<{ response: AxiosResponse; body: Array }> { + public async repayCrossMarginLoan(crossMarginRepayRequest: CrossMarginRepayRequest) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/margin/cross/repayments'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -669,26 +639,25 @@ export class MarginApi { // verify required parameter 'crossMarginRepayRequest' is not null or undefined if (crossMarginRepayRequest === null || crossMarginRepayRequest === undefined) { - throw new Error( - 'Required parameter crossMarginRepayRequest was null or undefined when calling repayCrossMarginLoan.', - ); + throw new Error('Required parameter crossMarginRepayRequest was null or undefined when calling repayCrossMarginLoan.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(crossMarginRepayRequest, 'CrossMarginRepayRequest'), + data: ObjectSerializer.serialize(crossMarginRepayRequest, "CrossMarginRepayRequest") }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * - * @summary Interest records for the cross margin account + * + * @summary Interest records for the cross margin account. (deprecated) * @param opts Optional parameters * @param opts.currency Retrieve data of the specified currency * @param opts.page Page number @@ -696,16 +665,10 @@ export class MarginApi { * @param opts.from Start timestamp * @param opts.to End timestamp */ - public async getCrossMarginInterestRecords(opts: { - currency?: string; - page?: number; - limit?: number; - from?: number; - to?: number; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async getCrossMarginInterestRecords(opts: { currency?: string, page?: number, limit?: number, from?: number, to?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/margin/cross/interest_records'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -716,25 +679,26 @@ export class MarginApi { opts = opts || {}; if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, "string"); } if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -743,20 +707,18 @@ export class MarginApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * - * @summary Get the max transferable amount for a specific cross margin currency + * + * @summary Get the max transferable amount for a specific cross margin currency. (deprecated) * @param currency Retrieve data of the specified currency */ - public async getCrossMarginTransferable( - currency: string, - ): Promise<{ response: AxiosResponse; body: CrossMarginTransferable }> { + public async getCrossMarginTransferable(currency: string) : Promise<{ response: AxiosResponse; body: CrossMarginTransferable; }> { const localVarPath = this.client.basePath + '/margin/cross/transferable'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -767,12 +729,11 @@ export class MarginApi { // verify required parameter 'currency' is not null or undefined if (currency === null || currency === undefined) { - throw new Error( - 'Required parameter currency was null or undefined when calling getCrossMarginTransferable.', - ); + throw new Error('Required parameter currency was null or undefined when calling getCrossMarginTransferable.'); } - localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, "string"); + const config: AxiosRequestConfig = { method: 'GET', @@ -782,20 +743,18 @@ export class MarginApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'CrossMarginTransferable', authSettings); + return this.client.request(config, "CrossMarginTransferable", authSettings); } /** * 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. - * @summary Estimated interest rates + * @summary Estimated interest rates. (deprecated) * @param currencies An array of up to 10 specifying the currency name */ - public async getCrossMarginEstimateRate( - currencies: Array, - ): Promise<{ response: AxiosResponse; body: { [key: string]: string } }> { + public async getCrossMarginEstimateRate(currencies: Array) : Promise<{ response: AxiosResponse; body: { [key: string]: string; }; }> { const localVarPath = this.client.basePath + '/margin/cross/estimate_rate'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -806,12 +765,11 @@ export class MarginApi { // verify required parameter 'currencies' is not null or undefined if (currencies === null || currencies === undefined) { - throw new Error( - 'Required parameter currencies was null or undefined when calling getCrossMarginEstimateRate.', - ); + throw new Error('Required parameter currencies was null or undefined when calling getCrossMarginEstimateRate.'); } - localVarQueryParameters['currencies'] = ObjectSerializer.serialize(currencies, 'Array'); + localVarQueryParameters['currencies'] = ObjectSerializer.serialize(currencies, "Array"); + const config: AxiosRequestConfig = { method: 'GET', @@ -821,20 +779,18 @@ export class MarginApi { }; const authSettings = ['apiv4']; - return this.client.request<{ [key: string]: string }>(config, '{ [key: string]: string; }', authSettings); + return this.client.request<{ [key: string]: string; }>(config, "{ [key: string]: string; }", authSettings); } /** - * - * @summary Get the max borrowable amount for a specific cross margin currency + * + * @summary Get the max borrowable amount for a specific cross margin currency. (deprecated) * @param currency Retrieve data of the specified currency */ - public async getCrossMarginBorrowable( - currency: string, - ): Promise<{ response: AxiosResponse; body: UnifiedBorrowable }> { + public async getCrossMarginBorrowable(currency: string) : Promise<{ response: AxiosResponse; body: UnifiedBorrowable; }> { const localVarPath = this.client.basePath + '/margin/cross/borrowable'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -848,7 +804,8 @@ export class MarginApi { throw new Error('Required parameter currency was null or undefined when calling getCrossMarginBorrowable.'); } - localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, "string"); + const config: AxiosRequestConfig = { method: 'GET', @@ -858,6 +815,6 @@ export class MarginApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'UnifiedBorrowable', authSettings); + return this.client.request(config, "UnifiedBorrowable", authSettings); } } diff --git a/api/marginUniApi.ts b/api/marginUniApi.ts index 36c827e..0fb4be8 100644 --- a/api/marginUniApi.ts +++ b/api/marginUniApi.ts @@ -9,6 +9,7 @@ * Do not edit the class manually. */ + /* tslint:disable:no-unused-locals */ import { CreateUniLoan } from '../model/createUniLoan'; import { MaxUniBorrowable } from '../model/maxUniBorrowable'; @@ -36,13 +37,13 @@ export class MarginUniApi { } /** - * + * * @summary List lending markets */ - public async listUniCurrencyPairs(): Promise<{ response: AxiosResponse; body: Array }> { + public async listUniCurrencyPairs() : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/margin/uni/currency_pairs'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -51,6 +52,7 @@ export class MarginUniApi { localVarHeaderParams.Accept = produces.join(','); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -59,23 +61,19 @@ export class MarginUniApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Get detail of lending market * @param currencyPair Currency pair */ - public async getUniCurrencyPair(currencyPair: string): Promise<{ response: AxiosResponse; body: UniCurrencyPair }> { - const localVarPath = - this.client.basePath + - '/margin/uni/currency_pairs/{currency_pair}'.replace( - '{' + 'currency_pair' + '}', - encodeURIComponent(String(currencyPair)), - ); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getUniCurrencyPair(currencyPair: string) : Promise<{ response: AxiosResponse; body: UniCurrencyPair; }> { + const localVarPath = this.client.basePath + '/margin/uni/currency_pairs/{currency_pair}' + .replace('{' + 'currency_pair' + '}', encodeURIComponent(String(currencyPair))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -89,6 +87,7 @@ export class MarginUniApi { throw new Error('Required parameter currencyPair was null or undefined when calling getUniCurrencyPair.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -97,7 +96,7 @@ export class MarginUniApi { }; const authSettings = []; - return this.client.request(config, 'UniCurrencyPair', authSettings); + return this.client.request(config, "UniCurrencyPair", authSettings); } /** @@ -105,12 +104,10 @@ export class MarginUniApi { * @summary Estimate interest Rate * @param currencies An array of up to 10 specifying the currency name */ - public async getMarginUniEstimateRate( - currencies: Array, - ): Promise<{ response: AxiosResponse; body: { [key: string]: string } }> { + public async getMarginUniEstimateRate(currencies: Array) : Promise<{ response: AxiosResponse; body: { [key: string]: string; }; }> { const localVarPath = this.client.basePath + '/margin/uni/estimate_rate'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -121,12 +118,11 @@ export class MarginUniApi { // verify required parameter 'currencies' is not null or undefined if (currencies === null || currencies === undefined) { - throw new Error( - 'Required parameter currencies was null or undefined when calling getMarginUniEstimateRate.', - ); + throw new Error('Required parameter currencies was null or undefined when calling getMarginUniEstimateRate.'); } - localVarQueryParameters['currencies'] = ObjectSerializer.serialize(currencies, 'Array'); + localVarQueryParameters['currencies'] = ObjectSerializer.serialize(currencies, "Array"); + const config: AxiosRequestConfig = { method: 'GET', @@ -136,11 +132,11 @@ export class MarginUniApi { }; const authSettings = ['apiv4']; - return this.client.request<{ [key: string]: string }>(config, '{ [key: string]: string; }', authSettings); + return this.client.request<{ [key: string]: string; }>(config, "{ [key: string]: string; }", authSettings); } /** - * + * * @summary List loans * @param opts Optional parameters * @param opts.currencyPair Currency pair @@ -148,15 +144,10 @@ export class MarginUniApi { * @param opts.page Page number * @param opts.limit Maximum response items. Default: 100, minimum: 1, Maximum: 100 */ - public async listUniLoans(opts: { - currencyPair?: string; - currency?: string; - page?: number; - limit?: number; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listUniLoans(opts: { currencyPair?: string, currency?: string, page?: number, limit?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/margin/uni/loans'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -167,21 +158,22 @@ export class MarginUniApi { opts = opts || {}; if (opts.currencyPair !== undefined) { - localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, 'string'); + localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, "string"); } if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, "string"); } if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -190,38 +182,39 @@ export class MarginUniApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Borrow or repay - * @param createUniLoan + * @param createUniLoan */ - public async createUniLoan(createUniLoan: CreateUniLoan): Promise<{ response: AxiosResponse; body?: any }> { + public async createUniLoan(createUniLoan: CreateUniLoan) : Promise<{ response: AxiosResponse; body?: any; }> { const localVarPath = this.client.basePath + '/margin/uni/loans'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); // verify required parameter 'createUniLoan' is not null or undefined if (createUniLoan === null || createUniLoan === undefined) { throw new Error('Required parameter createUniLoan was null or undefined when calling createUniLoan.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(createUniLoan, 'CreateUniLoan'), + data: ObjectSerializer.serialize(createUniLoan, "CreateUniLoan") }; const authSettings = ['apiv4']; - return this.client.request(config, '', authSettings); + return this.client.request(config, "", authSettings); } /** - * + * * @summary Get load records * @param opts Optional parameters * @param opts.type type: borrow - borrow, repay - repay @@ -230,16 +223,10 @@ export class MarginUniApi { * @param opts.page Page number * @param opts.limit Maximum response items. Default: 100, minimum: 1, Maximum: 100 */ - public async listUniLoanRecords(opts: { - type?: 'borrow' | 'repay'; - currency?: string; - currencyPair?: string; - page?: number; - limit?: number; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listUniLoanRecords(opts: { type?: 'borrow' | 'repay', currency?: string, currencyPair?: string, page?: number, limit?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/margin/uni/loan_records'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -254,21 +241,22 @@ export class MarginUniApi { } if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, "string"); } if (opts.currencyPair !== undefined) { - localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, 'string'); + localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, "string"); } if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -277,11 +265,11 @@ export class MarginUniApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary List interest records * @param opts Optional parameters * @param opts.currencyPair Currency pair @@ -291,17 +279,10 @@ export class MarginUniApi { * @param opts.from Start timestamp * @param opts.to End timestamp */ - public async listUniLoanInterestRecords(opts: { - currencyPair?: string; - currency?: string; - page?: number; - limit?: number; - from?: number; - to?: number; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listUniLoanInterestRecords(opts: { currencyPair?: string, currency?: string, page?: number, limit?: number, from?: number, to?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/margin/uni/interest_records'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -312,29 +293,30 @@ export class MarginUniApi { opts = opts || {}; if (opts.currencyPair !== undefined) { - localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, 'string'); + localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, "string"); } if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, "string"); } if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -343,22 +325,19 @@ export class MarginUniApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Get maximum borrowable * @param currency Retrieve data of the specified currency * @param currencyPair Currency pair */ - public async getUniBorrowable( - currency: string, - currencyPair: string, - ): Promise<{ response: AxiosResponse; body: MaxUniBorrowable }> { + public async getUniBorrowable(currency: string, currencyPair: string) : Promise<{ response: AxiosResponse; body: MaxUniBorrowable; }> { const localVarPath = this.client.basePath + '/margin/uni/borrowable'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -377,9 +356,10 @@ export class MarginUniApi { throw new Error('Required parameter currencyPair was null or undefined when calling getUniBorrowable.'); } - localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, "string"); + + localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(currencyPair, "string"); - localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(currencyPair, 'string'); const config: AxiosRequestConfig = { method: 'GET', @@ -389,6 +369,6 @@ export class MarginUniApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'MaxUniBorrowable', authSettings); + return this.client.request(config, "MaxUniBorrowable", authSettings); } } diff --git a/api/multiCollateralLoanApi.ts b/api/multiCollateralLoanApi.ts index 1e62ef4..136071b 100644 --- a/api/multiCollateralLoanApi.ts +++ b/api/multiCollateralLoanApi.ts @@ -9,6 +9,7 @@ * Do not edit the class manually. */ + /* tslint:disable:no-unused-locals */ import { CollateralAdjust } from '../model/collateralAdjust'; import { CollateralAdjustRes } from '../model/collateralAdjustRes'; @@ -44,7 +45,7 @@ export class MultiCollateralLoanApi { } /** - * + * * @summary List Multi-Collateral Orders * @param opts Optional parameters * @param opts.page Page number @@ -52,15 +53,10 @@ export class MultiCollateralLoanApi { * @param opts.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 opts.orderType Order type, current - query current orders, fixed - query fixed orders. If not specified, default to querying current orders */ - public async listMultiCollateralOrders(opts: { - page?: number; - limit?: number; - sort?: string; - orderType?: string; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listMultiCollateralOrders(opts: { page?: number, limit?: number, sort?: string, orderType?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/loan/multi_collateral/orders'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -71,21 +67,22 @@ export class MultiCollateralLoanApi { opts = opts || {}; if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.sort !== undefined) { - localVarQueryParameters['sort'] = ObjectSerializer.serialize(opts.sort, 'string'); + localVarQueryParameters['sort'] = ObjectSerializer.serialize(opts.sort, "string"); } if (opts.orderType !== undefined) { - localVarQueryParameters['order_type'] = ObjectSerializer.serialize(opts.orderType, 'string'); + localVarQueryParameters['order_type'] = ObjectSerializer.serialize(opts.orderType, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -94,20 +91,18 @@ export class MultiCollateralLoanApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Create Multi-Collateral Order - * @param createMultiCollateralOrder + * @param createMultiCollateralOrder */ - public async createMultiCollateral( - createMultiCollateralOrder: CreateMultiCollateralOrder, - ): Promise<{ response: AxiosResponse; body: OrderResp }> { + public async createMultiCollateral(createMultiCollateralOrder: CreateMultiCollateralOrder) : Promise<{ response: AxiosResponse; body: OrderResp; }> { const localVarPath = this.client.basePath + '/loan/multi_collateral/orders'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -118,39 +113,32 @@ export class MultiCollateralLoanApi { // verify required parameter 'createMultiCollateralOrder' is not null or undefined if (createMultiCollateralOrder === null || createMultiCollateralOrder === undefined) { - throw new Error( - 'Required parameter createMultiCollateralOrder was null or undefined when calling createMultiCollateral.', - ); + throw new Error('Required parameter createMultiCollateralOrder was null or undefined when calling createMultiCollateral.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(createMultiCollateralOrder, 'CreateMultiCollateralOrder'), + data: ObjectSerializer.serialize(createMultiCollateralOrder, "CreateMultiCollateralOrder") }; const authSettings = ['apiv4']; - return this.client.request(config, 'OrderResp', authSettings); + return this.client.request(config, "OrderResp", authSettings); } /** - * + * * @summary Get Multi-Collateral Order Detail * @param orderId Order ID returned on successful order creation */ - public async getMultiCollateralOrderDetail( - orderId: string, - ): Promise<{ response: AxiosResponse; body: MultiCollateralOrder }> { - const localVarPath = - this.client.basePath + - '/loan/multi_collateral/orders/{order_id}'.replace( - '{' + 'order_id' + '}', - encodeURIComponent(String(orderId)), - ); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getMultiCollateralOrderDetail(orderId: string) : Promise<{ response: AxiosResponse; body: MultiCollateralOrder; }> { + const localVarPath = this.client.basePath + '/loan/multi_collateral/orders/{order_id}' + .replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -161,11 +149,10 @@ export class MultiCollateralLoanApi { // verify required parameter 'orderId' is not null or undefined if (orderId === null || orderId === undefined) { - throw new Error( - 'Required parameter orderId was null or undefined when calling getMultiCollateralOrderDetail.', - ); + throw new Error('Required parameter orderId was null or undefined when calling getMultiCollateralOrderDetail.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -174,11 +161,11 @@ export class MultiCollateralLoanApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'MultiCollateralOrder', authSettings); + return this.client.request(config, "MultiCollateralOrder", authSettings); } /** - * + * * @summary List Multi-Collateral Repay Records * @param type Operation type: repay - Regular repayment, liquidate - Liquidation * @param opts Optional parameters @@ -188,13 +175,10 @@ export class MultiCollateralLoanApi { * @param opts.from Start timestamp of the query * @param opts.to Time range ending, default to current time */ - public async listMultiRepayRecords( - type: string, - opts: { borrowCurrency?: string; page?: number; limit?: number; from?: number; to?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { + public async listMultiRepayRecords(type: string, opts: { borrowCurrency?: string, page?: number, limit?: number, from?: number, to?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/loan/multi_collateral/repay'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -209,28 +193,29 @@ export class MultiCollateralLoanApi { } opts = opts || {}; - localVarQueryParameters['type'] = ObjectSerializer.serialize(type, 'string'); + localVarQueryParameters['type'] = ObjectSerializer.serialize(type, "string"); if (opts.borrowCurrency !== undefined) { - localVarQueryParameters['borrow_currency'] = ObjectSerializer.serialize(opts.borrowCurrency, 'string'); + localVarQueryParameters['borrow_currency'] = ObjectSerializer.serialize(opts.borrowCurrency, "string"); } if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -239,20 +224,18 @@ export class MultiCollateralLoanApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Repay Multi-Collateral Loan - * @param repayMultiLoan + * @param repayMultiLoan */ - public async repayMultiCollateralLoan( - repayMultiLoan: RepayMultiLoan, - ): Promise<{ response: AxiosResponse; body: MultiRepayResp }> { + public async repayMultiCollateralLoan(repayMultiLoan: RepayMultiLoan) : Promise<{ response: AxiosResponse; body: MultiRepayResp; }> { const localVarPath = this.client.basePath + '/loan/multi_collateral/repay'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -263,25 +246,24 @@ export class MultiCollateralLoanApi { // verify required parameter 'repayMultiLoan' is not null or undefined if (repayMultiLoan === null || repayMultiLoan === undefined) { - throw new Error( - 'Required parameter repayMultiLoan was null or undefined when calling repayMultiCollateralLoan.', - ); + throw new Error('Required parameter repayMultiLoan was null or undefined when calling repayMultiCollateralLoan.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(repayMultiLoan, 'RepayMultiLoan'), + data: ObjectSerializer.serialize(repayMultiLoan, "RepayMultiLoan") }; const authSettings = ['apiv4']; - return this.client.request(config, 'MultiRepayResp', authSettings); + return this.client.request(config, "MultiRepayResp", authSettings); } /** - * + * * @summary Query collateral adjustment records * @param opts Optional parameters * @param opts.page Page number @@ -290,16 +272,10 @@ export class MultiCollateralLoanApi { * @param opts.to Time range ending, default to current time * @param opts.collateralCurrency Collateral */ - public async listMultiCollateralRecords(opts: { - page?: number; - limit?: number; - from?: number; - to?: number; - collateralCurrency?: string; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listMultiCollateralRecords(opts: { page?: number, limit?: number, from?: number, to?: number, collateralCurrency?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/loan/multi_collateral/mortgage'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -310,28 +286,26 @@ export class MultiCollateralLoanApi { opts = opts || {}; if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.collateralCurrency !== undefined) { - localVarQueryParameters['collateral_currency'] = ObjectSerializer.serialize( - opts.collateralCurrency, - 'string', - ); + localVarQueryParameters['collateral_currency'] = ObjectSerializer.serialize(opts.collateralCurrency, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -340,20 +314,18 @@ export class MultiCollateralLoanApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Operate Multi-Collateral - * @param collateralAdjust + * @param collateralAdjust */ - public async operateMultiCollateral( - collateralAdjust: CollateralAdjust, - ): Promise<{ response: AxiosResponse; body: CollateralAdjustRes }> { + public async operateMultiCollateral(collateralAdjust: CollateralAdjust) : Promise<{ response: AxiosResponse; body: CollateralAdjustRes; }> { const localVarPath = this.client.basePath + '/loan/multi_collateral/mortgage'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -364,36 +336,32 @@ export class MultiCollateralLoanApi { // verify required parameter 'collateralAdjust' is not null or undefined if (collateralAdjust === null || collateralAdjust === undefined) { - throw new Error( - 'Required parameter collateralAdjust was null or undefined when calling operateMultiCollateral.', - ); + throw new Error('Required parameter collateralAdjust was null or undefined when calling operateMultiCollateral.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(collateralAdjust, 'CollateralAdjust'), + data: ObjectSerializer.serialize(collateralAdjust, "CollateralAdjust") }; const authSettings = ['apiv4']; - return this.client.request(config, 'CollateralAdjustRes', authSettings); + return this.client.request(config, "CollateralAdjustRes", authSettings); } /** - * + * * @summary List User Currency Quota * @param type Currency types: collateral - collateral currency, borrow - borrowing currency. * @param currency When specifying collateral currencies, you can use commas to separate multiple currencies; for borrowing currencies, only one currency can be provided. */ - public async listUserCurrencyQuota( - type: string, - currency: string, - ): Promise<{ response: AxiosResponse; body: Array }> { + public async listUserCurrencyQuota(type: string, currency: string) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/loan/multi_collateral/currency_quota'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -412,9 +380,10 @@ export class MultiCollateralLoanApi { throw new Error('Required parameter currency was null or undefined when calling listUserCurrencyQuota.'); } - localVarQueryParameters['type'] = ObjectSerializer.serialize(type, 'string'); + localVarQueryParameters['type'] = ObjectSerializer.serialize(type, "string"); + + localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, "string"); - localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, 'string'); const config: AxiosRequestConfig = { method: 'GET', @@ -424,17 +393,17 @@ export class MultiCollateralLoanApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * - * @summary Query supported borrowing and collateral currencies in Multi-Collateral + * + * @summary Query supported borrowing and collateral currencies in Multi-Collateral */ - public async listMultiCollateralCurrencies(): Promise<{ response: AxiosResponse; body: MultiCollateralCurrency }> { + public async listMultiCollateralCurrencies() : Promise<{ response: AxiosResponse; body: MultiCollateralCurrency; }> { const localVarPath = this.client.basePath + '/loan/multi_collateral/currencies'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -443,6 +412,7 @@ export class MultiCollateralLoanApi { localVarHeaderParams.Accept = produces.join(','); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -451,17 +421,17 @@ export class MultiCollateralLoanApi { }; const authSettings = []; - return this.client.request(config, 'MultiCollateralCurrency', authSettings); + return this.client.request(config, "MultiCollateralCurrency", authSettings); } /** * The Multi-Collateral ratio is fixed, irrespective of the currency. * @summary Get Multi-Collateral ratio */ - public async getMultiCollateralLtv(): Promise<{ response: AxiosResponse; body: CollateralLtv }> { + public async getMultiCollateralLtv() : Promise<{ response: AxiosResponse; body: CollateralLtv; }> { const localVarPath = this.client.basePath + '/loan/multi_collateral/ltv'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -470,6 +440,7 @@ export class MultiCollateralLoanApi { localVarHeaderParams.Accept = produces.join(','); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -478,17 +449,17 @@ export class MultiCollateralLoanApi { }; const authSettings = []; - return this.client.request(config, 'CollateralLtv', authSettings); + return this.client.request(config, "CollateralLtv", authSettings); } /** - * + * * @summary Query fixed interest rates for the currency for 7 days and 30 days */ - public async getMultiCollateralFixRate(): Promise<{ response: AxiosResponse; body: Array }> { + public async getMultiCollateralFixRate() : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/loan/multi_collateral/fixed_rate'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -497,6 +468,7 @@ export class MultiCollateralLoanApi { localVarHeaderParams.Accept = produces.join(','); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -505,23 +477,20 @@ export class MultiCollateralLoanApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * 查询币种上一小时活期利率,活期利率每小时更新一次 - * @summary 查询币种活期利率 - * @param currencies 指定币种名称查询数组,数组用逗号分割,最大100个 + * Query the current interest rate of the currency in the last hour. The current interest rate is updated every hour. + * @summary Query the current interest rate of the currency + * @param currencies Specify the currency name to query the array. The array is separated by commas and has a maximum of 100 items. * @param opts Optional parameters - * @param opts.vipLevel vip等级,不传默认为0 + * @param opts.vipLevel VIP level, defaults to 0 if not transferred */ - public async getMultiCollateralCurrentRate( - currencies: Array, - opts: { vipLevel?: string }, - ): Promise<{ response: AxiosResponse; body: Array }> { + public async getMultiCollateralCurrentRate(currencies: Array, opts: { vipLevel?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/loan/multi_collateral/current_rate'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -532,18 +501,17 @@ export class MultiCollateralLoanApi { // verify required parameter 'currencies' is not null or undefined if (currencies === null || currencies === undefined) { - throw new Error( - 'Required parameter currencies was null or undefined when calling getMultiCollateralCurrentRate.', - ); + throw new Error('Required parameter currencies was null or undefined when calling getMultiCollateralCurrentRate.'); } opts = opts || {}; - localVarQueryParameters['currencies'] = ObjectSerializer.serialize(currencies, 'Array'); + localVarQueryParameters['currencies'] = ObjectSerializer.serialize(currencies, "Array"); if (opts.vipLevel !== undefined) { - localVarQueryParameters['vip_level'] = ObjectSerializer.serialize(opts.vipLevel, 'string'); + localVarQueryParameters['vip_level'] = ObjectSerializer.serialize(opts.vipLevel, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -552,6 +520,6 @@ export class MultiCollateralLoanApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } } diff --git a/api/optionsApi.ts b/api/optionsApi.ts index 41da12d..f4a2c2f 100644 --- a/api/optionsApi.ts +++ b/api/optionsApi.ts @@ -9,6 +9,7 @@ * Do not edit the class manually. */ + /* tslint:disable:no-unused-locals */ import { CountdownCancelAllOptionsTask } from '../model/countdownCancelAllOptionsTask'; import { FuturesCandlestick } from '../model/futuresCandlestick'; @@ -50,13 +51,13 @@ export class OptionsApi { } /** - * + * * @summary List all underlyings */ - public async listOptionsUnderlyings(): Promise<{ response: AxiosResponse; body: Array }> { + public async listOptionsUnderlyings() : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/options/underlyings'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -65,6 +66,7 @@ export class OptionsApi { localVarHeaderParams.Accept = produces.join(','); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -73,18 +75,18 @@ export class OptionsApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary List all expiration times * @param underlying Underlying (Obtained by listing underlying endpoint) */ - public async listOptionsExpirations(underlying: string): Promise<{ response: AxiosResponse; body: Array }> { + public async listOptionsExpirations(underlying: string) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/options/expirations'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -98,7 +100,8 @@ export class OptionsApi { throw new Error('Required parameter underlying was null or undefined when calling listOptionsExpirations.'); } - localVarQueryParameters['underlying'] = ObjectSerializer.serialize(underlying, 'string'); + localVarQueryParameters['underlying'] = ObjectSerializer.serialize(underlying, "string"); + const config: AxiosRequestConfig = { method: 'GET', @@ -108,23 +111,20 @@ export class OptionsApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary List all the contracts with specified underlying and expiration time * @param underlying Underlying (Obtained by listing underlying endpoint) * @param opts Optional parameters * @param opts.expiration Unix timestamp of the expiration time */ - public async listOptionsContracts( - underlying: string, - opts: { expiration?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { + public async listOptionsContracts(underlying: string, opts: { expiration?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/options/contracts'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -139,12 +139,13 @@ export class OptionsApi { } opts = opts || {}; - localVarQueryParameters['underlying'] = ObjectSerializer.serialize(underlying, 'string'); + localVarQueryParameters['underlying'] = ObjectSerializer.serialize(underlying, "string"); if (opts.expiration !== undefined) { - localVarQueryParameters['expiration'] = ObjectSerializer.serialize(opts.expiration, 'number'); + localVarQueryParameters['expiration'] = ObjectSerializer.serialize(opts.expiration, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -153,20 +154,19 @@ export class OptionsApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Query specified contract detail - * @param contract + * @param contract */ - public async getOptionsContract(contract: string): Promise<{ response: AxiosResponse; body: OptionsContract }> { - const localVarPath = - this.client.basePath + - '/options/contracts/{contract}'.replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getOptionsContract(contract: string) : Promise<{ response: AxiosResponse; body: OptionsContract; }> { + const localVarPath = this.client.basePath + '/options/contracts/{contract}' + .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -180,6 +180,7 @@ export class OptionsApi { throw new Error('Required parameter contract was null or undefined when calling getOptionsContract.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -188,11 +189,11 @@ export class OptionsApi { }; const authSettings = []; - return this.client.request(config, 'OptionsContract', authSettings); + return this.client.request(config, "OptionsContract", authSettings); } /** - * + * * @summary List settlement history * @param underlying Underlying (Obtained by listing underlying endpoint) * @param opts Optional parameters @@ -201,13 +202,10 @@ export class OptionsApi { * @param opts.from Start timestamp * @param opts.to End timestamp */ - public async listOptionsSettlements( - underlying: string, - opts: { limit?: number; offset?: number; from?: number; to?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { + public async listOptionsSettlements(underlying: string, opts: { limit?: number, offset?: number, from?: number, to?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/options/settlements'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -222,24 +220,25 @@ export class OptionsApi { } opts = opts || {}; - localVarQueryParameters['underlying'] = ObjectSerializer.serialize(underlying, 'string'); + localVarQueryParameters['underlying'] = ObjectSerializer.serialize(underlying, "string"); if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -248,26 +247,21 @@ export class OptionsApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Get specified contract\'s settlement - * @param contract + * @param contract * @param underlying Underlying (Obtained by listing underlying endpoint) - * @param at + * @param at */ - public async getOptionsSettlement( - contract: string, - underlying: string, - at: number, - ): Promise<{ response: AxiosResponse; body: OptionsSettlement }> { - const localVarPath = - this.client.basePath + - '/options/settlements/{contract}'.replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getOptionsSettlement(contract: string, underlying: string, at: number) : Promise<{ response: AxiosResponse; body: OptionsSettlement; }> { + const localVarPath = this.client.basePath + '/options/settlements/{contract}' + .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -291,9 +285,10 @@ export class OptionsApi { throw new Error('Required parameter at was null or undefined when calling getOptionsSettlement.'); } - localVarQueryParameters['underlying'] = ObjectSerializer.serialize(underlying, 'string'); + localVarQueryParameters['underlying'] = ObjectSerializer.serialize(underlying, "string"); + + localVarQueryParameters['at'] = ObjectSerializer.serialize(at, "number"); - localVarQueryParameters['at'] = ObjectSerializer.serialize(at, 'number'); const config: AxiosRequestConfig = { method: 'GET', @@ -303,11 +298,11 @@ export class OptionsApi { }; const authSettings = []; - return this.client.request(config, 'OptionsSettlement', authSettings); + return this.client.request(config, "OptionsSettlement", authSettings); } /** - * + * * @summary List my options settlements * @param underlying Underlying (Obtained by listing underlying endpoint) * @param opts Optional parameters @@ -317,13 +312,10 @@ export class OptionsApi { * @param opts.from Start timestamp * @param opts.to End timestamp */ - public async listMyOptionsSettlements( - underlying: string, - opts: { contract?: string; limit?: number; offset?: number; from?: number; to?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { + public async listMyOptionsSettlements(underlying: string, opts: { contract?: string, limit?: number, offset?: number, from?: number, to?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/options/my_settlements'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -334,34 +326,33 @@ export class OptionsApi { // verify required parameter 'underlying' is not null or undefined if (underlying === null || underlying === undefined) { - throw new Error( - 'Required parameter underlying was null or undefined when calling listMyOptionsSettlements.', - ); + throw new Error('Required parameter underlying was null or undefined when calling listMyOptionsSettlements.'); } opts = opts || {}; - localVarQueryParameters['underlying'] = ObjectSerializer.serialize(underlying, 'string'); + localVarQueryParameters['underlying'] = ObjectSerializer.serialize(underlying, "string"); if (opts.contract !== undefined) { - localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, "string"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -370,7 +361,7 @@ export class OptionsApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** @@ -382,13 +373,10 @@ export class OptionsApi { * @param opts.limit Maximum number of order depth data in asks or bids * @param opts.withId Whether the order book update ID will be returned. This ID increases by 1 on every order book update */ - public async listOptionsOrderBook( - contract: string, - opts: { interval?: '0' | '0.1' | '0.01'; limit?: number; withId?: boolean }, - ): Promise<{ response: AxiosResponse; body: FuturesOrderBook }> { + public async listOptionsOrderBook(contract: string, opts: { interval?: '0' | '0.1' | '0.01', limit?: number, withId?: boolean, } ) : Promise<{ response: AxiosResponse; body: FuturesOrderBook; }> { const localVarPath = this.client.basePath + '/options/order_book'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -403,20 +391,21 @@ export class OptionsApi { } opts = opts || {}; - localVarQueryParameters['contract'] = ObjectSerializer.serialize(contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(contract, "string"); if (opts.interval !== undefined) { localVarQueryParameters['interval'] = ObjectSerializer.serialize(opts.interval, "'0' | '0.1' | '0.01'"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.withId !== undefined) { - localVarQueryParameters['with_id'] = ObjectSerializer.serialize(opts.withId, 'boolean'); + localVarQueryParameters['with_id'] = ObjectSerializer.serialize(opts.withId, "boolean"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -425,20 +414,18 @@ export class OptionsApi { }; const authSettings = []; - return this.client.request(config, 'FuturesOrderBook', authSettings); + return this.client.request(config, "FuturesOrderBook", authSettings); } /** - * + * * @summary List tickers of options contracts * @param underlying Underlying (Obtained by listing underlying endpoint) */ - public async listOptionsTickers( - underlying: string, - ): Promise<{ response: AxiosResponse; body: Array }> { + public async listOptionsTickers(underlying: string) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/options/tickers'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -452,7 +439,8 @@ export class OptionsApi { throw new Error('Required parameter underlying was null or undefined when calling listOptionsTickers.'); } - localVarQueryParameters['underlying'] = ObjectSerializer.serialize(underlying, 'string'); + localVarQueryParameters['underlying'] = ObjectSerializer.serialize(underlying, "string"); + const config: AxiosRequestConfig = { method: 'GET', @@ -462,25 +450,19 @@ export class OptionsApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Get underlying ticker * @param underlying Underlying */ - public async listOptionsUnderlyingTickers( - underlying: string, - ): Promise<{ response: AxiosResponse; body: OptionsUnderlyingTicker }> { - const localVarPath = - this.client.basePath + - '/options/underlying/tickers/{underlying}'.replace( - '{' + 'underlying' + '}', - encodeURIComponent(String(underlying)), - ); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listOptionsUnderlyingTickers(underlying: string) : Promise<{ response: AxiosResponse; body: OptionsUnderlyingTicker; }> { + const localVarPath = this.client.basePath + '/options/underlying/tickers/{underlying}' + .replace('{' + 'underlying' + '}', encodeURIComponent(String(underlying))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -491,11 +473,10 @@ export class OptionsApi { // verify required parameter 'underlying' is not null or undefined if (underlying === null || underlying === undefined) { - throw new Error( - 'Required parameter underlying was null or undefined when calling listOptionsUnderlyingTickers.', - ); + throw new Error('Required parameter underlying was null or undefined when calling listOptionsUnderlyingTickers.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -504,11 +485,11 @@ export class OptionsApi { }; const authSettings = []; - return this.client.request(config, 'OptionsUnderlyingTicker', authSettings); + return this.client.request(config, "OptionsUnderlyingTicker", authSettings); } /** - * + * * @summary Get options candlesticks * @param contract Options contract name * @param opts Optional parameters @@ -517,13 +498,10 @@ export class OptionsApi { * @param opts.to End timestamp * @param opts.interval Interval time between data points */ - public async listOptionsCandlesticks( - contract: string, - opts: { limit?: number; from?: number; to?: number; interval?: '1m' | '5m' | '15m' | '30m' | '1h' }, - ): Promise<{ response: AxiosResponse; body: Array }> { + public async listOptionsCandlesticks(contract: string, opts: { limit?: number, from?: number, to?: number, interval?: '1m' | '5m' | '15m' | '30m' | '1h', } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/options/candlesticks'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -538,27 +516,25 @@ export class OptionsApi { } opts = opts || {}; - localVarQueryParameters['contract'] = ObjectSerializer.serialize(contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(contract, "string"); if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.interval !== undefined) { - localVarQueryParameters['interval'] = ObjectSerializer.serialize( - opts.interval, - "'1m' | '5m' | '15m' | '30m' | '1h'", - ); + localVarQueryParameters['interval'] = ObjectSerializer.serialize(opts.interval, "'1m' | '5m' | '15m' | '30m' | '1h'"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -567,11 +543,11 @@ export class OptionsApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Mark price candlesticks of an underlying * @param underlying Underlying (Obtained by listing underlying endpoint) * @param opts Optional parameters @@ -580,13 +556,10 @@ export class OptionsApi { * @param opts.to End timestamp * @param opts.interval Interval time between data points */ - public async listOptionsUnderlyingCandlesticks( - underlying: string, - opts: { limit?: number; from?: number; to?: number; interval?: '1m' | '5m' | '15m' | '30m' | '1h' }, - ): Promise<{ response: AxiosResponse; body: Array }> { + public async listOptionsUnderlyingCandlesticks(underlying: string, opts: { limit?: number, from?: number, to?: number, interval?: '1m' | '5m' | '15m' | '30m' | '1h', } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/options/underlying/candlesticks'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -597,33 +570,29 @@ export class OptionsApi { // verify required parameter 'underlying' is not null or undefined if (underlying === null || underlying === undefined) { - throw new Error( - 'Required parameter underlying was null or undefined when calling listOptionsUnderlyingCandlesticks.', - ); + throw new Error('Required parameter underlying was null or undefined when calling listOptionsUnderlyingCandlesticks.'); } opts = opts || {}; - localVarQueryParameters['underlying'] = ObjectSerializer.serialize(underlying, 'string'); + localVarQueryParameters['underlying'] = ObjectSerializer.serialize(underlying, "string"); if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.interval !== undefined) { - localVarQueryParameters['interval'] = ObjectSerializer.serialize( - opts.interval, - "'1m' | '5m' | '15m' | '30m' | '1h'", - ); + localVarQueryParameters['interval'] = ObjectSerializer.serialize(opts.interval, "'1m' | '5m' | '15m' | '30m' | '1h'"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -632,11 +601,11 @@ export class OptionsApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Options trade history * @param opts Optional parameters * @param opts.contract Options contract name @@ -646,17 +615,10 @@ export class OptionsApi { * @param opts.from Start timestamp * @param opts.to End timestamp */ - public async listOptionsTrades(opts: { - contract?: string; - type?: string; - limit?: number; - offset?: number; - from?: number; - to?: number; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listOptionsTrades(opts: { contract?: string, type?: string, limit?: number, offset?: number, from?: number, to?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/options/trades'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -667,29 +629,30 @@ export class OptionsApi { opts = opts || {}; if (opts.contract !== undefined) { - localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, "string"); } if (opts.type !== undefined) { - localVarQueryParameters['type'] = ObjectSerializer.serialize(opts.type, 'string'); + localVarQueryParameters['type'] = ObjectSerializer.serialize(opts.type, "string"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -698,17 +661,17 @@ export class OptionsApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary List options account */ - public async listOptionsAccount(): Promise<{ response: AxiosResponse; body: OptionsAccount }> { + public async listOptionsAccount() : Promise<{ response: AxiosResponse; body: OptionsAccount; }> { const localVarPath = this.client.basePath + '/options/accounts'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -717,6 +680,7 @@ export class OptionsApi { localVarHeaderParams.Accept = produces.join(','); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -725,29 +689,23 @@ export class OptionsApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'OptionsAccount', authSettings); + return this.client.request(config, "OptionsAccount", authSettings); } /** - * + * * @summary List account changing history * @param opts Optional parameters * @param opts.limit Maximum number of records to be returned in a single list * @param opts.offset List offset, starting from 0 * @param opts.from Start timestamp * @param opts.to End timestamp - * @param opts.type Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: settlement PNL + * @param opts.type Changing Type: - dnw: Deposit & Withdraw - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: settlement PNL */ - public async listOptionsAccountBook(opts: { - limit?: number; - offset?: number; - from?: number; - to?: number; - type?: 'dnw' | 'prem' | 'fee' | 'refr' | 'set'; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listOptionsAccountBook(opts: { limit?: number, offset?: number, from?: number, to?: number, type?: 'dnw' | 'prem' | 'fee' | 'refr' | 'set', } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/options/account_book'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -758,28 +716,26 @@ export class OptionsApi { opts = opts || {}; if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.type !== undefined) { - localVarQueryParameters['type'] = ObjectSerializer.serialize( - opts.type, - "'dnw' | 'prem' | 'fee' | 'refr' | 'set'", - ); + localVarQueryParameters['type'] = ObjectSerializer.serialize(opts.type, "'dnw' | 'prem' | 'fee' | 'refr' | 'set'"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -788,21 +744,19 @@ export class OptionsApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary List user\'s positions of specified underlying * @param opts Optional parameters * @param opts.underlying Underlying */ - public async listOptionsPositions(opts: { - underlying?: string; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listOptionsPositions(opts: { underlying?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/options/positions'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -813,9 +767,10 @@ export class OptionsApi { opts = opts || {}; if (opts.underlying !== undefined) { - localVarQueryParameters['underlying'] = ObjectSerializer.serialize(opts.underlying, 'string'); + localVarQueryParameters['underlying'] = ObjectSerializer.serialize(opts.underlying, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -824,20 +779,19 @@ export class OptionsApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Get specified contract position - * @param contract + * @param contract */ - public async getOptionsPosition(contract: string): Promise<{ response: AxiosResponse; body: OptionsPosition }> { - const localVarPath = - this.client.basePath + - '/options/positions/{contract}'.replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getOptionsPosition(contract: string) : Promise<{ response: AxiosResponse; body: OptionsPosition; }> { + const localVarPath = this.client.basePath + '/options/positions/{contract}' + .replace('{' + 'contract' + '}', encodeURIComponent(String(contract))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -851,6 +805,7 @@ export class OptionsApi { throw new Error('Required parameter contract was null or undefined when calling getOptionsPosition.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -859,23 +814,20 @@ export class OptionsApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'OptionsPosition', authSettings); + return this.client.request(config, "OptionsPosition", authSettings); } /** - * + * * @summary List user\'s liquidation history of specified underlying * @param underlying Underlying (Obtained by listing underlying endpoint) * @param opts Optional parameters * @param opts.contract Options contract name */ - public async listOptionsPositionClose( - underlying: string, - opts: { contract?: string }, - ): Promise<{ response: AxiosResponse; body: Array }> { + public async listOptionsPositionClose(underlying: string, opts: { contract?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/options/position_close'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -886,18 +838,17 @@ export class OptionsApi { // verify required parameter 'underlying' is not null or undefined if (underlying === null || underlying === undefined) { - throw new Error( - 'Required parameter underlying was null or undefined when calling listOptionsPositionClose.', - ); + throw new Error('Required parameter underlying was null or undefined when calling listOptionsPositionClose.'); } opts = opts || {}; - localVarQueryParameters['underlying'] = ObjectSerializer.serialize(underlying, 'string'); + localVarQueryParameters['underlying'] = ObjectSerializer.serialize(underlying, "string"); if (opts.contract !== undefined) { - localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -906,11 +857,11 @@ export class OptionsApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary List options orders * @param status Only list the orders with this status * @param opts Optional parameters @@ -921,13 +872,10 @@ export class OptionsApi { * @param opts.from Start timestamp * @param opts.to End timestamp */ - public async listOptionsOrders( - status: 'open' | 'finished', - opts: { contract?: string; underlying?: string; limit?: number; offset?: number; from?: number; to?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { + public async listOptionsOrders(status: 'open' | 'finished', opts: { contract?: string, underlying?: string, limit?: number, offset?: number, from?: number, to?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/options/orders'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -943,31 +891,32 @@ export class OptionsApi { opts = opts || {}; if (opts.contract !== undefined) { - localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, "string"); } if (opts.underlying !== undefined) { - localVarQueryParameters['underlying'] = ObjectSerializer.serialize(opts.underlying, 'string'); + localVarQueryParameters['underlying'] = ObjectSerializer.serialize(opts.underlying, "string"); } localVarQueryParameters['status'] = ObjectSerializer.serialize(status, "'open' | 'finished'"); if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -976,20 +925,18 @@ export class OptionsApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Create an options order - * @param optionsOrder + * @param optionsOrder */ - public async createOptionsOrder( - optionsOrder: OptionsOrder, - ): Promise<{ response: AxiosResponse; body: OptionsOrder }> { + public async createOptionsOrder(optionsOrder: OptionsOrder) : Promise<{ response: AxiosResponse; body: OptionsOrder; }> { const localVarPath = this.client.basePath + '/options/orders'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1003,34 +950,31 @@ export class OptionsApi { throw new Error('Required parameter optionsOrder was null or undefined when calling createOptionsOrder.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(optionsOrder, 'OptionsOrder'), + data: ObjectSerializer.serialize(optionsOrder, "OptionsOrder") }; const authSettings = ['apiv4']; - return this.client.request(config, 'OptionsOrder', authSettings); + return this.client.request(config, "OptionsOrder", authSettings); } /** - * + * * @summary Cancel all `open` orders matched * @param opts Optional parameters * @param opts.contract Options contract name * @param opts.underlying Underlying * @param opts.side All bids or asks. Both included if not specified */ - public async cancelOptionsOrders(opts: { - contract?: string; - underlying?: string; - side?: 'ask' | 'bid'; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async cancelOptionsOrders(opts: { contract?: string, underlying?: string, side?: 'ask' | 'bid', } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/options/orders'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1041,17 +985,18 @@ export class OptionsApi { opts = opts || {}; if (opts.contract !== undefined) { - localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, "string"); } if (opts.underlying !== undefined) { - localVarQueryParameters['underlying'] = ObjectSerializer.serialize(opts.underlying, 'string'); + localVarQueryParameters['underlying'] = ObjectSerializer.serialize(opts.underlying, "string"); } if (opts.side !== undefined) { localVarQueryParameters['side'] = ObjectSerializer.serialize(opts.side, "'ask' | 'bid'"); } + const config: AxiosRequestConfig = { method: 'DELETE', params: localVarQueryParameters, @@ -1060,20 +1005,19 @@ export class OptionsApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Get a single order * @param orderId Order ID returned on successful order creation */ - public async getOptionsOrder(orderId: number): Promise<{ response: AxiosResponse; body: OptionsOrder }> { - const localVarPath = - this.client.basePath + - '/options/orders/{order_id}'.replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getOptionsOrder(orderId: number) : Promise<{ response: AxiosResponse; body: OptionsOrder; }> { + const localVarPath = this.client.basePath + '/options/orders/{order_id}' + .replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1087,6 +1031,7 @@ export class OptionsApi { throw new Error('Required parameter orderId was null or undefined when calling getOptionsOrder.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -1095,20 +1040,19 @@ export class OptionsApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'OptionsOrder', authSettings); + return this.client.request(config, "OptionsOrder", authSettings); } /** - * + * * @summary Cancel a single order * @param orderId Order ID returned on successful order creation */ - public async cancelOptionsOrder(orderId: number): Promise<{ response: AxiosResponse; body: OptionsOrder }> { - const localVarPath = - this.client.basePath + - '/options/orders/{order_id}'.replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async cancelOptionsOrder(orderId: number) : Promise<{ response: AxiosResponse; body: OptionsOrder; }> { + const localVarPath = this.client.basePath + '/options/orders/{order_id}' + .replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1122,6 +1066,7 @@ export class OptionsApi { throw new Error('Required parameter orderId was null or undefined when calling cancelOptionsOrder.'); } + const config: AxiosRequestConfig = { method: 'DELETE', params: localVarQueryParameters, @@ -1130,20 +1075,18 @@ export class OptionsApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'OptionsOrder', authSettings); + return this.client.request(config, "OptionsOrder", authSettings); } /** - * 期权订单心跳检测,在到达用户设置的`timeout`时间时如果没有取消既有倒计时或设置新的倒计时将会自动取消相关的`期权挂单`。 该接口可重复调用,以便设置新的倒计时或取消倒计时。 用法示例: 以30s的间隔重复此接口,每次倒计时`timeout`设置为30(秒)。 如果在30秒内未再次调用此接口,则您指定的`underlying` `contract`上的所有挂单都会被自动撤销,若未指定`underlying` `contract`则会自动撤销用户的全部挂单 如果在30秒内以将`timeout`设置为0,则倒数计时器将终止,自动撤单功能取消。 + * 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. * @summary Countdown cancel orders - * @param countdownCancelAllOptionsTask + * @param countdownCancelAllOptionsTask */ - public async countdownCancelAllOptions( - countdownCancelAllOptionsTask: CountdownCancelAllOptionsTask, - ): Promise<{ response: AxiosResponse; body: TriggerTime }> { + public async countdownCancelAllOptions(countdownCancelAllOptionsTask: CountdownCancelAllOptionsTask) : Promise<{ response: AxiosResponse; body: TriggerTime; }> { const localVarPath = this.client.basePath + '/options/countdown_cancel_all'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1154,25 +1097,24 @@ export class OptionsApi { // verify required parameter 'countdownCancelAllOptionsTask' is not null or undefined if (countdownCancelAllOptionsTask === null || countdownCancelAllOptionsTask === undefined) { - throw new Error( - 'Required parameter countdownCancelAllOptionsTask was null or undefined when calling countdownCancelAllOptions.', - ); + throw new Error('Required parameter countdownCancelAllOptionsTask was null or undefined when calling countdownCancelAllOptions.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(countdownCancelAllOptionsTask, 'CountdownCancelAllOptionsTask'), + data: ObjectSerializer.serialize(countdownCancelAllOptionsTask, "CountdownCancelAllOptionsTask") }; const authSettings = ['apiv4']; - return this.client.request(config, 'TriggerTime', authSettings); + return this.client.request(config, "TriggerTime", authSettings); } /** - * + * * @summary List personal trading history * @param underlying Underlying (Obtained by listing underlying endpoint) * @param opts Optional parameters @@ -1182,13 +1124,10 @@ export class OptionsApi { * @param opts.from Start timestamp * @param opts.to End timestamp */ - public async listMyOptionsTrades( - underlying: string, - opts: { contract?: string; limit?: number; offset?: number; from?: number; to?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { + public async listMyOptionsTrades(underlying: string, opts: { contract?: string, limit?: number, offset?: number, from?: number, to?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/options/my_trades'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1203,28 +1142,29 @@ export class OptionsApi { } opts = opts || {}; - localVarQueryParameters['underlying'] = ObjectSerializer.serialize(underlying, 'string'); + localVarQueryParameters['underlying'] = ObjectSerializer.serialize(underlying, "string"); if (opts.contract !== undefined) { - localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, 'string'); + localVarQueryParameters['contract'] = ObjectSerializer.serialize(opts.contract, "string"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -1233,21 +1173,19 @@ export class OptionsApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * - * @summary MMP查询 + * + * @summary MMP Query * @param opts Optional parameters * @param opts.underlying Underlying */ - public async getOptionsMMP(opts: { - underlying?: string; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async getOptionsMMP(opts: { underlying?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/options/mmp'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1258,9 +1196,10 @@ export class OptionsApi { opts = opts || {}; if (opts.underlying !== undefined) { - localVarQueryParameters['underlying'] = ObjectSerializer.serialize(opts.underlying, 'string'); + localVarQueryParameters['underlying'] = ObjectSerializer.serialize(opts.underlying, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -1269,18 +1208,18 @@ export class OptionsApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * - * @summary MMP设置 - * @param optionsMMP + * + * @summary MMP Settings + * @param optionsMMP */ - public async setOptionsMMP(optionsMMP: OptionsMMP): Promise<{ response: AxiosResponse; body: OptionsMMP }> { + public async setOptionsMMP(optionsMMP: OptionsMMP) : Promise<{ response: AxiosResponse; body: OptionsMMP; }> { const localVarPath = this.client.basePath + '/options/mmp'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1294,29 +1233,28 @@ export class OptionsApi { throw new Error('Required parameter optionsMMP was null or undefined when calling setOptionsMMP.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(optionsMMP, 'OptionsMMP'), + data: ObjectSerializer.serialize(optionsMMP, "OptionsMMP") }; const authSettings = ['apiv4']; - return this.client.request(config, 'OptionsMMP', authSettings); + return this.client.request(config, "OptionsMMP", authSettings); } /** - * - * @summary MMP重置 - * @param optionsMMPReset + * + * @summary MMP Reset + * @param optionsMMPReset */ - public async resetOptionsMMP( - optionsMMPReset: OptionsMMPReset, - ): Promise<{ response: AxiosResponse; body: OptionsMMP }> { + public async resetOptionsMMP(optionsMMPReset: OptionsMMPReset) : Promise<{ response: AxiosResponse; body: OptionsMMP; }> { const localVarPath = this.client.basePath + '/options/mmp/reset'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1330,15 +1268,16 @@ export class OptionsApi { throw new Error('Required parameter optionsMMPReset was null or undefined when calling resetOptionsMMP.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(optionsMMPReset, 'OptionsMMPReset'), + data: ObjectSerializer.serialize(optionsMMPReset, "OptionsMMPReset") }; const authSettings = ['apiv4']; - return this.client.request(config, 'OptionsMMP', authSettings); + return this.client.request(config, "OptionsMMP", authSettings); } } diff --git a/api/portfolioApi.ts b/api/portfolioApi.ts deleted file mode 100644 index 5b85e29..0000000 --- a/api/portfolioApi.ts +++ /dev/null @@ -1,391 +0,0 @@ -/** - * Gate API v4 - * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. - * - * Contact: support@mail.gate.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* tslint:disable:no-unused-locals */ -import { PortfolioAccount } from '../model/portfolioAccount'; -import { PortfolioBorrowable } from '../model/portfolioBorrowable'; -import { PortfolioLoan } from '../model/portfolioLoan'; -import { PortfolioLoanRecord } from '../model/portfolioLoanRecord'; -import { PortfolioMode } from '../model/portfolioMode'; -import { PortfolioTransferable } from '../model/portfolioTransferable'; -import { UniLoan } from '../model/uniLoan'; -import { UniLoanInterestRecord } from '../model/uniLoanInterestRecord'; -import { ObjectSerializer } from '../model/models'; -import { ApiClient } from './apiClient'; -import { AxiosRequestConfig, AxiosResponse } from 'axios'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export class PortfolioApi { - protected client: ApiClient; - - constructor(client?: ApiClient) { - if (client) { - this.client = client; - } else { - this.client = new ApiClient(); - } - } - - /** - * 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 - * @summary Get portfolio account information - * @param opts Optional parameters - * @param opts.currency Retrieve data of the specified currency - */ - public async listPortfolioAccounts(opts: { - currency?: string; - }): Promise<{ response: AxiosResponse; body: PortfolioAccount }> { - const localVarPath = this.client.basePath + '/portfolio/accounts'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - - opts = opts || {}; - if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); - } - - const config: AxiosRequestConfig = { - method: 'GET', - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - }; - - const authSettings = ['apiv4']; - return this.client.request(config, 'PortfolioAccount', authSettings); - } - - /** - * cross_margin - cross margin - * @summary Retrieve the account\'s portfolio mode - */ - public async listAccountPortfolioMode(): Promise<{ response: AxiosResponse; body: { [key: string]: boolean } }> { - const localVarPath = this.client.basePath + '/portfolio/account_mode'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - - const config: AxiosRequestConfig = { - method: 'GET', - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - }; - - const authSettings = ['apiv4']; - return this.client.request<{ [key: string]: boolean }>(config, '{ [key: string]: boolean; }', authSettings); - } - - /** - * - * @summary Configure the account\'s portfolio mode. - * @param portfolioMode - */ - public async setAccountPortfolioMode( - portfolioMode: PortfolioMode, - ): Promise<{ response: AxiosResponse; body: { [key: string]: boolean } }> { - const localVarPath = this.client.basePath + '/portfolio/account_mode'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - - // verify required parameter 'portfolioMode' is not null or undefined - if (portfolioMode === null || portfolioMode === undefined) { - throw new Error( - 'Required parameter portfolioMode was null or undefined when calling setAccountPortfolioMode.', - ); - } - - const config: AxiosRequestConfig = { - method: 'POST', - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - data: ObjectSerializer.serialize(portfolioMode, 'PortfolioMode'), - }; - - const authSettings = ['apiv4']; - return this.client.request<{ [key: string]: boolean }>(config, '{ [key: string]: boolean; }', authSettings); - } - - /** - * - * @summary Retrieve the maximum borrowable amount for the account. - * @param currency Retrieve data of the specified currency - */ - public async getPortfolioBorrowable( - currency: string, - ): Promise<{ response: AxiosResponse; body: PortfolioBorrowable }> { - const localVarPath = this.client.basePath + '/portfolio/borrowable'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - - // verify required parameter 'currency' is not null or undefined - if (currency === null || currency === undefined) { - throw new Error('Required parameter currency was null or undefined when calling getPortfolioBorrowable.'); - } - - localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, 'string'); - - const config: AxiosRequestConfig = { - method: 'GET', - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - }; - - const authSettings = ['apiv4']; - return this.client.request(config, 'PortfolioBorrowable', authSettings); - } - - /** - * - * @summary Retrieve the maximum amount that can be transferred out from the account - * @param currency Retrieve data of the specified currency - */ - public async getPortfolioTransferable( - currency: string, - ): Promise<{ response: AxiosResponse; body: PortfolioTransferable }> { - const localVarPath = this.client.basePath + '/portfolio/transferable'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - - // verify required parameter 'currency' is not null or undefined - if (currency === null || currency === undefined) { - throw new Error('Required parameter currency was null or undefined when calling getPortfolioTransferable.'); - } - - localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, 'string'); - - const config: AxiosRequestConfig = { - method: 'GET', - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - }; - - const authSettings = ['apiv4']; - return this.client.request(config, 'PortfolioTransferable', authSettings); - } - - /** - * - * @summary List loans - * @param opts Optional parameters - * @param opts.currency Retrieve data of the specified currency - * @param opts.page Page number - * @param opts.limit Maximum response items. Default: 100, minimum: 1, Maximum: 100 - */ - public async listPortfolioUniLoanInterestRecords(opts: { - currency?: string; - page?: number; - limit?: number; - }): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = this.client.basePath + '/portfolio/loans'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - - opts = opts || {}; - if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); - } - - if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); - } - - if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); - } - - const config: AxiosRequestConfig = { - method: 'GET', - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - }; - - const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); - } - - /** - * 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` - * @summary Borrow or repay - * @param portfolioLoan - */ - public async createPortfolioLoan(portfolioLoan: PortfolioLoan): Promise<{ response: AxiosResponse; body?: any }> { - const localVarPath = this.client.basePath + '/portfolio/loans'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); - - // verify required parameter 'portfolioLoan' is not null or undefined - if (portfolioLoan === null || portfolioLoan === undefined) { - throw new Error('Required parameter portfolioLoan was null or undefined when calling createPortfolioLoan.'); - } - - const config: AxiosRequestConfig = { - method: 'POST', - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - data: ObjectSerializer.serialize(portfolioLoan, 'PortfolioLoan'), - }; - - const authSettings = ['apiv4']; - return this.client.request(config, '', authSettings); - } - - /** - * - * @summary Get load records - * @param opts Optional parameters - * @param opts.type The types of lending records, borrow - indicates the action of borrowing funds, repay - indicates the action of repaying the borrowed funds - * @param opts.currency Retrieve data of the specified currency - * @param opts.page Page number - * @param opts.limit Maximum response items. Default: 100, minimum: 1, Maximum: 100 - */ - public async listPortfolioLoanRecords(opts: { - type?: 'borrow' | 'repay'; - currency?: string; - page?: number; - limit?: number; - }): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = this.client.basePath + '/portfolio/loan_records'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - - opts = opts || {}; - if (opts.type !== undefined) { - localVarQueryParameters['type'] = ObjectSerializer.serialize(opts.type, "'borrow' | 'repay'"); - } - - if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); - } - - if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); - } - - if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); - } - - const config: AxiosRequestConfig = { - method: 'GET', - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - }; - - const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); - } - - /** - * - * @summary List interest records - * @param opts Optional parameters - * @param opts.currency Retrieve data of the specified currency - * @param opts.page Page number - * @param opts.limit Maximum response items. Default: 100, minimum: 1, Maximum: 100 - */ - public async listPortfolioLoanInterestRecords(opts: { - currency?: string; - page?: number; - limit?: number; - }): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = this.client.basePath + '/portfolio/interest_records'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - - opts = opts || {}; - if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); - } - - if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); - } - - if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); - } - - const config: AxiosRequestConfig = { - method: 'GET', - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - }; - - const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); - } -} diff --git a/api/rebateApi.ts b/api/rebateApi.ts index 61d6edd..3425fa5 100644 --- a/api/rebateApi.ts +++ b/api/rebateApi.ts @@ -9,6 +9,7 @@ * Do not edit the class manually. */ + /* tslint:disable:no-unused-locals */ import { AgencyCommissionHistory } from '../model/agencyCommissionHistory'; import { AgencyTransactionHistory } from '../model/agencyTransactionHistory'; @@ -49,17 +50,10 @@ export class RebateApi { * @param opts.limit Maximum number of records to be returned in a single list * @param opts.offset List offset, starting from 0 */ - public async agencyTransactionHistory(opts: { - currencyPair?: string; - userId?: number; - from?: number; - to?: number; - limit?: number; - offset?: number; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async agencyTransactionHistory(opts: { currencyPair?: string, userId?: number, from?: number, to?: number, limit?: number, offset?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/rebate/agency/transaction_history'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -70,29 +64,30 @@ export class RebateApi { opts = opts || {}; if (opts.currencyPair !== undefined) { - localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, 'string'); + localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, "string"); } if (opts.userId !== undefined) { - localVarQueryParameters['user_id'] = ObjectSerializer.serialize(opts.userId, 'number'); + localVarQueryParameters['user_id'] = ObjectSerializer.serialize(opts.userId, "number"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -101,11 +96,7 @@ export class RebateApi { }; const authSettings = ['apiv4']; - return this.client.request>( - config, - 'Array', - authSettings, - ); + return this.client.request>(config, "Array", authSettings); } /** @@ -119,17 +110,10 @@ export class RebateApi { * @param opts.limit Maximum number of records to be returned in a single list * @param opts.offset List offset, starting from 0 */ - public async agencyCommissionsHistory(opts: { - currency?: string; - userId?: number; - from?: number; - to?: number; - limit?: number; - offset?: number; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async agencyCommissionsHistory(opts: { currency?: string, userId?: number, from?: number, to?: number, limit?: number, offset?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/rebate/agency/commission_history'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -140,29 +124,30 @@ export class RebateApi { opts = opts || {}; if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, "string"); } if (opts.userId !== undefined) { - localVarQueryParameters['user_id'] = ObjectSerializer.serialize(opts.userId, 'number'); + localVarQueryParameters['user_id'] = ObjectSerializer.serialize(opts.userId, "number"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -171,16 +156,12 @@ export class RebateApi { }; const authSettings = ['apiv4']; - return this.client.request>( - config, - 'Array', - authSettings, - ); + return this.client.request>(config, "Array", authSettings); } /** * Record time range cannot exceed 30 days - * @summary 合伙人获取推荐用户的交易记录 + * @summary Partner obtains transaction records of recommended users * @param opts Optional parameters * @param opts.currencyPair Specify the currency pair, if not specified, return all currency pairs * @param opts.userId User ID. If not specified, all user records will be returned @@ -189,17 +170,10 @@ export class RebateApi { * @param opts.limit Maximum number of records to be returned in a single list * @param opts.offset List offset, starting from 0 */ - public async partnerTransactionHistory(opts: { - currencyPair?: string; - userId?: number; - from?: number; - to?: number; - limit?: number; - offset?: number; - }): Promise<{ response: AxiosResponse; body: PartnerTransactionHistory }> { + public async partnerTransactionHistory(opts: { currencyPair?: string, userId?: number, from?: number, to?: number, limit?: number, offset?: number, } ) : Promise<{ response: AxiosResponse; body: PartnerTransactionHistory; }> { const localVarPath = this.client.basePath + '/rebate/partner/transaction_history'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -210,29 +184,30 @@ export class RebateApi { opts = opts || {}; if (opts.currencyPair !== undefined) { - localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, 'string'); + localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, "string"); } if (opts.userId !== undefined) { - localVarQueryParameters['user_id'] = ObjectSerializer.serialize(opts.userId, 'number'); + localVarQueryParameters['user_id'] = ObjectSerializer.serialize(opts.userId, "number"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -241,12 +216,12 @@ export class RebateApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'PartnerTransactionHistory', authSettings); + return this.client.request(config, "PartnerTransactionHistory", authSettings); } /** * Record time range cannot exceed 30 days - * @summary 合伙人获取推荐用户的返佣记录 + * @summary Partner obtains commission records of recommended users * @param opts Optional parameters * @param opts.currency Filter by currency. Return all currency records if not specified * @param opts.userId User ID. If not specified, all user records will be returned @@ -255,17 +230,10 @@ export class RebateApi { * @param opts.limit Maximum number of records to be returned in a single list * @param opts.offset List offset, starting from 0 */ - public async partnerCommissionsHistory(opts: { - currency?: string; - userId?: number; - from?: number; - to?: number; - limit?: number; - offset?: number; - }): Promise<{ response: AxiosResponse; body: PartnerCommissionHistory }> { + public async partnerCommissionsHistory(opts: { currency?: string, userId?: number, from?: number, to?: number, limit?: number, offset?: number, } ) : Promise<{ response: AxiosResponse; body: PartnerCommissionHistory; }> { const localVarPath = this.client.basePath + '/rebate/partner/commission_history'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -276,29 +244,30 @@ export class RebateApi { opts = opts || {}; if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, "string"); } if (opts.userId !== undefined) { - localVarQueryParameters['user_id'] = ObjectSerializer.serialize(opts.userId, 'number'); + localVarQueryParameters['user_id'] = ObjectSerializer.serialize(opts.userId, "number"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -307,25 +276,21 @@ export class RebateApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'PartnerCommissionHistory', authSettings); + return this.client.request(config, "PartnerCommissionHistory", authSettings); } /** - * 包含下级代理、直接直客、间接直客 - * @summary 合伙人下级列表 + * Including sub-agents, direct customers, indirect customers + * @summary Partner subordinate list * @param opts Optional parameters * @param opts.userId User ID. If not specified, all user records will be returned * @param opts.limit Maximum number of records to be returned in a single list * @param opts.offset List offset, starting from 0 */ - public async partnerSubList(opts: { - userId?: number; - limit?: number; - offset?: number; - }): Promise<{ response: AxiosResponse; body: PartnerSubList }> { + public async partnerSubList(opts: { userId?: number, limit?: number, offset?: number, } ) : Promise<{ response: AxiosResponse; body: PartnerSubList; }> { const localVarPath = this.client.basePath + '/rebate/partner/sub_list'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -336,17 +301,18 @@ export class RebateApi { opts = opts || {}; if (opts.userId !== undefined) { - localVarQueryParameters['user_id'] = ObjectSerializer.serialize(opts.userId, 'number'); + localVarQueryParameters['user_id'] = ObjectSerializer.serialize(opts.userId, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -355,7 +321,7 @@ export class RebateApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'PartnerSubList', authSettings); + return this.client.request(config, "PartnerSubList", authSettings); } /** @@ -365,19 +331,13 @@ export class RebateApi { * @param opts.limit Maximum number of records to be returned in a single list * @param opts.offset List offset, starting from 0 * @param opts.userId User ID. If not specified, all user records will be returned - * @param opts.from 查询记录的起始时间,不指定则默认从当前时间开始向前推 30 天 + * @param opts.from The start time of the query record. If not specified, the default is to push forward 30 days from the current time. * @param opts.to Time range ending, default to current time */ - public async rebateBrokerCommissionHistory(opts: { - limit?: number; - offset?: number; - userId?: number; - from?: number; - to?: number; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async rebateBrokerCommissionHistory(opts: { limit?: number, offset?: number, userId?: number, from?: number, to?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/rebate/broker/commission_history'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -388,25 +348,26 @@ export class RebateApi { opts = opts || {}; if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } if (opts.userId !== undefined) { - localVarQueryParameters['user_id'] = ObjectSerializer.serialize(opts.userId, 'number'); + localVarQueryParameters['user_id'] = ObjectSerializer.serialize(opts.userId, "number"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -415,7 +376,7 @@ export class RebateApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** @@ -425,19 +386,13 @@ export class RebateApi { * @param opts.limit Maximum number of records to be returned in a single list * @param opts.offset List offset, starting from 0 * @param opts.userId User ID. If not specified, all user records will be returned - * @param opts.from 查询记录的起始时间,不指定则默认从当前时间开始向前推 30 天 + * @param opts.from The start time of the query record. If not specified, the default is to push forward 30 days from the current time. * @param opts.to Time range ending, default to current time */ - public async rebateBrokerTransactionHistory(opts: { - limit?: number; - offset?: number; - userId?: number; - from?: number; - to?: number; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async rebateBrokerTransactionHistory(opts: { limit?: number, offset?: number, userId?: number, from?: number, to?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/rebate/broker/transaction_history'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -448,25 +403,26 @@ export class RebateApi { opts = opts || {}; if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } if (opts.userId !== undefined) { - localVarQueryParameters['user_id'] = ObjectSerializer.serialize(opts.userId, 'number'); + localVarQueryParameters['user_id'] = ObjectSerializer.serialize(opts.userId, "number"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -475,17 +431,17 @@ export class RebateApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * - * @summary 用户获取返佣信息 + * + * @summary User retrieves rebate information */ - public async rebateUserInfo(): Promise<{ response: AxiosResponse; body: Array }> { + public async rebateUserInfo() : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/rebate/user/info'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -494,6 +450,7 @@ export class RebateApi { localVarHeaderParams.Accept = produces.join(','); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -502,18 +459,18 @@ export class RebateApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * 查询指定用户是否在体系内 - * @summary 用户下级关系 - * @param userIdList 查询用户的ID列表,以,分割,超过100个则取100个 + * Query whether the specified user is in the system + * @summary User-subordinate relationship + * @param userIdList Query the user\'s ID list, split by,, if there are more than 100, take 100 */ - public async userSubRelation(userIdList: string): Promise<{ response: AxiosResponse; body: UserSubRelation }> { + public async userSubRelation(userIdList: string) : Promise<{ response: AxiosResponse; body: UserSubRelation; }> { const localVarPath = this.client.basePath + '/rebate/user/sub_relation'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -527,7 +484,8 @@ export class RebateApi { throw new Error('Required parameter userIdList was null or undefined when calling userSubRelation.'); } - localVarQueryParameters['user_id_list'] = ObjectSerializer.serialize(userIdList, 'string'); + localVarQueryParameters['user_id_list'] = ObjectSerializer.serialize(userIdList, "string"); + const config: AxiosRequestConfig = { method: 'GET', @@ -537,6 +495,6 @@ export class RebateApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'UserSubRelation', authSettings); + return this.client.request(config, "UserSubRelation", authSettings); } } diff --git a/api/spotApi.ts b/api/spotApi.ts index f516a05..79a4718 100644 --- a/api/spotApi.ts +++ b/api/spotApi.ts @@ -9,6 +9,7 @@ * Do not edit the class manually. */ + /* tslint:disable:no-unused-locals */ import { BatchAmendItem } from '../model/batchAmendItem'; import { BatchOrder } from '../model/batchOrder'; @@ -56,10 +57,10 @@ export class SpotApi { * Currency has two forms: 1. Only currency name, e.g., BTC, USDT 2. `_`, e.g., `HT_ETH` The latter one occurs when one currency has multiple chains. Currency detail contains a `chain` field whatever the form is. To retrieve all chains of one currency, you can use use all the details which has the name of the currency or name starting with `_`. * @summary List all currencies\' details */ - public async listCurrencies(): Promise<{ response: AxiosResponse; body: Array }> { + public async listCurrencies() : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/spot/currencies'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -68,6 +69,7 @@ export class SpotApi { localVarHeaderParams.Accept = produces.join(','); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -76,20 +78,19 @@ export class SpotApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Get details of a specific currency * @param currency Currency name */ - public async getCurrency(currency: string): Promise<{ response: AxiosResponse; body: Currency }> { - const localVarPath = - this.client.basePath + - '/spot/currencies/{currency}'.replace('{' + 'currency' + '}', encodeURIComponent(String(currency))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getCurrency(currency: string) : Promise<{ response: AxiosResponse; body: Currency; }> { + const localVarPath = this.client.basePath + '/spot/currencies/{currency}' + .replace('{' + 'currency' + '}', encodeURIComponent(String(currency))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -103,6 +104,7 @@ export class SpotApi { throw new Error('Required parameter currency was null or undefined when calling getCurrency.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -111,17 +113,17 @@ export class SpotApi { }; const authSettings = []; - return this.client.request(config, 'Currency', authSettings); + return this.client.request(config, "Currency", authSettings); } /** - * + * * @summary List all currency pairs supported */ - public async listCurrencyPairs(): Promise<{ response: AxiosResponse; body: Array }> { + public async listCurrencyPairs() : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/spot/currency_pairs'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -130,6 +132,7 @@ export class SpotApi { localVarHeaderParams.Accept = produces.join(','); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -138,23 +141,19 @@ export class SpotApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Get details of a specifc currency pair * @param currencyPair Currency pair */ - public async getCurrencyPair(currencyPair: string): Promise<{ response: AxiosResponse; body: CurrencyPair }> { - const localVarPath = - this.client.basePath + - '/spot/currency_pairs/{currency_pair}'.replace( - '{' + 'currency_pair' + '}', - encodeURIComponent(String(currencyPair)), - ); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getCurrencyPair(currencyPair: string) : Promise<{ response: AxiosResponse; body: CurrencyPair; }> { + const localVarPath = this.client.basePath + '/spot/currency_pairs/{currency_pair}' + .replace('{' + 'currency_pair' + '}', encodeURIComponent(String(currencyPair))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -168,6 +167,7 @@ export class SpotApi { throw new Error('Required parameter currencyPair was null or undefined when calling getCurrencyPair.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -176,7 +176,7 @@ export class SpotApi { }; const authSettings = []; - return this.client.request(config, 'CurrencyPair', authSettings); + return this.client.request(config, "CurrencyPair", authSettings); } /** @@ -186,13 +186,10 @@ export class SpotApi { * @param opts.currencyPair Currency pair * @param opts.timezone Timezone */ - public async listTickers(opts: { - currencyPair?: string; - timezone?: 'utc0' | 'utc8' | 'all'; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listTickers(opts: { currencyPair?: string, timezone?: 'utc0' | 'utc8' | 'all', } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/spot/tickers'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -203,13 +200,14 @@ export class SpotApi { opts = opts || {}; if (opts.currencyPair !== undefined) { - localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, 'string'); + localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, "string"); } if (opts.timezone !== undefined) { localVarQueryParameters['timezone'] = ObjectSerializer.serialize(opts.timezone, "'utc0' | 'utc8' | 'all'"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -218,7 +216,7 @@ export class SpotApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** @@ -230,13 +228,10 @@ export class SpotApi { * @param opts.limit Maximum number of order depth data in asks or bids * @param opts.withId Return order book ID */ - public async listOrderBook( - currencyPair: string, - opts: { interval?: string; limit?: number; withId?: boolean }, - ): Promise<{ response: AxiosResponse; body: OrderBook }> { + public async listOrderBook(currencyPair: string, opts: { interval?: string, limit?: number, withId?: boolean, } ) : Promise<{ response: AxiosResponse; body: OrderBook; }> { const localVarPath = this.client.basePath + '/spot/order_book'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -251,20 +246,21 @@ export class SpotApi { } opts = opts || {}; - localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(currencyPair, 'string'); + localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(currencyPair, "string"); if (opts.interval !== undefined) { - localVarQueryParameters['interval'] = ObjectSerializer.serialize(opts.interval, 'string'); + localVarQueryParameters['interval'] = ObjectSerializer.serialize(opts.interval, "string"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.withId !== undefined) { - localVarQueryParameters['with_id'] = ObjectSerializer.serialize(opts.withId, 'boolean'); + localVarQueryParameters['with_id'] = ObjectSerializer.serialize(opts.withId, "boolean"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -273,11 +269,11 @@ export class SpotApi { }; const authSettings = []; - return this.client.request(config, 'OrderBook', authSettings); + return this.client.request(config, "OrderBook", authSettings); } /** - * 支持指定 `from` 和 `to` 按时间范围查询或基于 `last_id` 的翻页查询。默认按时间范围查询,查询范围为最近30天。 基于 `last_id` 翻页的查询方式不再推荐继续使用。如果指定 `last_id` ,时间范围查询参数会被忽略。 使用 limit&page分页功能检索数据时最大分页数量为100,000条,即 (limit * page - 1) <= 100000。 + * Supports specifying `from` and `to` to query by time range or paging query based on `last_id`. The default query is by time range, and the query range is the last 30 days. The query method based on `last_id` paging is no longer recommended. If `last_id` is specified, the time range query parameter will be ignored. When using the limit&page paging function to retrieve data, the maximum number of pages is 100,000, that is, (limit page - 1) <= 100000. * @summary Retrieve market trades * @param currencyPair Currency pair * @param opts Optional parameters @@ -288,13 +284,10 @@ export class SpotApi { * @param opts.to Time range ending, default to current time * @param opts.page Page number */ - public async listTrades( - currencyPair: string, - opts: { limit?: number; lastId?: string; reverse?: boolean; from?: number; to?: number; page?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { + public async listTrades(currencyPair: string, opts: { limit?: number, lastId?: string, reverse?: boolean, from?: number, to?: number, page?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/spot/trades'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -309,32 +302,33 @@ export class SpotApi { } opts = opts || {}; - localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(currencyPair, 'string'); + localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(currencyPair, "string"); if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.lastId !== undefined) { - localVarQueryParameters['last_id'] = ObjectSerializer.serialize(opts.lastId, 'string'); + localVarQueryParameters['last_id'] = ObjectSerializer.serialize(opts.lastId, "string"); } if (opts.reverse !== undefined) { - localVarQueryParameters['reverse'] = ObjectSerializer.serialize(opts.reverse, 'boolean'); + localVarQueryParameters['reverse'] = ObjectSerializer.serialize(opts.reverse, "boolean"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -343,7 +337,7 @@ export class SpotApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** @@ -356,18 +350,10 @@ export class SpotApi { * @param opts.to End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time * @param opts.interval Interval time between data points. Note that `30d` means 1 natual month, not 30 days */ - public async listCandlesticks( - currencyPair: string, - opts: { - limit?: number; - from?: number; - to?: number; - interval?: '10s' | '1m' | '5m' | '15m' | '30m' | '1h' | '4h' | '8h' | '1d' | '7d' | '30d'; - }, - ): Promise<{ response: AxiosResponse; body: Array> }> { + public async listCandlesticks(currencyPair: string, opts: { limit?: number, from?: number, to?: number, interval?: '10s' | '1m' | '5m' | '15m' | '30m' | '1h' | '4h' | '8h' | '1d' | '7d' | '30d', } ) : Promise<{ response: AxiosResponse; body: Array>; }> { const localVarPath = this.client.basePath + '/spot/candlesticks'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -382,27 +368,25 @@ export class SpotApi { } opts = opts || {}; - localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(currencyPair, 'string'); + localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(currencyPair, "string"); if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.interval !== undefined) { - localVarQueryParameters['interval'] = ObjectSerializer.serialize( - opts.interval, - "'10s' | '1m' | '5m' | '15m' | '30m' | '1h' | '4h' | '8h' | '1d' | '7d' | '30d'", - ); + localVarQueryParameters['interval'] = ObjectSerializer.serialize(opts.interval, "'10s' | '1m' | '5m' | '15m' | '30m' | '1h' | '4h' | '8h' | '1d' | '7d' | '30d'"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -411,7 +395,7 @@ export class SpotApi { }; const authSettings = []; - return this.client.request>>(config, 'Array>', authSettings); + return this.client.request>>(config, "Array>", authSettings); } /** @@ -420,10 +404,10 @@ export class SpotApi { * @param opts Optional parameters * @param opts.currencyPair 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 */ - public async getFee(opts: { currencyPair?: string }): Promise<{ response: AxiosResponse; body: SpotFee }> { + public async getFee(opts: { currencyPair?: string, } ) : Promise<{ response: AxiosResponse; body: SpotFee; }> { const localVarPath = this.client.basePath + '/spot/fee'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -434,9 +418,10 @@ export class SpotApi { opts = opts || {}; if (opts.currencyPair !== undefined) { - localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, 'string'); + localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -445,20 +430,18 @@ export class SpotApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'SpotFee', authSettings); + return this.client.request(config, "SpotFee", authSettings); } /** - * + * * @summary Query a batch of user trading fee rates * @param currencyPairs A request can only query up to 50 currency pairs */ - public async getBatchSpotFee( - currencyPairs: string, - ): Promise<{ response: AxiosResponse; body: { [key: string]: SpotFee } }> { + public async getBatchSpotFee(currencyPairs: string) : Promise<{ response: AxiosResponse; body: { [key: string]: SpotFee; }; }> { const localVarPath = this.client.basePath + '/spot/batch_fee'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -472,7 +455,8 @@ export class SpotApi { throw new Error('Required parameter currencyPairs was null or undefined when calling getBatchSpotFee.'); } - localVarQueryParameters['currency_pairs'] = ObjectSerializer.serialize(currencyPairs, 'string'); + localVarQueryParameters['currency_pairs'] = ObjectSerializer.serialize(currencyPairs, "string"); + const config: AxiosRequestConfig = { method: 'GET', @@ -482,21 +466,19 @@ export class SpotApi { }; const authSettings = ['apiv4']; - return this.client.request<{ [key: string]: SpotFee }>(config, '{ [key: string]: SpotFee; }', authSettings); + return this.client.request<{ [key: string]: SpotFee; }>(config, "{ [key: string]: SpotFee; }", authSettings); } /** - * + * * @summary List spot accounts * @param opts Optional parameters * @param opts.currency Retrieve data of the specified currency */ - public async listSpotAccounts(opts: { - currency?: string; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listSpotAccounts(opts: { currency?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/spot/accounts'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -507,9 +489,10 @@ export class SpotApi { opts = opts || {}; if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -518,11 +501,11 @@ export class SpotApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * 记录查询时间范围不允许超过 30 天。 使用 limit&page分页功能检索数据时最大分页数量为100,000条,即 (limit * page - 1) <= 100000。 + * 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. * @summary Query account book * @param opts Optional parameters * @param opts.currency Retrieve data of the specified currency @@ -532,17 +515,10 @@ export class SpotApi { * @param opts.limit Maximum number of records to be returned in a single list * @param opts.type Only retrieve changes of the specified type. All types will be returned if not specified. */ - public async listSpotAccountBook(opts: { - currency?: string; - from?: number; - to?: number; - page?: number; - limit?: number; - type?: string; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listSpotAccountBook(opts: { currency?: string, from?: number, to?: number, page?: number, limit?: number, type?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/spot/account_book'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -553,29 +529,30 @@ export class SpotApi { opts = opts || {}; if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, "string"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.type !== undefined) { - localVarQueryParameters['type'] = ObjectSerializer.serialize(opts.type, 'string'); + localVarQueryParameters['type'] = ObjectSerializer.serialize(opts.type, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -584,23 +561,20 @@ export class SpotApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * 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 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 * @summary Create a batch of orders - * @param order + * @param order * @param opts Optional parameters - * @param opts.xGateExptime 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 + * @param opts.xGateExptime Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected */ - public async createBatchOrders( - order: Array, - opts: { xGateExptime?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { + public async createBatchOrders(order: Array, opts: { xGateExptime?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/spot/batch_orders'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -616,7 +590,7 @@ export class SpotApi { opts = opts || {}; if (opts.xGateExptime !== undefined) { - localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'number'); + localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, "number"); } const config: AxiosRequestConfig = { @@ -624,11 +598,11 @@ export class SpotApi { params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(order, 'Array'), + data: ObjectSerializer.serialize(order, "Array") }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** @@ -639,14 +613,10 @@ export class SpotApi { * @param opts.limit Maximum number of records returned in one page in each currency pair * @param opts.account Specify operation account. Default to spot ,portfolio and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only */ - public async listAllOpenOrders(opts: { - page?: number; - limit?: number; - account?: string; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listAllOpenOrders(opts: { page?: number, limit?: number, account?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/spot/open_orders'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -657,17 +627,18 @@ export class SpotApi { opts = opts || {}; if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.account !== undefined) { - localVarQueryParameters['account'] = ObjectSerializer.serialize(opts.account, 'string'); + localVarQueryParameters['account'] = ObjectSerializer.serialize(opts.account, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -676,20 +647,18 @@ export class SpotApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** * 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 * @summary close position when cross-currency is disabled - * @param liquidateOrder + * @param liquidateOrder */ - public async createCrossLiquidateOrder( - liquidateOrder: LiquidateOrder, - ): Promise<{ response: AxiosResponse; body: Order }> { + public async createCrossLiquidateOrder(liquidateOrder: LiquidateOrder) : Promise<{ response: AxiosResponse; body: Order; }> { const localVarPath = this.client.basePath + '/spot/cross_liquidate_orders'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -700,28 +669,27 @@ export class SpotApi { // verify required parameter 'liquidateOrder' is not null or undefined if (liquidateOrder === null || liquidateOrder === undefined) { - throw new Error( - 'Required parameter liquidateOrder was null or undefined when calling createCrossLiquidateOrder.', - ); + throw new Error('Required parameter liquidateOrder was null or undefined when calling createCrossLiquidateOrder.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(liquidateOrder, 'LiquidateOrder'), + data: ObjectSerializer.serialize(liquidateOrder, "LiquidateOrder") }; const authSettings = ['apiv4']; - return this.client.request(config, 'Order', authSettings); + return this.client.request(config, "Order", authSettings); } /** * Spot, portfolio and margin orders are returned by default. If cross margin orders are needed, `account` must be set to `cross_margin` When `status` is `open`, i.e., listing open orders, only pagination parameters `page` and `limit` are supported and `limit` cannot be larger than 100. Query by `side` and time range parameters `from` and `to` are not supported. When `status` is `finished`, i.e., listing finished orders, pagination parameters, time range parameters `from` and `to`, and `side` parameters are all supported. Time range parameters are handled as order finish time. * @summary List orders * @param currencyPair Retrieve results with specified currency pair. It is required for open orders, but optional for finished ones. - * @param status List orders based on status `open` - order is waiting to be filled `finished` - order has been filled or cancelled + * @param status List orders based on status `open` - order is waiting to be filled `finished` - order has been filled or cancelled * @param opts Optional parameters * @param opts.page Page number * @param opts.limit Maximum number of records to be returned. If `status` is `open`, maximum of `limit` is 100 @@ -730,14 +698,10 @@ export class SpotApi { * @param opts.to Time range ending, default to current time * @param opts.side All bids or asks. Both included if not specified */ - public async listOrders( - currencyPair: string, - status: string, - opts: { page?: number; limit?: number; account?: string; from?: number; to?: number; side?: string }, - ): Promise<{ response: AxiosResponse; body: Array }> { + public async listOrders(currencyPair: string, status: string, opts: { page?: number, limit?: number, account?: string, from?: number, to?: number, side?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/spot/orders'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -757,34 +721,35 @@ export class SpotApi { } opts = opts || {}; - localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(currencyPair, 'string'); + localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(currencyPair, "string"); - localVarQueryParameters['status'] = ObjectSerializer.serialize(status, 'string'); + localVarQueryParameters['status'] = ObjectSerializer.serialize(status, "string"); if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.account !== undefined) { - localVarQueryParameters['account'] = ObjectSerializer.serialize(opts.account, 'string'); + localVarQueryParameters['account'] = ObjectSerializer.serialize(opts.account, "string"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.side !== undefined) { - localVarQueryParameters['side'] = ObjectSerializer.serialize(opts.side, 'string'); + localVarQueryParameters['side'] = ObjectSerializer.serialize(opts.side, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -793,23 +758,20 @@ export class SpotApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * 支持现货、保证金、杠杆、全仓杠杆下单。通过 `account` 字段来使用不同的账户,默认为 `spot` ,即使用现货账户下单,如果用户是 `unified` 账户,默认是用统一账户下单 使用杠杆账户交易,即 `account` 设置为 `margin` 的时候,可以设置 `auto_borrow` 为 `true`, 在账户余额不足的情况,由系统自动执行 `POST /margin/uni/loans` 借入不足部分。 杠杆下单成交之后的获取到的资产是否自动用于归还逐仓杠杆账户的借入单,取决于用户逐仓杠杆**账户**的自动还款设置, 该账户自动还款设置可以通过 `/margin/auto_repay` 来查询和设置。 使用全仓杠杆账户交易,即 `account` 设置为 `cross_margin` 的时候,同样可以启用 `auto_borrow` 来实现自动借入不足部分,但是与逐仓杠杆账户不同的是,全仓杠杆账户的委托是否自动还款取决于下单时的 `auto_repay` 设置,该设置只对当前委托生效,即只有该委托成交之后获取到的资产会用来还款全仓杠杆账户的借入单。 全仓杠杆账户下单目前支持同时开启 `auto_borrow` 和 `auto_repay`。 自动还款会在订单结束时触发,即 `status` 为 `cancelled` 或者 `closed` 。 **委托状态** 挂单中的委托状态是 `open` ,在数量全部成交之前保持为 `open` 。如果被全部吃掉,则订单结束,状态变成 `closed` 。 假如全部成交之前,订单被撤销,不管是否有部分成交,状态都会变为 `cancelled` **冰山委托** `iceberg` 用来设置冰山委托显示的数量,如果需要完全隐藏,设置为 `-1` 。注意隐藏部分成交时按照 taker 的手续费率收取。 **限制用户自成交** 设置 `stp_act` 来决定使用限制用户自成交的策略 + * Supports spot, margin, leverage, and cross margin orders. Use different accounts through the `account` field, the default is `spot`, that is, use the spot account to place orders, if the user is `unified` account, the default is to use the unified account to place orders When using margin account trading, that is, when `account` is set to `margin`, you can set `auto_borrow` to `true`, When the account balance is insufficient, the system automatically executes `POST marginuniloans` to borrow the insufficient amount. Whether the assets obtained after placing a margin order are automatically used to return the borrowing order of the isolated margin account depends on the automatic repayment settings of the user\'s isolated margin account, The automatic repayment settings of this account can be queried and set through `marginauto_repay`. When using cross margin account trading, that is, when `account` is set to `cross_margin`, `auto_borrow` To realize the automatic borrowing of the insufficient part, but unlike the isolated margin account, whether the entrustment of the cross margin account is automatically repaid depends on the time when the order is placed `auto_repay` setting, this setting only takes effect for the current order, that is, only the assets obtained after the order is completed will be used to repay the borrowing order of the cross margin account. Placing orders on cross margin accounts currently supports enabling `auto_borrow` and `auto_repay` at the same time. Automatic repayment will be triggered when the order ends, that is, the `status` is `cancelled` or `closed`. Delegation status The order status in the pending order is `open` and remains `open` until all the quantities are filled. If all are filled, the order ends and the status becomes `closed`. If the order is canceled before all transactions are completed, the status will change to `cancelled` regardless of whether there is partial execution or not. Iceberg Commission `iceberg` is used to set the number of iceberg orders displayed. If you need to hide it completely, set it to `-1`. Note that when hiding partial transactions, follow the instructions The taker\'s handling fee is charged. Restrict users to self-transact Set `stp_act` to decide to use a strategy that limits users\' self-transactions * @summary Create an order - * @param order + * @param order * @param opts Optional parameters - * @param opts.xGateExptime 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 + * @param opts.xGateExptime Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected */ - public async createOrder( - order: Order, - opts: { xGateExptime?: number }, - ): Promise<{ response: AxiosResponse; body: Order }> { + public async createOrder(order: Order, opts: { xGateExptime?: number, } ) : Promise<{ response: AxiosResponse; body: Order; }> { const localVarPath = this.client.basePath + '/spot/orders'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -825,7 +787,7 @@ export class SpotApi { opts = opts || {}; if (opts.xGateExptime !== undefined) { - localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'number'); + localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, "number"); } const config: AxiosRequestConfig = { @@ -833,33 +795,27 @@ export class SpotApi { params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(order, 'Order'), + data: ObjectSerializer.serialize(order, "Order") }; const authSettings = ['apiv4']; - return this.client.request(config, 'Order', authSettings); + return this.client.request(config, "Order", authSettings); } /** - * 不指定 `account` 参数时,包括现货、保证金、逐仓杠杆和全仓杠杆在内的所有挂单都会执行撤销操作。 不指定 `currency_pair`时,会撤销所有交易对的挂单 可以单独指定某一种账户,撤销指定账户下的所有挂单 + * If `account` is not set, all open orders, including spot, portfolio, margin and cross margin ones, will be cancelled. If `currency_pair` is not specified, all pending orders for trading pairs will be cancelled. You can set `account` to cancel only orders within the specified account * @summary Cancel all `open` orders in specified currency pair * @param opts Optional parameters * @param opts.currencyPair Currency pair * @param opts.side All bids or asks. Both included if not specified - * @param opts.account 指定账户类型 - 经典账户:不指定则全部包含 - 统一账户:指定`unified` - 统一账户(旧):只能指定`cross_margin` + * @param opts.account Specify account type: - Classic account: Includes all if not specified - Unified account: Specify `unified` - Unified account (legacy): Can only specify `cross_margin` * @param opts.actionMode 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 opts.xGateExptime 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 + * @param opts.xGateExptime Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected */ - public async cancelOrders(opts: { - currencyPair?: string; - side?: string; - account?: string; - actionMode?: string; - xGateExptime?: number; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async cancelOrders(opts: { currencyPair?: string, side?: string, account?: string, actionMode?: string, xGateExptime?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/spot/orders'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -870,23 +826,23 @@ export class SpotApi { opts = opts || {}; if (opts.currencyPair !== undefined) { - localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, 'string'); + localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, "string"); } if (opts.side !== undefined) { - localVarQueryParameters['side'] = ObjectSerializer.serialize(opts.side, 'string'); + localVarQueryParameters['side'] = ObjectSerializer.serialize(opts.side, "string"); } if (opts.account !== undefined) { - localVarQueryParameters['account'] = ObjectSerializer.serialize(opts.account, 'string'); + localVarQueryParameters['account'] = ObjectSerializer.serialize(opts.account, "string"); } if (opts.actionMode !== undefined) { - localVarQueryParameters['action_mode'] = ObjectSerializer.serialize(opts.actionMode, 'string'); + localVarQueryParameters['action_mode'] = ObjectSerializer.serialize(opts.actionMode, "string"); } if (opts.xGateExptime !== undefined) { - localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'number'); + localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, "number"); } const config: AxiosRequestConfig = { @@ -897,23 +853,20 @@ export class SpotApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** * Multiple currency pairs can be specified, but maximum 20 orders are allowed per request * @summary Cancel a batch of orders with an ID list - * @param cancelBatchOrder + * @param cancelBatchOrder * @param opts Optional parameters - * @param opts.xGateExptime 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 + * @param opts.xGateExptime Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected */ - public async cancelBatchOrders( - cancelBatchOrder: Array, - opts: { xGateExptime?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { + public async cancelBatchOrders(cancelBatchOrder: Array, opts: { xGateExptime?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/spot/cancel_batch_orders'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -924,14 +877,12 @@ export class SpotApi { // verify required parameter 'cancelBatchOrder' is not null or undefined if (cancelBatchOrder === null || cancelBatchOrder === undefined) { - throw new Error( - 'Required parameter cancelBatchOrder was null or undefined when calling cancelBatchOrders.', - ); + throw new Error('Required parameter cancelBatchOrder was null or undefined when calling cancelBatchOrders.'); } opts = opts || {}; if (opts.xGateExptime !== undefined) { - localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'number'); + localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, "number"); } const config: AxiosRequestConfig = { @@ -939,31 +890,26 @@ export class SpotApi { params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(cancelBatchOrder, 'Array'), + data: ObjectSerializer.serialize(cancelBatchOrder, "Array") }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** * Spot, portfolio and margin orders are queried by default. If cross margin orders are needed or portfolio margin account are used, account must be set to cross_margin. * @summary Get a single order * @param orderId Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted. - * @param currencyPair 指定交易对查询。如果查询挂单的记录,该字段必选。如果查询已成交的记录,该字段可以不指定 + * @param currencyPair 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. * @param opts Optional parameters * @param opts.account Specify operation account. Default to spot ,portfolio and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only */ - public async getOrder( - orderId: string, - currencyPair: string, - opts: { account?: string }, - ): Promise<{ response: AxiosResponse; body: Order }> { - const localVarPath = - this.client.basePath + - '/spot/orders/{order_id}'.replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getOrder(orderId: string, currencyPair: string, opts: { account?: string, } ) : Promise<{ response: AxiosResponse; body: Order; }> { + const localVarPath = this.client.basePath + '/spot/orders/{order_id}' + .replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -983,12 +929,13 @@ export class SpotApi { } opts = opts || {}; - localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(currencyPair, 'string'); + localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(currencyPair, "string"); if (opts.account !== undefined) { - localVarQueryParameters['account'] = ObjectSerializer.serialize(opts.account, 'string'); + localVarQueryParameters['account'] = ObjectSerializer.serialize(opts.account, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -997,7 +944,7 @@ export class SpotApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'Order', authSettings); + return this.client.request(config, "Order", authSettings); } /** @@ -1008,18 +955,13 @@ export class SpotApi { * @param opts Optional parameters * @param opts.account Specify operation account. Default to spot ,portfolio and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only * @param opts.actionMode 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 opts.xGateExptime 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 + * @param opts.xGateExptime Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected */ - public async cancelOrder( - orderId: string, - currencyPair: string, - opts: { account?: string; actionMode?: string; xGateExptime?: number }, - ): Promise<{ response: AxiosResponse; body: Order }> { - const localVarPath = - this.client.basePath + - '/spot/orders/{order_id}'.replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async cancelOrder(orderId: string, currencyPair: string, opts: { account?: string, actionMode?: string, xGateExptime?: number, } ) : Promise<{ response: AxiosResponse; body: Order; }> { + const localVarPath = this.client.basePath + '/spot/orders/{order_id}' + .replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1039,18 +981,18 @@ export class SpotApi { } opts = opts || {}; - localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(currencyPair, 'string'); + localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(currencyPair, "string"); if (opts.account !== undefined) { - localVarQueryParameters['account'] = ObjectSerializer.serialize(opts.account, 'string'); + localVarQueryParameters['account'] = ObjectSerializer.serialize(opts.account, "string"); } if (opts.actionMode !== undefined) { - localVarQueryParameters['action_mode'] = ObjectSerializer.serialize(opts.actionMode, 'string'); + localVarQueryParameters['action_mode'] = ObjectSerializer.serialize(opts.actionMode, "string"); } if (opts.xGateExptime !== undefined) { - localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'number'); + localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, "number"); } const config: AxiosRequestConfig = { @@ -1061,29 +1003,24 @@ export class SpotApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'Order', authSettings); + return this.client.request(config, "Order", authSettings); } /** - * 默认修改现货、保证金和逐仓杠杆账户的订单,如果需要修改全仓杠杆账户订单,必须指定 `account` 为 `cross_margin`,统一账户 `account` 只能指定为 `cross_margin`。 目前请求体和query都支持currency_pair和account传参,但请求体优先级更高 currency_pair必须在请求体或query中二选一填入 目前只支持修改价格或数量(二选一) 关于限速:修改订单和创建订单共享限速规则 关于匹配优先级:只修改数量变小不影响匹配优先级,修改价格或修改数量变大则优先级将调整到新价格最后面 注意事项:修改数量小于已成交数量会触发撤单操作 + * By default, orders for spot, margin and isolated margin accounts are modified. If you need to modify orders for cross margin accounts, you must specify `account` as `cross_margin` and unify the account.`account` can only be specified as `cross_margin`. Currently both the request body and query support currency_pair and account parameters, but the request body has a higher priority currency_pair must be filled in either the request body or query Currently only supports modifying price or quantity (choose one of the two) About speed limit: Modify orders and create orders to share speed limit rules About matching priority: only modifying the quantity to make it smaller will not affect the matching priority. If you modify the price or modify the quantity to become larger, the priority will be adjusted to the end of the new price Note: The modified quantity is smaller than the completed quantity, which will trigger the order cancellation operation * @summary Amend an order * @param orderId Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted. - * @param orderPatch + * @param orderPatch * @param opts Optional parameters * @param opts.currencyPair Currency pair * @param opts.account Specify operation account. Default to spot ,portfolio and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only - * @param opts.xGateExptime 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 + * @param opts.xGateExptime Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected */ - public async amendOrder( - orderId: string, - orderPatch: OrderPatch, - opts: { currencyPair?: string; account?: string; xGateExptime?: number }, - ): Promise<{ response: AxiosResponse; body: Order }> { - const localVarPath = - this.client.basePath + - '/spot/orders/{order_id}'.replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async amendOrder(orderId: string, orderPatch: OrderPatch, opts: { currencyPair?: string, account?: string, xGateExptime?: number, } ) : Promise<{ response: AxiosResponse; body: Order; }> { + const localVarPath = this.client.basePath + '/spot/orders/{order_id}' + .replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1104,15 +1041,15 @@ export class SpotApi { opts = opts || {}; if (opts.currencyPair !== undefined) { - localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, 'string'); + localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, "string"); } if (opts.account !== undefined) { - localVarQueryParameters['account'] = ObjectSerializer.serialize(opts.account, 'string'); + localVarQueryParameters['account'] = ObjectSerializer.serialize(opts.account, "string"); } if (opts.xGateExptime !== undefined) { - localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'number'); + localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, "number"); } const config: AxiosRequestConfig = { @@ -1120,15 +1057,15 @@ export class SpotApi { params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(orderPatch, 'OrderPatch'), + data: ObjectSerializer.serialize(orderPatch, "OrderPatch") }; const authSettings = ['apiv4']; - return this.client.request(config, 'Order', authSettings); + return this.client.request(config, "Order", authSettings); } /** - * 默认查询现货、保证金和逐仓杠杆账户的成交记录,如果需要查询全仓杠杆账户的成交记录,必须指定 `account` 为 `cross_margin` 。 可以通过指定 `from` 或(和) `to` 来查询指定时间范围内的历史。 - 如果不指定任何时间参数,只能获取最近 7 天的数据。 - 如果只指定 `from` 或 `to` 的任一参数,也同样只返回指定时间开始(或结束)的 7 天范围的数据。 - `from` 和 `to` 的范围不允许超过 30 天 。 时间范围筛选的参数均是按订单**结束**时间来处理。 使用 limit&page分页功能检索数据时最大分页数量为100,000条,即 (limit * page - 1) <= 100000。 + * Spot,portfolio and margin trades are queried by default. If cross margin trades are needed, `account` must be set to `cross_margin` You can also set `from` and(or) `to` to query by time range. If you don\'t specify `from` and/or `to` parameters, only the last 7 days of data will be retured. The range of `from` and `to` is not alloed to exceed 30 days. Time range parameters are handled as order finish time. When using the limit&page paging function to retrieve data, the maximum number of pages is 100,000, that is, (limit * page - 1) <= 100000. * @summary List personal trading history * @param opts Optional parameters * @param opts.currencyPair Retrieve results with specified currency pair @@ -1139,18 +1076,10 @@ export class SpotApi { * @param opts.from Start timestamp of the query * @param opts.to Time range ending, default to current time */ - public async listMyTrades(opts: { - currencyPair?: string; - limit?: number; - page?: number; - orderId?: string; - account?: string; - from?: number; - to?: number; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listMyTrades(opts: { currencyPair?: string, limit?: number, page?: number, orderId?: string, account?: string, from?: number, to?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/spot/my_trades'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1161,33 +1090,34 @@ export class SpotApi { opts = opts || {}; if (opts.currencyPair !== undefined) { - localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, 'string'); + localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, "string"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } if (opts.orderId !== undefined) { - localVarQueryParameters['order_id'] = ObjectSerializer.serialize(opts.orderId, 'string'); + localVarQueryParameters['order_id'] = ObjectSerializer.serialize(opts.orderId, "string"); } if (opts.account !== undefined) { - localVarQueryParameters['account'] = ObjectSerializer.serialize(opts.account, 'string'); + localVarQueryParameters['account'] = ObjectSerializer.serialize(opts.account, "string"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -1196,17 +1126,17 @@ export class SpotApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Get server current time */ - public async getSystemTime(): Promise<{ response: AxiosResponse; body: SystemTime }> { + public async getSystemTime() : Promise<{ response: AxiosResponse; body: SystemTime; }> { const localVarPath = this.client.basePath + '/spot/time'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1215,6 +1145,7 @@ export class SpotApi { localVarHeaderParams.Accept = produces.join(','); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -1223,20 +1154,18 @@ export class SpotApi { }; const authSettings = []; - return this.client.request(config, 'SystemTime', authSettings); + return this.client.request(config, "SystemTime", authSettings); } /** * 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. * @summary Countdown cancel orders - * @param countdownCancelAllSpotTask + * @param countdownCancelAllSpotTask */ - public async countdownCancelAllSpot( - countdownCancelAllSpotTask: CountdownCancelAllSpotTask, - ): Promise<{ response: AxiosResponse; body: TriggerTime }> { + public async countdownCancelAllSpot(countdownCancelAllSpotTask: CountdownCancelAllSpotTask) : Promise<{ response: AxiosResponse; body: TriggerTime; }> { const localVarPath = this.client.basePath + '/spot/countdown_cancel_all'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1247,37 +1176,33 @@ export class SpotApi { // verify required parameter 'countdownCancelAllSpotTask' is not null or undefined if (countdownCancelAllSpotTask === null || countdownCancelAllSpotTask === undefined) { - throw new Error( - 'Required parameter countdownCancelAllSpotTask was null or undefined when calling countdownCancelAllSpot.', - ); + throw new Error('Required parameter countdownCancelAllSpotTask was null or undefined when calling countdownCancelAllSpot.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(countdownCancelAllSpotTask, 'CountdownCancelAllSpotTask'), + data: ObjectSerializer.serialize(countdownCancelAllSpotTask, "CountdownCancelAllSpotTask") }; const authSettings = ['apiv4']; - return this.client.request(config, 'TriggerTime', authSettings); + return this.client.request(config, "TriggerTime", authSettings); } /** * Default modification of orders for spot, portfolio, and margin accounts. To modify orders for a cross margin account, the `account` parameter must be specified as `cross_margin`. For portfolio margin accounts, the `account` parameter can only be specified as `cross_margin`. Currently, only modifications to price or quantity (choose one) are supported. When modifying unfinished orders, a maximum of 5 orders can be batch-modified in one request. The request parameters should be passed in an array format. During batch modification, if one order modification fails, the modification process will continue with the next order. After execution, the response will include corresponding failure information for the failed orders. The sequence of calling for batch order modification should be consistent with the order in the order list. The response content order for batch order modification will also be consistent with the order in the order list. * @summary Batch modification of orders - * @param batchAmendItem + * @param batchAmendItem * @param opts Optional parameters - * @param opts.xGateExptime 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 + * @param opts.xGateExptime Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected */ - public async amendBatchOrders( - batchAmendItem: Array, - opts: { xGateExptime?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { + public async amendBatchOrders(batchAmendItem: Array, opts: { xGateExptime?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/spot/amend_batch_orders'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1293,7 +1218,7 @@ export class SpotApi { opts = opts || {}; if (opts.xGateExptime !== undefined) { - localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'number'); + localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, "number"); } const config: AxiosRequestConfig = { @@ -1301,34 +1226,28 @@ export class SpotApi { params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(batchAmendItem, 'Array'), + data: ObjectSerializer.serialize(batchAmendItem, "Array") }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * - * @summary 查询现货保险基金历史数据 - * @param business 杠杆业务,margin - 逐仓;unified - 统一账户 + * + * @summary Query spot insurance fund historical data + * @param business Leverage business, margin - position by position; unified - unified account * @param currency Currency - * @param from 起始时间戳,秒级 - * @param to 终止时间戳,秒级 + * @param from Start timestamp, seconds + * @param to End timestamp, in seconds * @param opts Optional parameters * @param opts.page Page number - * @param opts.limit 列表返回的最大数量, 默认值30 + * @param opts.limit The maximum number of items returned in the list, the default value is 30 */ - public async getSpotInsuranceHistory( - business: string, - currency: string, - from: number, - to: number, - opts: { page?: number; limit?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { + public async getSpotInsuranceHistory(business: string, currency: string, from: number, to: number, opts: { page?: number, limit?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/spot/insurance_history'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1358,21 +1277,22 @@ export class SpotApi { } opts = opts || {}; - localVarQueryParameters['business'] = ObjectSerializer.serialize(business, 'string'); + localVarQueryParameters['business'] = ObjectSerializer.serialize(business, "string"); - localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, "string"); if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } - localVarQueryParameters['from'] = ObjectSerializer.serialize(from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(from, "number"); + + localVarQueryParameters['to'] = ObjectSerializer.serialize(to, "number"); - localVarQueryParameters['to'] = ObjectSerializer.serialize(to, 'number'); const config: AxiosRequestConfig = { method: 'GET', @@ -1382,11 +1302,11 @@ export class SpotApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Retrieve running auto order list * @param status Only list the orders with this status * @param opts Optional parameters @@ -1395,13 +1315,10 @@ export class SpotApi { * @param opts.limit Maximum number of records to be returned in a single list * @param opts.offset List offset, starting from 0 */ - public async listSpotPriceTriggeredOrders( - status: 'open' | 'finished', - opts: { market?: string; account?: 'normal' | 'margin' | 'cross_margin'; limit?: number; offset?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { + public async listSpotPriceTriggeredOrders(status: 'open' | 'finished', opts: { market?: string, account?: 'normal' | 'margin' | 'cross_margin', limit?: number, offset?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/spot/price_orders'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1412,33 +1329,29 @@ export class SpotApi { // verify required parameter 'status' is not null or undefined if (status === null || status === undefined) { - throw new Error( - 'Required parameter status was null or undefined when calling listSpotPriceTriggeredOrders.', - ); + throw new Error('Required parameter status was null or undefined when calling listSpotPriceTriggeredOrders.'); } opts = opts || {}; localVarQueryParameters['status'] = ObjectSerializer.serialize(status, "'open' | 'finished'"); if (opts.market !== undefined) { - localVarQueryParameters['market'] = ObjectSerializer.serialize(opts.market, 'string'); + localVarQueryParameters['market'] = ObjectSerializer.serialize(opts.market, "string"); } if (opts.account !== undefined) { - localVarQueryParameters['account'] = ObjectSerializer.serialize( - opts.account, - "'normal' | 'margin' | 'cross_margin'", - ); + localVarQueryParameters['account'] = ObjectSerializer.serialize(opts.account, "'normal' | 'margin' | 'cross_margin'"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -1447,24 +1360,18 @@ export class SpotApi { }; const authSettings = ['apiv4']; - return this.client.request>( - config, - 'Array', - authSettings, - ); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Create a price-triggered order - * @param spotPriceTriggeredOrder + * @param spotPriceTriggeredOrder */ - public async createSpotPriceTriggeredOrder( - spotPriceTriggeredOrder: SpotPriceTriggeredOrder, - ): Promise<{ response: AxiosResponse; body: TriggerOrderResponse }> { + public async createSpotPriceTriggeredOrder(spotPriceTriggeredOrder: SpotPriceTriggeredOrder) : Promise<{ response: AxiosResponse; body: TriggerOrderResponse; }> { const localVarPath = this.client.basePath + '/spot/price_orders'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1475,37 +1382,33 @@ export class SpotApi { // verify required parameter 'spotPriceTriggeredOrder' is not null or undefined if (spotPriceTriggeredOrder === null || spotPriceTriggeredOrder === undefined) { - throw new Error( - 'Required parameter spotPriceTriggeredOrder was null or undefined when calling createSpotPriceTriggeredOrder.', - ); + throw new Error('Required parameter spotPriceTriggeredOrder was null or undefined when calling createSpotPriceTriggeredOrder.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(spotPriceTriggeredOrder, 'SpotPriceTriggeredOrder'), + data: ObjectSerializer.serialize(spotPriceTriggeredOrder, "SpotPriceTriggeredOrder") }; const authSettings = ['apiv4']; - return this.client.request(config, 'TriggerOrderResponse', authSettings); + return this.client.request(config, "TriggerOrderResponse", authSettings); } /** - * + * * @summary Cancel all open orders * @param opts Optional parameters * @param opts.market Currency pair * @param opts.account Trading account type. Portfolio margin account must set to `cross_margin` */ - public async cancelSpotPriceTriggeredOrderList(opts: { - market?: string; - account?: 'normal' | 'margin' | 'cross_margin'; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async cancelSpotPriceTriggeredOrderList(opts: { market?: string, account?: 'normal' | 'margin' | 'cross_margin', } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/spot/price_orders'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1516,16 +1419,14 @@ export class SpotApi { opts = opts || {}; if (opts.market !== undefined) { - localVarQueryParameters['market'] = ObjectSerializer.serialize(opts.market, 'string'); + localVarQueryParameters['market'] = ObjectSerializer.serialize(opts.market, "string"); } if (opts.account !== undefined) { - localVarQueryParameters['account'] = ObjectSerializer.serialize( - opts.account, - "'normal' | 'margin' | 'cross_margin'", - ); + localVarQueryParameters['account'] = ObjectSerializer.serialize(opts.account, "'normal' | 'margin' | 'cross_margin'"); } + const config: AxiosRequestConfig = { method: 'DELETE', params: localVarQueryParameters, @@ -1534,26 +1435,19 @@ export class SpotApi { }; const authSettings = ['apiv4']; - return this.client.request>( - config, - 'Array', - authSettings, - ); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Get a price-triggered order * @param orderId Retrieve the data of the order with the specified ID */ - public async getSpotPriceTriggeredOrder( - orderId: string, - ): Promise<{ response: AxiosResponse; body: SpotPriceTriggeredOrder }> { - const localVarPath = - this.client.basePath + - '/spot/price_orders/{order_id}'.replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getSpotPriceTriggeredOrder(orderId: string) : Promise<{ response: AxiosResponse; body: SpotPriceTriggeredOrder; }> { + const localVarPath = this.client.basePath + '/spot/price_orders/{order_id}' + .replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1564,11 +1458,10 @@ export class SpotApi { // verify required parameter 'orderId' is not null or undefined if (orderId === null || orderId === undefined) { - throw new Error( - 'Required parameter orderId was null or undefined when calling getSpotPriceTriggeredOrder.', - ); + throw new Error('Required parameter orderId was null or undefined when calling getSpotPriceTriggeredOrder.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -1577,22 +1470,19 @@ export class SpotApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'SpotPriceTriggeredOrder', authSettings); + return this.client.request(config, "SpotPriceTriggeredOrder", authSettings); } /** - * + * * @summary cancel a price-triggered order * @param orderId Retrieve the data of the order with the specified ID */ - public async cancelSpotPriceTriggeredOrder( - orderId: string, - ): Promise<{ response: AxiosResponse; body: SpotPriceTriggeredOrder }> { - const localVarPath = - this.client.basePath + - '/spot/price_orders/{order_id}'.replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async cancelSpotPriceTriggeredOrder(orderId: string) : Promise<{ response: AxiosResponse; body: SpotPriceTriggeredOrder; }> { + const localVarPath = this.client.basePath + '/spot/price_orders/{order_id}' + .replace('{' + 'order_id' + '}', encodeURIComponent(String(orderId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -1603,11 +1493,10 @@ export class SpotApi { // verify required parameter 'orderId' is not null or undefined if (orderId === null || orderId === undefined) { - throw new Error( - 'Required parameter orderId was null or undefined when calling cancelSpotPriceTriggeredOrder.', - ); + throw new Error('Required parameter orderId was null or undefined when calling cancelSpotPriceTriggeredOrder.'); } + const config: AxiosRequestConfig = { method: 'DELETE', params: localVarQueryParameters, @@ -1616,6 +1505,6 @@ export class SpotApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'SpotPriceTriggeredOrder', authSettings); + return this.client.request(config, "SpotPriceTriggeredOrder", authSettings); } } diff --git a/api/subAccountApi.ts b/api/subAccountApi.ts index 0f50108..15916da 100644 --- a/api/subAccountApi.ts +++ b/api/subAccountApi.ts @@ -9,6 +9,7 @@ * Do not edit the class manually. */ + /* tslint:disable:no-unused-locals */ import { SubAccount } from '../model/subAccount'; import { SubAccountKey } from '../model/subAccountKey'; @@ -33,17 +34,15 @@ export class SubAccountApi { } /** - * + * * @summary List sub-accounts * @param opts Optional parameters * @param opts.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. */ - public async listSubAccounts(opts: { - type?: string; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listSubAccounts(opts: { type?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/sub_accounts'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -54,9 +53,10 @@ export class SubAccountApi { opts = opts || {}; if (opts.type !== undefined) { - localVarQueryParameters['type'] = ObjectSerializer.serialize(opts.type, 'string'); + localVarQueryParameters['type'] = ObjectSerializer.serialize(opts.type, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -65,18 +65,18 @@ export class SubAccountApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Create a new sub-account - * @param subAccount + * @param subAccount */ - public async createSubAccounts(subAccount: SubAccount): Promise<{ response: AxiosResponse; body: SubAccount }> { + public async createSubAccounts(subAccount: SubAccount) : Promise<{ response: AxiosResponse; body: SubAccount; }> { const localVarPath = this.client.basePath + '/sub_accounts'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -90,29 +90,29 @@ export class SubAccountApi { throw new Error('Required parameter subAccount was null or undefined when calling createSubAccounts.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(subAccount, 'SubAccount'), + data: ObjectSerializer.serialize(subAccount, "SubAccount") }; const authSettings = ['apiv4']; - return this.client.request(config, 'SubAccount', authSettings); + return this.client.request(config, "SubAccount", authSettings); } /** - * + * * @summary Get the sub-account * @param userId Sub-account user id */ - public async getSubAccount(userId: number): Promise<{ response: AxiosResponse; body: SubAccount }> { - const localVarPath = - this.client.basePath + - '/sub_accounts/{user_id}'.replace('{' + 'user_id' + '}', encodeURIComponent(String(userId))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getSubAccount(userId: number) : Promise<{ response: AxiosResponse; body: SubAccount; }> { + const localVarPath = this.client.basePath + '/sub_accounts/{user_id}' + .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -126,6 +126,7 @@ export class SubAccountApi { throw new Error('Required parameter userId was null or undefined when calling getSubAccount.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -134,20 +135,19 @@ export class SubAccountApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'SubAccount', authSettings); + return this.client.request(config, "SubAccount", authSettings); } /** - * + * * @summary List all API Key of the sub-account * @param userId Sub-account user id */ - public async listSubAccountKeys(userId: number): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/sub_accounts/{user_id}/keys'.replace('{' + 'user_id' + '}', encodeURIComponent(String(userId))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async listSubAccountKeys(userId: number) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/sub_accounts/{user_id}/keys' + .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -161,6 +161,7 @@ export class SubAccountApi { throw new Error('Required parameter userId was null or undefined when calling listSubAccountKeys.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -169,24 +170,20 @@ export class SubAccountApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Create API Key of the sub-account * @param userId Sub-account user id - * @param subAccountKey + * @param subAccountKey */ - public async createSubAccountKeys( - userId: number, - subAccountKey: SubAccountKey, - ): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = - this.client.basePath + - '/sub_accounts/{user_id}/keys'.replace('{' + 'user_id' + '}', encodeURIComponent(String(userId))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async createSubAccountKeys(userId: number, subAccountKey: SubAccountKey) : Promise<{ response: AxiosResponse; body: Array; }> { + const localVarPath = this.client.basePath + '/sub_accounts/{user_id}/keys' + .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -202,40 +199,34 @@ export class SubAccountApi { // verify required parameter 'subAccountKey' is not null or undefined if (subAccountKey === null || subAccountKey === undefined) { - throw new Error( - 'Required parameter subAccountKey was null or undefined when calling createSubAccountKeys.', - ); + throw new Error('Required parameter subAccountKey was null or undefined when calling createSubAccountKeys.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(subAccountKey, 'SubAccountKey'), + data: ObjectSerializer.serialize(subAccountKey, "SubAccountKey") }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Get the API Key of the sub-account * @param userId Sub-account user id * @param key The API Key of the sub-account */ - public async getSubAccountKey( - userId: number, - key: string, - ): Promise<{ response: AxiosResponse; body: SubAccountKey }> { - const localVarPath = - this.client.basePath + - '/sub_accounts/{user_id}/keys/{key}' - .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId))) - .replace('{' + 'key' + '}', encodeURIComponent(String(key))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async getSubAccountKey(userId: number, key: string) : Promise<{ response: AxiosResponse; body: SubAccountKey; }> { + const localVarPath = this.client.basePath + '/sub_accounts/{user_id}/keys/{key}' + .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId))) + .replace('{' + 'key' + '}', encodeURIComponent(String(key))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -254,6 +245,7 @@ export class SubAccountApi { throw new Error('Required parameter key was null or undefined when calling getSubAccountKey.'); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -262,28 +254,22 @@ export class SubAccountApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'SubAccountKey', authSettings); + return this.client.request(config, "SubAccountKey", authSettings); } /** - * + * * @summary Update API key of the sub-account * @param userId Sub-account user id * @param key The API Key of the sub-account - * @param subAccountKey + * @param subAccountKey */ - public async updateSubAccountKeys( - userId: number, - key: string, - subAccountKey: SubAccountKey, - ): Promise<{ response: AxiosResponse; body?: any }> { - const localVarPath = - this.client.basePath + - '/sub_accounts/{user_id}/keys/{key}' - .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId))) - .replace('{' + 'key' + '}', encodeURIComponent(String(key))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async updateSubAccountKeys(userId: number, key: string, subAccountKey: SubAccountKey) : Promise<{ response: AxiosResponse; body?: any; }> { + const localVarPath = this.client.basePath + '/sub_accounts/{user_id}/keys/{key}' + .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId))) + .replace('{' + 'key' + '}', encodeURIComponent(String(key))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); // verify required parameter 'userId' is not null or undefined if (userId === null || userId === undefined) { @@ -297,37 +283,34 @@ export class SubAccountApi { // verify required parameter 'subAccountKey' is not null or undefined if (subAccountKey === null || subAccountKey === undefined) { - throw new Error( - 'Required parameter subAccountKey was null or undefined when calling updateSubAccountKeys.', - ); + throw new Error('Required parameter subAccountKey was null or undefined when calling updateSubAccountKeys.'); } + const config: AxiosRequestConfig = { method: 'PUT', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(subAccountKey, 'SubAccountKey'), + data: ObjectSerializer.serialize(subAccountKey, "SubAccountKey") }; const authSettings = ['apiv4']; - return this.client.request(config, '', authSettings); + return this.client.request(config, "", authSettings); } /** - * + * * @summary Delete API key of the sub-account * @param userId Sub-account user id * @param key The API Key of the sub-account */ - public async deleteSubAccountKeys(userId: number, key: string): Promise<{ response: AxiosResponse; body?: any }> { - const localVarPath = - this.client.basePath + - '/sub_accounts/{user_id}/keys/{key}' - .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId))) - .replace('{' + 'key' + '}', encodeURIComponent(String(key))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async deleteSubAccountKeys(userId: number, key: string) : Promise<{ response: AxiosResponse; body?: any; }> { + const localVarPath = this.client.basePath + '/sub_accounts/{user_id}/keys/{key}' + .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId))) + .replace('{' + 'key' + '}', encodeURIComponent(String(key))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); // verify required parameter 'userId' is not null or undefined if (userId === null || userId === undefined) { @@ -339,6 +322,7 @@ export class SubAccountApi { throw new Error('Required parameter key was null or undefined when calling deleteSubAccountKeys.'); } + const config: AxiosRequestConfig = { method: 'DELETE', params: localVarQueryParameters, @@ -347,26 +331,26 @@ export class SubAccountApi { }; const authSettings = ['apiv4']; - return this.client.request(config, '', authSettings); + return this.client.request(config, "", authSettings); } /** - * + * * @summary Lock the sub-account * @param userId The user id of the sub-account */ - public async lockSubAccount(userId: number): Promise<{ response: AxiosResponse; body?: any }> { - const localVarPath = - this.client.basePath + - '/sub_accounts/{user_id}/lock'.replace('{' + 'user_id' + '}', encodeURIComponent(String(userId))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async lockSubAccount(userId: number) : Promise<{ response: AxiosResponse; body?: any; }> { + const localVarPath = this.client.basePath + '/sub_accounts/{user_id}/lock' + .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); // verify required parameter 'userId' is not null or undefined if (userId === null || userId === undefined) { throw new Error('Required parameter userId was null or undefined when calling lockSubAccount.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, @@ -375,26 +359,26 @@ export class SubAccountApi { }; const authSettings = ['apiv4']; - return this.client.request(config, '', authSettings); + return this.client.request(config, "", authSettings); } /** - * + * * @summary Unlock the sub-account * @param userId The user id of the sub-account */ - public async unlockSubAccount(userId: number): Promise<{ response: AxiosResponse; body?: any }> { - const localVarPath = - this.client.basePath + - '/sub_accounts/{user_id}/unlock'.replace('{' + 'user_id' + '}', encodeURIComponent(String(userId))); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async unlockSubAccount(userId: number) : Promise<{ response: AxiosResponse; body?: any; }> { + const localVarPath = this.client.basePath + '/sub_accounts/{user_id}/unlock' + .replace('{' + 'user_id' + '}', encodeURIComponent(String(userId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); // verify required parameter 'userId' is not null or undefined if (userId === null || userId === undefined) { throw new Error('Required parameter userId was null or undefined when calling unlockSubAccount.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, @@ -403,17 +387,17 @@ export class SubAccountApi { }; const authSettings = ['apiv4']; - return this.client.request(config, '', authSettings); + return this.client.request(config, "", authSettings); } /** - * 统一账户模式: - `classic`: 经典账户模式 - `multi_currency`: 跨币种保证金模式 - `portfolio`: 组合保证金模式 - * @summary 获取子帐号模式 + * Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode + * @summary Get sub-account mode */ - public async listUnifiedMode(): Promise<{ response: AxiosResponse; body: Array }> { + public async listUnifiedMode() : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/sub_accounts/unified_mode'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -422,6 +406,7 @@ export class SubAccountApi { localVarHeaderParams.Accept = produces.join(','); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -430,6 +415,6 @@ export class SubAccountApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } } diff --git a/api/unifiedApi.ts b/api/unifiedApi.ts index f41abd8..b995834 100644 --- a/api/unifiedApi.ts +++ b/api/unifiedApi.ts @@ -9,8 +9,8 @@ * Do not edit the class manually. */ + /* tslint:disable:no-unused-locals */ -import { InlineObject } from '../model/inlineObject'; import { UniLoan } from '../model/uniLoan'; import { UniLoanInterestRecord } from '../model/uniLoanInterestRecord'; import { UnifiedAccount } from '../model/unifiedAccount'; @@ -52,12 +52,10 @@ export class UnifiedApi { * @param opts Optional parameters * @param opts.currency Retrieve data of the specified currency */ - public async listUnifiedAccounts(opts: { - currency?: string; - }): Promise<{ response: AxiosResponse; body: UnifiedAccount }> { + public async listUnifiedAccounts(opts: { currency?: string, } ) : Promise<{ response: AxiosResponse; body: UnifiedAccount; }> { const localVarPath = this.client.basePath + '/unified/accounts'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -68,9 +66,10 @@ export class UnifiedApi { opts = opts || {}; if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -79,18 +78,18 @@ export class UnifiedApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'UnifiedAccount', authSettings); + return this.client.request(config, "UnifiedAccount", authSettings); } /** - * + * * @summary Query about the maximum borrowing for the unified account * @param currency Retrieve data of the specified currency */ - public async getUnifiedBorrowable(currency: string): Promise<{ response: AxiosResponse; body: UnifiedBorrowable }> { + public async getUnifiedBorrowable(currency: string) : Promise<{ response: AxiosResponse; body: UnifiedBorrowable; }> { const localVarPath = this.client.basePath + '/unified/borrowable'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -104,7 +103,8 @@ export class UnifiedApi { throw new Error('Required parameter currency was null or undefined when calling getUnifiedBorrowable.'); } - localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, "string"); + const config: AxiosRequestConfig = { method: 'GET', @@ -114,20 +114,18 @@ export class UnifiedApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'UnifiedBorrowable', authSettings); + return this.client.request(config, "UnifiedBorrowable", authSettings); } /** - * + * * @summary Query about the maximum transferable for the unified account * @param currency Retrieve data of the specified currency */ - public async getUnifiedTransferable( - currency: string, - ): Promise<{ response: AxiosResponse; body: UnifiedTransferable }> { + public async getUnifiedTransferable(currency: string) : Promise<{ response: AxiosResponse; body: UnifiedTransferable; }> { const localVarPath = this.client.basePath + '/unified/transferable'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -141,7 +139,8 @@ export class UnifiedApi { throw new Error('Required parameter currency was null or undefined when calling getUnifiedTransferable.'); } - localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, "string"); + const config: AxiosRequestConfig = { method: 'GET', @@ -151,11 +150,11 @@ export class UnifiedApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'UnifiedTransferable', authSettings); + return this.client.request(config, "UnifiedTransferable", authSettings); } /** - * + * * @summary List loans * @param opts Optional parameters * @param opts.currency Retrieve data of the specified currency @@ -163,15 +162,10 @@ export class UnifiedApi { * @param opts.limit Maximum response items. Default: 100, minimum: 1, Maximum: 100 * @param opts.type Loan type, platform - platform, margin - margin */ - public async listUnifiedLoans(opts: { - currency?: string; - page?: number; - limit?: number; - type?: string; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listUnifiedLoans(opts: { currency?: string, page?: number, limit?: number, type?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/unified/loans'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -182,21 +176,22 @@ export class UnifiedApi { opts = opts || {}; if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, "string"); } if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.type !== undefined) { - localVarQueryParameters['type'] = ObjectSerializer.serialize(opts.type, 'string'); + localVarQueryParameters['type'] = ObjectSerializer.serialize(opts.type, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -205,38 +200,39 @@ export class UnifiedApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** * 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` * @summary Borrow or repay - * @param unifiedLoan + * @param unifiedLoan */ - public async createUnifiedLoan(unifiedLoan: UnifiedLoan): Promise<{ response: AxiosResponse; body?: any }> { + public async createUnifiedLoan(unifiedLoan: UnifiedLoan) : Promise<{ response: AxiosResponse; body?: any; }> { const localVarPath = this.client.basePath + '/unified/loans'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); // verify required parameter 'unifiedLoan' is not null or undefined if (unifiedLoan === null || unifiedLoan === undefined) { throw new Error('Required parameter unifiedLoan was null or undefined when calling createUnifiedLoan.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(unifiedLoan, 'UnifiedLoan'), + data: ObjectSerializer.serialize(unifiedLoan, "UnifiedLoan") }; const authSettings = ['apiv4']; - return this.client.request(config, '', authSettings); + return this.client.request(config, "", authSettings); } /** - * + * * @summary Get load records * @param opts Optional parameters * @param opts.type The types of lending records, borrow - indicates the action of borrowing funds, repay - indicates the action of repaying the borrowed funds @@ -244,15 +240,10 @@ export class UnifiedApi { * @param opts.page Page number * @param opts.limit Maximum response items. Default: 100, minimum: 1, Maximum: 100 */ - public async listUnifiedLoanRecords(opts: { - type?: string; - currency?: string; - page?: number; - limit?: number; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listUnifiedLoanRecords(opts: { type?: string, currency?: string, page?: number, limit?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/unified/loan_records'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -263,21 +254,22 @@ export class UnifiedApi { opts = opts || {}; if (opts.type !== undefined) { - localVarQueryParameters['type'] = ObjectSerializer.serialize(opts.type, 'string'); + localVarQueryParameters['type'] = ObjectSerializer.serialize(opts.type, "string"); } if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, "string"); } if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -286,11 +278,11 @@ export class UnifiedApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary List interest records * @param opts Optional parameters * @param opts.currency Retrieve data of the specified currency @@ -298,19 +290,12 @@ export class UnifiedApi { * @param opts.limit Maximum response items. Default: 100, minimum: 1, Maximum: 100 * @param opts.from Start timestamp of the query * @param opts.to Time range ending, default to current time - * @param opts.type 借贷类型,平台借币 - platform,杠杆借币 - margin,不传时默认为margin + * @param opts.type Loan type, platform loan - platform, leverage loan - margin, if not passed, defaults to margin */ - public async listUnifiedLoanInterestRecords(opts: { - currency?: string; - page?: number; - limit?: number; - from?: number; - to?: number; - type?: string; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listUnifiedLoanInterestRecords(opts: { currency?: string, page?: number, limit?: number, from?: number, to?: number, type?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/unified/interest_records'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -321,29 +306,30 @@ export class UnifiedApi { opts = opts || {}; if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, "string"); } if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.type !== undefined) { - localVarQueryParameters['type'] = ObjectSerializer.serialize(opts.type, 'string'); + localVarQueryParameters['type'] = ObjectSerializer.serialize(opts.type, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -352,17 +338,17 @@ export class UnifiedApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * - * @summary 获取用户风险单元详情,仅在组合保证金模式有效 + * Retrieve user risk unit details, only valid in portfolio margin mode + * @summary Get user risk unit details */ - public async getUnifiedRiskUnits(): Promise<{ response: AxiosResponse; body: UnifiedRiskUnits }> { + public async getUnifiedRiskUnits() : Promise<{ response: AxiosResponse; body: UnifiedRiskUnits; }> { const localVarPath = this.client.basePath + '/unified/risk_units'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -371,6 +357,7 @@ export class UnifiedApi { localVarHeaderParams.Accept = produces.join(','); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -379,17 +366,17 @@ export class UnifiedApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'UnifiedRiskUnits', authSettings); + return this.client.request(config, "UnifiedRiskUnits", authSettings); } /** - * 统一账户模式: - `classic`: 经典账户模式 - `multi_currency`: 跨币种保证金模式 - `portfolio`: 组合保证金模式 - `single_currency`: 单币种保证金模式 + * Unified account mode: - `classic`: Classic account mode - `multi_currency`: Cross-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single-currency margin mode * @summary Query mode of the unified account */ - public async getUnifiedMode(): Promise<{ response: AxiosResponse; body: UnifiedModeSet }> { + public async getUnifiedMode() : Promise<{ response: AxiosResponse; body: UnifiedModeSet; }> { const localVarPath = this.client.basePath + '/unified/unified_mode'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -398,6 +385,7 @@ export class UnifiedApi { localVarHeaderParams.Accept = produces.join(','); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -406,34 +394,35 @@ export class UnifiedApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'UnifiedModeSet', authSettings); + return this.client.request(config, "UnifiedModeSet", authSettings); } /** - * 每种账户模式的切换只需要传对应账户模式的参数,同时支持在切换账户模式时打开或关闭对应账户模式下的配置开关 - 开通经典账户模式时,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\" } ``` + * 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\" } ``` * @summary Set mode of the unified account - * @param unifiedModeSet + * @param unifiedModeSet */ - public async setUnifiedMode(unifiedModeSet: UnifiedModeSet): Promise<{ response: AxiosResponse; body?: any }> { + public async setUnifiedMode(unifiedModeSet: UnifiedModeSet) : Promise<{ response: AxiosResponse; body?: any; }> { const localVarPath = this.client.basePath + '/unified/unified_mode'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); // verify required parameter 'unifiedModeSet' is not null or undefined if (unifiedModeSet === null || unifiedModeSet === undefined) { throw new Error('Required parameter unifiedModeSet was null or undefined when calling setUnifiedMode.'); } + const config: AxiosRequestConfig = { method: 'PUT', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(unifiedModeSet, 'UnifiedModeSet'), + data: ObjectSerializer.serialize(unifiedModeSet, "UnifiedModeSet") }; const authSettings = ['apiv4']; - return this.client.request(config, '', authSettings); + return this.client.request(config, "", authSettings); } /** @@ -441,12 +430,10 @@ export class UnifiedApi { * @summary Get unified estimate rate * @param currencies Specify the currency names for querying in an array, separated by commas, with a maximum of 10 currencies. */ - public async getUnifiedEstimateRate( - currencies: Array, - ): Promise<{ response: AxiosResponse; body: { [key: string]: string } }> { + public async getUnifiedEstimateRate(currencies: Array) : Promise<{ response: AxiosResponse; body: { [key: string]: string; }; }> { const localVarPath = this.client.basePath + '/unified/estimate_rate'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -460,7 +447,8 @@ export class UnifiedApi { throw new Error('Required parameter currencies was null or undefined when calling getUnifiedEstimateRate.'); } - localVarQueryParameters['currencies'] = ObjectSerializer.serialize(currencies, 'Array'); + localVarQueryParameters['currencies'] = ObjectSerializer.serialize(currencies, "Array"); + const config: AxiosRequestConfig = { method: 'GET', @@ -470,17 +458,17 @@ export class UnifiedApi { }; const authSettings = ['apiv4']; - return this.client.request<{ [key: string]: string }>(config, '{ [key: string]: string; }', authSettings); + return this.client.request<{ [key: string]: string; }>(config, "{ [key: string]: string; }", authSettings); } /** - * - * @summary list currency discount tiers + * + * @summary List currency discount tiers */ - public async listCurrencyDiscountTiers(): Promise<{ response: AxiosResponse; body: Array }> { + public async listCurrencyDiscountTiers() : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/unified/currency_discount_tiers'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -489,6 +477,7 @@ export class UnifiedApi { localVarHeaderParams.Accept = produces.join(','); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -497,17 +486,17 @@ export class UnifiedApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * - * @summary 查询统一账户借贷梯度保证金 + * + * @summary List loan margin tiers */ - public async listLoanMarginTiers(): Promise<{ response: AxiosResponse; body: Array }> { + public async listLoanMarginTiers() : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/unified/loan_margin_tiers'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -516,6 +505,7 @@ export class UnifiedApi { localVarHeaderParams.Accept = produces.join(','); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -524,20 +514,18 @@ export class UnifiedApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * 组合保证金计算器 当输入为模拟仓位组合时,每个仓位包括仓位名和持有量,只支持市场范围:BTC、ETH的永续合约、期权、现货 当输入为模拟挂单时,每个挂单包括市场标识、挂单价、挂单量,只支持市场范围:BTC、ETH的永续合约、期权、现货。挂单不包括市价单 - * @summary 组合保证金计算器计算 - * @param unifiedPortfolioInput + * 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. + * @summary Portfolio margin calculator + * @param unifiedPortfolioInput */ - public async calculatePortfolioMargin( - unifiedPortfolioInput: UnifiedPortfolioInput, - ): Promise<{ response: AxiosResponse; body: UnifiedPortfolioOutput }> { + public async calculatePortfolioMargin(unifiedPortfolioInput: UnifiedPortfolioInput) : Promise<{ response: AxiosResponse; body: UnifiedPortfolioOutput; }> { const localVarPath = this.client.basePath + '/unified/portfolio_calculator'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -548,34 +536,31 @@ export class UnifiedApi { // verify required parameter 'unifiedPortfolioInput' is not null or undefined if (unifiedPortfolioInput === null || unifiedPortfolioInput === undefined) { - throw new Error( - 'Required parameter unifiedPortfolioInput was null or undefined when calling calculatePortfolioMargin.', - ); + throw new Error('Required parameter unifiedPortfolioInput was null or undefined when calling calculatePortfolioMargin.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(unifiedPortfolioInput, 'UnifiedPortfolioInput'), + data: ObjectSerializer.serialize(unifiedPortfolioInput, "UnifiedPortfolioInput") }; const authSettings = []; - return this.client.request(config, 'UnifiedPortfolioOutput', authSettings); + return this.client.request(config, "UnifiedPortfolioOutput", authSettings); } /** - * - * @summary 用户最大、最小可设置币种杠杆倍数 + * + * @summary Minimum currency leverage that can be set * @param currency Currency */ - public async getUserLeverageCurrencyConfig( - currency: string, - ): Promise<{ response: AxiosResponse; body: UnifiedLeverageConfig }> { + public async getUserLeverageCurrencyConfig(currency: string) : Promise<{ response: AxiosResponse; body: UnifiedLeverageConfig; }> { const localVarPath = this.client.basePath + '/unified/leverage/user_currency_config'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -586,12 +571,11 @@ export class UnifiedApi { // verify required parameter 'currency' is not null or undefined if (currency === null || currency === undefined) { - throw new Error( - 'Required parameter currency was null or undefined when calling getUserLeverageCurrencyConfig.', - ); + throw new Error('Required parameter currency was null or undefined when calling getUserLeverageCurrencyConfig.'); } - localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, "string"); + const config: AxiosRequestConfig = { method: 'GET', @@ -601,21 +585,19 @@ export class UnifiedApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'UnifiedLeverageConfig', authSettings); + return this.client.request(config, "UnifiedLeverageConfig", authSettings); } /** - * - * @summary 获取用户币种杠杆倍数,currency不传则查询全部币种 + * Get the user\'s currency leverage. If currency is not passed, query all currencies. + * @summary Get the leverage multiple of the user currency * @param opts Optional parameters * @param opts.currency Currency */ - public async getUserLeverageCurrencySetting(opts: { - currency?: string; - }): Promise<{ response: AxiosResponse; body: UnifiedLeverageSetting }> { + public async getUserLeverageCurrencySetting(opts: { currency?: string, } ) : Promise<{ response: AxiosResponse; body: UnifiedLeverageSetting; }> { const localVarPath = this.client.basePath + '/unified/leverage/user_currency_setting'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -626,9 +608,10 @@ export class UnifiedApi { opts = opts || {}; if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -637,56 +620,50 @@ export class UnifiedApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'UnifiedLeverageSetting', authSettings); + return this.client.request(config, "UnifiedLeverageSetting", authSettings); } /** - * - * @summary 设置借贷币种杠杆倍数 - * @param inlineObject + * + * @summary Set the loan currency leverage + * @param unifiedLeverageSetting */ - public async setUserLeverageCurrencySetting( - inlineObject: InlineObject, - ): Promise<{ response: AxiosResponse; body?: any }> { + public async setUserLeverageCurrencySetting(unifiedLeverageSetting: UnifiedLeverageSetting) : Promise<{ response: AxiosResponse; body?: any; }> { const localVarPath = this.client.basePath + '/unified/leverage/user_currency_setting'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); - // verify required parameter 'inlineObject' is not null or undefined - if (inlineObject === null || inlineObject === undefined) { - throw new Error( - 'Required parameter inlineObject was null or undefined when calling setUserLeverageCurrencySetting.', - ); + // verify required parameter 'unifiedLeverageSetting' is not null or undefined + if (unifiedLeverageSetting === null || unifiedLeverageSetting === undefined) { + throw new Error('Required parameter unifiedLeverageSetting was null or undefined when calling setUserLeverageCurrencySetting.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(inlineObject, 'InlineObject'), + data: ObjectSerializer.serialize(unifiedLeverageSetting, "UnifiedLeverageSetting") }; const authSettings = ['apiv4']; - return this.client.request(config, '', authSettings); + return this.client.request(config, "", authSettings); } /** - * - * @summary 获取历史借币利率 + * + * @summary get historical lending rates * @param currency Currency * @param opts Optional parameters - * @param opts.tier 需要查询的上浮费率的vip等级 + * @param opts.tier The VIP level of the floating rate that needs to be queried * @param opts.page Page number * @param opts.limit Maximum response items. Default: 100, minimum: 1, Maximum: 100 */ - public async getHistoryLoanRate( - currency: string, - opts: { tier?: string; page?: number; limit?: number }, - ): Promise<{ response: AxiosResponse; body: UnifiedHistoryLoanRate }> { + public async getHistoryLoanRate(currency: string, opts: { tier?: string, page?: number, limit?: number, } ) : Promise<{ response: AxiosResponse; body: UnifiedHistoryLoanRate; }> { const localVarPath = this.client.basePath + '/unified/history_loan_rate'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -702,19 +679,20 @@ export class UnifiedApi { opts = opts || {}; if (opts.tier !== undefined) { - localVarQueryParameters['tier'] = ObjectSerializer.serialize(opts.tier, 'string'); + localVarQueryParameters['tier'] = ObjectSerializer.serialize(opts.tier, "string"); } - localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, "string"); if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -723,6 +701,6 @@ export class UnifiedApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'UnifiedHistoryLoanRate', authSettings); + return this.client.request(config, "UnifiedHistoryLoanRate", authSettings); } } diff --git a/api/walletApi.ts b/api/walletApi.ts index dbe0b2c..e01b584 100644 --- a/api/walletApi.ts +++ b/api/walletApi.ts @@ -9,11 +9,11 @@ * Do not edit the class manually. */ + /* tslint:disable:no-unused-locals */ import { ConvertSmallBalance } from '../model/convertSmallBalance'; import { CurrencyChain } from '../model/currencyChain'; import { DepositAddress } from '../model/depositAddress'; -import { InlineResponse200 } from '../model/inlineResponse200'; import { LedgerRecord } from '../model/ledgerRecord'; import { SavedAddress } from '../model/savedAddress'; import { SmallBalance } from '../model/smallBalance'; @@ -28,6 +28,7 @@ import { TotalBalance } from '../model/totalBalance'; import { TradeFee } from '../model/tradeFee'; import { TransactionID } from '../model/transactionID'; import { Transfer } from '../model/transfer'; +import { TransferOrderStatus } from '../model/transferOrderStatus'; import { UidPushOrder } from '../model/uidPushOrder'; import { WithdrawStatus } from '../model/withdrawStatus'; import { WithdrawalRecord } from '../model/withdrawalRecord'; @@ -51,16 +52,14 @@ export class WalletApi { } /** - * + * * @summary List chains supported for specified currency * @param currency Currency name */ - public async listCurrencyChains( - currency: string, - ): Promise<{ response: AxiosResponse; body: Array }> { + public async listCurrencyChains(currency: string) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/wallet/currency_chains'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -74,7 +73,8 @@ export class WalletApi { throw new Error('Required parameter currency was null or undefined when calling listCurrencyChains.'); } - localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, "string"); + const config: AxiosRequestConfig = { method: 'GET', @@ -84,18 +84,18 @@ export class WalletApi { }; const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Generate currency deposit address * @param currency Currency name */ - public async getDepositAddress(currency: string): Promise<{ response: AxiosResponse; body: DepositAddress }> { + public async getDepositAddress(currency: string) : Promise<{ response: AxiosResponse; body: DepositAddress; }> { const localVarPath = this.client.basePath + '/wallet/deposit_address'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -109,7 +109,8 @@ export class WalletApi { throw new Error('Required parameter currency was null or undefined when calling getDepositAddress.'); } - localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, "string"); + const config: AxiosRequestConfig = { method: 'GET', @@ -119,7 +120,7 @@ export class WalletApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'DepositAddress', authSettings); + return this.client.request(config, "DepositAddress", authSettings); } /** @@ -132,16 +133,10 @@ export class WalletApi { * @param opts.limit Maximum number of records to be returned in a single list * @param opts.offset List offset, starting from 0 */ - public async listWithdrawals(opts: { - currency?: string; - from?: number; - to?: number; - limit?: number; - offset?: number; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listWithdrawals(opts: { currency?: string, from?: number, to?: number, limit?: number, offset?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/wallet/withdrawals'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -152,25 +147,26 @@ export class WalletApi { opts = opts || {}; if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, "string"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -179,7 +175,7 @@ export class WalletApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** @@ -192,16 +188,10 @@ export class WalletApi { * @param opts.limit The maximum number of entries returned in the list is limited to 500 transactions. * @param opts.offset List offset, starting from 0 */ - public async listDeposits(opts: { - currency?: string; - from?: number; - to?: number; - limit?: number; - offset?: number; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listDeposits(opts: { currency?: string, from?: number, to?: number, limit?: number, offset?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/wallet/deposits'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -212,25 +202,26 @@ export class WalletApi { opts = opts || {}; if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, "string"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -239,18 +230,18 @@ export class WalletApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * 个人交易账户之间的余额互转,目前支持以下互转操作: 1. 现货账户 - 杠杆账户 2. 现货账户 - 永续合约账户 3. 现货账户 - 交割合约账户 4. 现货账户 - 期权账户 + * Transfer between different accounts. Currently support transfers between the following: 1. spot - margin 2. spot - futures(perpetual) 3. spot - delivery 4. spot - options * @summary Transfer between trading accounts - * @param transfer + * @param transfer */ - public async transfer(transfer: Transfer): Promise<{ response: AxiosResponse; body: TransactionID }> { + public async transfer(transfer: Transfer) : Promise<{ response: AxiosResponse; body: TransactionID; }> { const localVarPath = this.client.basePath + '/wallet/transfers'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -264,16 +255,17 @@ export class WalletApi { throw new Error('Required parameter transfer was null or undefined when calling transfer.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(transfer, 'Transfer'), + data: ObjectSerializer.serialize(transfer, "Transfer") }; const authSettings = ['apiv4']; - return this.client.request(config, 'TransactionID', authSettings); + return this.client.request(config, "TransactionID", authSettings); } /** @@ -286,16 +278,10 @@ export class WalletApi { * @param opts.limit Maximum number of records to be returned in a single list * @param opts.offset List offset, starting from 0 */ - public async listSubAccountTransfers(opts: { - subUid?: string; - from?: number; - to?: number; - limit?: number; - offset?: number; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listSubAccountTransfers(opts: { subUid?: string, from?: number, to?: number, limit?: number, offset?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/wallet/sub_account_transfers'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -306,25 +292,26 @@ export class WalletApi { opts = opts || {}; if (opts.subUid !== undefined) { - localVarQueryParameters['sub_uid'] = ObjectSerializer.serialize(opts.subUid, 'string'); + localVarQueryParameters['sub_uid'] = ObjectSerializer.serialize(opts.subUid, "string"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -333,20 +320,18 @@ export class WalletApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** * 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. * @summary Transfer between main and sub accounts - * @param subAccountTransfer + * @param subAccountTransfer */ - public async transferWithSubAccount( - subAccountTransfer: SubAccountTransfer, - ): Promise<{ response: AxiosResponse; body: TransactionID }> { + public async transferWithSubAccount(subAccountTransfer: SubAccountTransfer) : Promise<{ response: AxiosResponse; body: TransactionID; }> { const localVarPath = this.client.basePath + '/wallet/sub_account_transfers'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -357,34 +342,31 @@ export class WalletApi { // verify required parameter 'subAccountTransfer' is not null or undefined if (subAccountTransfer === null || subAccountTransfer === undefined) { - throw new Error( - 'Required parameter subAccountTransfer was null or undefined when calling transferWithSubAccount.', - ); + throw new Error('Required parameter subAccountTransfer was null or undefined when calling transferWithSubAccount.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(subAccountTransfer, 'SubAccountTransfer'), + data: ObjectSerializer.serialize(subAccountTransfer, "SubAccountTransfer") }; const authSettings = ['apiv4']; - return this.client.request(config, 'TransactionID', authSettings); + return this.client.request(config, "TransactionID", authSettings); } /** * 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. * @summary Sub-account transfers to sub-account - * @param subAccountToSubAccount + * @param subAccountToSubAccount */ - public async subAccountToSubAccount( - subAccountToSubAccount: SubAccountToSubAccount, - ): Promise<{ response: AxiosResponse; body: TransactionID }> { + public async subAccountToSubAccount(subAccountToSubAccount: SubAccountToSubAccount) : Promise<{ response: AxiosResponse; body: TransactionID; }> { const localVarPath = this.client.basePath + '/wallet/sub_account_to_sub_account'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -395,37 +377,33 @@ export class WalletApi { // verify required parameter 'subAccountToSubAccount' is not null or undefined if (subAccountToSubAccount === null || subAccountToSubAccount === undefined) { - throw new Error( - 'Required parameter subAccountToSubAccount was null or undefined when calling subAccountToSubAccount.', - ); + throw new Error('Required parameter subAccountToSubAccount was null or undefined when calling subAccountToSubAccount.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(subAccountToSubAccount, 'SubAccountToSubAccount'), + data: ObjectSerializer.serialize(subAccountToSubAccount, "SubAccountToSubAccount") }; const authSettings = ['apiv4']; - return this.client.request(config, 'TransactionID', authSettings); + return this.client.request(config, "TransactionID", authSettings); } /** - * 支持根据用户自定义client_order_id或者划转接口返回的tx_id查询划转状态 - * @summary 划转状态查询 + * Support querying transfer status based on user-defined client_order_id or tx_id returned by the transfer interface + * @summary Transfer status query * @param opts Optional parameters * @param opts.clientOrderId 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 opts.txId 划转操作单号,和client_order_id不能同时为空 + * @param opts.txId The transfer operation number and client_order_id cannot be empty at the same time */ - public async getTransferOrderStatus(opts: { - clientOrderId?: string; - txId?: string; - }): Promise<{ response: AxiosResponse; body: InlineResponse200 }> { + public async getTransferOrderStatus(opts: { clientOrderId?: string, txId?: string, } ) : Promise<{ response: AxiosResponse; body: TransferOrderStatus; }> { const localVarPath = this.client.basePath + '/wallet/order_status'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -436,13 +414,14 @@ export class WalletApi { opts = opts || {}; if (opts.clientOrderId !== undefined) { - localVarQueryParameters['client_order_id'] = ObjectSerializer.serialize(opts.clientOrderId, 'string'); + localVarQueryParameters['client_order_id'] = ObjectSerializer.serialize(opts.clientOrderId, "string"); } if (opts.txId !== undefined) { - localVarQueryParameters['tx_id'] = ObjectSerializer.serialize(opts.txId, 'string'); + localVarQueryParameters['tx_id'] = ObjectSerializer.serialize(opts.txId, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -451,21 +430,19 @@ export class WalletApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'InlineResponse200', authSettings); + return this.client.request(config, "TransferOrderStatus", authSettings); } /** - * + * * @summary Retrieve withdrawal status * @param opts Optional parameters * @param opts.currency Retrieve data of the specified currency */ - public async listWithdrawStatus(opts: { - currency?: string; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listWithdrawStatus(opts: { currency?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/wallet/withdraw_status'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -476,9 +453,10 @@ export class WalletApi { opts = opts || {}; if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -487,21 +465,19 @@ export class WalletApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Retrieve sub account balances * @param opts Optional parameters * @param opts.subUid User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts */ - public async listSubAccountBalances(opts: { - subUid?: string; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listSubAccountBalances(opts: { subUid?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/wallet/sub_account_balances'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -512,9 +488,10 @@ export class WalletApi { opts = opts || {}; if (opts.subUid !== undefined) { - localVarQueryParameters['sub_uid'] = ObjectSerializer.serialize(opts.subUid, 'string'); + localVarQueryParameters['sub_uid'] = ObjectSerializer.serialize(opts.subUid, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -523,21 +500,19 @@ export class WalletApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Query sub accounts\' margin balances * @param opts Optional parameters * @param opts.subUid User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts */ - public async listSubAccountMarginBalances(opts: { - subUid?: string; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listSubAccountMarginBalances(opts: { subUid?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/wallet/sub_account_margin_balances'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -548,9 +523,10 @@ export class WalletApi { opts = opts || {}; if (opts.subUid !== undefined) { - localVarQueryParameters['sub_uid'] = ObjectSerializer.serialize(opts.subUid, 'string'); + localVarQueryParameters['sub_uid'] = ObjectSerializer.serialize(opts.subUid, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -559,27 +535,20 @@ export class WalletApi { }; const authSettings = ['apiv4']; - return this.client.request>( - config, - 'Array', - authSettings, - ); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Query sub accounts\' futures account balances * @param opts Optional parameters * @param opts.subUid 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 opts.settle Query only balances of specified settle currency */ - public async listSubAccountFuturesBalances(opts: { - subUid?: string; - settle?: string; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listSubAccountFuturesBalances(opts: { subUid?: string, settle?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/wallet/sub_account_futures_balances'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -590,13 +559,14 @@ export class WalletApi { opts = opts || {}; if (opts.subUid !== undefined) { - localVarQueryParameters['sub_uid'] = ObjectSerializer.serialize(opts.subUid, 'string'); + localVarQueryParameters['sub_uid'] = ObjectSerializer.serialize(opts.subUid, "string"); } if (opts.settle !== undefined) { - localVarQueryParameters['settle'] = ObjectSerializer.serialize(opts.settle, 'string'); + localVarQueryParameters['settle'] = ObjectSerializer.serialize(opts.settle, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -605,25 +575,19 @@ export class WalletApi { }; const authSettings = ['apiv4']; - return this.client.request>( - config, - 'Array', - authSettings, - ); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Query subaccount\'s cross_margin account info * @param opts Optional parameters * @param opts.subUid User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts */ - public async listSubAccountCrossMarginBalances(opts: { - subUid?: string; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listSubAccountCrossMarginBalances(opts: { subUid?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/wallet/sub_account_cross_margin_balances'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -634,9 +598,10 @@ export class WalletApi { opts = opts || {}; if (opts.subUid !== undefined) { - localVarQueryParameters['sub_uid'] = ObjectSerializer.serialize(opts.subUid, 'string'); + localVarQueryParameters['sub_uid'] = ObjectSerializer.serialize(opts.subUid, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -645,15 +610,11 @@ export class WalletApi { }; const authSettings = ['apiv4']; - return this.client.request>( - config, - 'Array', - authSettings, - ); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Query saved address * @param currency Currency * @param opts Optional parameters @@ -661,13 +622,10 @@ export class WalletApi { * @param opts.limit Maximum number returned, 100 at most * @param opts.page Page number */ - public async listSavedAddress( - currency: string, - opts: { chain?: string; limit?: string; page?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { + public async listSavedAddress(currency: string, opts: { chain?: string, limit?: string, page?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/wallet/saved_address'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -682,20 +640,21 @@ export class WalletApi { } opts = opts || {}; - localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, "string"); if (opts.chain !== undefined) { - localVarQueryParameters['chain'] = ObjectSerializer.serialize(opts.chain, 'string'); + localVarQueryParameters['chain'] = ObjectSerializer.serialize(opts.chain, "string"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'string'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "string"); } if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -704,23 +663,20 @@ export class WalletApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Retrieve personal trading fee * @param opts Optional parameters * @param opts.currencyPair 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 opts.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. */ - public async getTradeFee(opts: { - currencyPair?: string; - settle?: 'BTC' | 'USDT' | 'USD'; - }): Promise<{ response: AxiosResponse; body: TradeFee }> { + public async getTradeFee(opts: { currencyPair?: string, settle?: 'BTC' | 'USDT' | 'USD', } ) : Promise<{ response: AxiosResponse; body: TradeFee; }> { const localVarPath = this.client.basePath + '/wallet/fee'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -731,13 +687,14 @@ export class WalletApi { opts = opts || {}; if (opts.currencyPair !== undefined) { - localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, 'string'); + localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, "string"); } if (opts.settle !== undefined) { localVarQueryParameters['settle'] = ObjectSerializer.serialize(opts.settle, "'BTC' | 'USDT' | 'USD'"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -746,7 +703,7 @@ export class WalletApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'TradeFee', authSettings); + return this.client.request(config, "TradeFee", authSettings); } /** @@ -755,12 +712,10 @@ export class WalletApi { * @param opts Optional parameters * @param opts.currency Currency unit used to calculate the balance amount. BTC, CNY, USD and USDT are allowed. USDT is the default. */ - public async getTotalBalance(opts: { - currency?: string; - }): Promise<{ response: AxiosResponse; body: TotalBalance }> { + public async getTotalBalance(opts: { currency?: string, } ) : Promise<{ response: AxiosResponse; body: TotalBalance; }> { const localVarPath = this.client.basePath + '/wallet/total_balance'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -771,9 +726,10 @@ export class WalletApi { opts = opts || {}; if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -782,17 +738,17 @@ export class WalletApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'TotalBalance', authSettings); + return this.client.request(config, "TotalBalance", authSettings); } /** - * + * * @summary List small balance */ - public async listSmallBalance(): Promise<{ response: AxiosResponse; body: Array }> { + public async listSmallBalance() : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/wallet/small_balance'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -801,6 +757,7 @@ export class WalletApi { localVarHeaderParams.Accept = produces.join(','); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -809,56 +766,49 @@ export class WalletApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * + * * @summary Convert small balance - * @param convertSmallBalance + * @param convertSmallBalance */ - public async convertSmallBalance( - convertSmallBalance: ConvertSmallBalance, - ): Promise<{ response: AxiosResponse; body?: any }> { + public async convertSmallBalance(convertSmallBalance: ConvertSmallBalance) : Promise<{ response: AxiosResponse; body?: any; }> { const localVarPath = this.client.basePath + '/wallet/small_balance'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); // verify required parameter 'convertSmallBalance' is not null or undefined if (convertSmallBalance === null || convertSmallBalance === undefined) { - throw new Error( - 'Required parameter convertSmallBalance was null or undefined when calling convertSmallBalance.', - ); + throw new Error('Required parameter convertSmallBalance was null or undefined when calling convertSmallBalance.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(convertSmallBalance, 'ConvertSmallBalance'), + data: ObjectSerializer.serialize(convertSmallBalance, "ConvertSmallBalance") }; const authSettings = ['apiv4']; - return this.client.request(config, '', authSettings); + return this.client.request(config, "", authSettings); } /** - * + * * @summary List small balance history * @param opts Optional parameters * @param opts.currency Currency * @param opts.page Page number * @param opts.limit Maximum response items. Default: 100, minimum: 1, Maximum: 100 */ - public async listSmallBalanceHistory(opts: { - currency?: string; - page?: number; - limit?: number; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listSmallBalanceHistory(opts: { currency?: string, page?: number, limit?: number, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/wallet/small_balance_history'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -869,17 +819,18 @@ export class WalletApi { opts = opts || {}; if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, "string"); } if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -888,31 +839,24 @@ export class WalletApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } /** - * - * @summary 获取UID转帐历史纪录 + * + * @summary Retrieve the UID transfer history * @param opts Optional parameters * @param opts.id Order ID - * @param opts.from 查询记录的起始时间,不指定则默认从当前时间开始向前推7天,秒级Unix的时间戳 - * @param opts.to 查询记录的结束时间,不指定则默认为当前时间,秒级Unix的时间戳 - * @param opts.limit 列表返回的最大数量,默认值是 100 + * @param opts.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 opts.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 opts.limit The maximum number of items returned in the list, the default value is 100 * @param opts.offset List offset, starting from 0 - * @param opts.transactionType 列表返回订单类型 `withdraw`, `deposit`,默认为`withdraw`. + * @param opts.transactionType The list returns the order type `withdraw`, `deposit`, the default is `withdraw`. */ - public async listPushOrders(opts: { - id?: number; - from?: number; - to?: number; - limit?: number; - offset?: number; - transactionType?: string; - }): Promise<{ response: AxiosResponse; body: Array }> { + public async listPushOrders(opts: { id?: number, from?: number, to?: number, limit?: number, offset?: number, transactionType?: string, } ) : Promise<{ response: AxiosResponse; body: Array; }> { const localVarPath = this.client.basePath + '/wallet/push'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -923,29 +867,30 @@ export class WalletApi { opts = opts || {}; if (opts.id !== undefined) { - localVarQueryParameters['id'] = ObjectSerializer.serialize(opts.id, 'number'); + localVarQueryParameters['id'] = ObjectSerializer.serialize(opts.id, "number"); } if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, "number"); } if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, "number"); } if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, "number"); } if (opts.offset !== undefined) { - localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, 'number'); + localVarQueryParameters['offset'] = ObjectSerializer.serialize(opts.offset, "number"); } if (opts.transactionType !== undefined) { - localVarQueryParameters['transaction_type'] = ObjectSerializer.serialize(opts.transactionType, 'string'); + localVarQueryParameters['transaction_type'] = ObjectSerializer.serialize(opts.transactionType, "string"); } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -954,6 +899,6 @@ export class WalletApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>(config, "Array", authSettings); } } diff --git a/api/withdrawalApi.ts b/api/withdrawalApi.ts index 96da17e..9a8e0cd 100644 --- a/api/withdrawalApi.ts +++ b/api/withdrawalApi.ts @@ -9,6 +9,7 @@ * Do not edit the class manually. */ + /* tslint:disable:no-unused-locals */ import { LedgerRecord } from '../model/ledgerRecord'; import { UidPushWithdrawal } from '../model/uidPushWithdrawal'; @@ -33,14 +34,14 @@ export class WithdrawalApi { } /** - * 如果对方的链上地址也是Gate的话, 则不收取手续费 + * Withdrawals to Gate addresses do not incur transaction fees. * @summary Withdraw - * @param ledgerRecord + * @param ledgerRecord */ - public async withdraw(ledgerRecord: LedgerRecord): Promise<{ response: AxiosResponse; body: LedgerRecord }> { + public async withdraw(ledgerRecord: LedgerRecord) : Promise<{ response: AxiosResponse; body: LedgerRecord; }> { const localVarPath = this.client.basePath + '/withdrawals'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -54,29 +55,28 @@ export class WithdrawalApi { throw new Error('Required parameter ledgerRecord was null or undefined when calling withdraw.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(ledgerRecord, 'LedgerRecord'), + data: ObjectSerializer.serialize(ledgerRecord, "LedgerRecord") }; const authSettings = ['apiv4']; - return this.client.request(config, 'LedgerRecord', authSettings); + return this.client.request(config, "LedgerRecord", authSettings); } /** - * 现货主账号之间转帐,转帐双方不可为子账号 - * @summary UID 转帐 - * @param uidPushWithdrawal + * Transfers between main spot accounts are allowed; however, both parties cannot be sub-accounts + * @summary UID transfer + * @param uidPushWithdrawal */ - public async withdrawPushOrder( - uidPushWithdrawal: UidPushWithdrawal, - ): Promise<{ response: AxiosResponse; body: UidPushWithdrawalResp }> { + public async withdrawPushOrder(uidPushWithdrawal: UidPushWithdrawal) : Promise<{ response: AxiosResponse; body: UidPushWithdrawalResp; }> { const localVarPath = this.client.basePath + '/withdrawals/push'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -87,37 +87,32 @@ export class WithdrawalApi { // verify required parameter 'uidPushWithdrawal' is not null or undefined if (uidPushWithdrawal === null || uidPushWithdrawal === undefined) { - throw new Error( - 'Required parameter uidPushWithdrawal was null or undefined when calling withdrawPushOrder.', - ); + throw new Error('Required parameter uidPushWithdrawal was null or undefined when calling withdrawPushOrder.'); } + const config: AxiosRequestConfig = { method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(uidPushWithdrawal, 'UidPushWithdrawal'), + data: ObjectSerializer.serialize(uidPushWithdrawal, "UidPushWithdrawal") }; const authSettings = ['apiv4']; - return this.client.request(config, 'UidPushWithdrawalResp', authSettings); + return this.client.request(config, "UidPushWithdrawalResp", authSettings); } /** - * + * * @summary Cancel withdrawal with specified ID - * @param withdrawalId + * @param withdrawalId */ - public async cancelWithdrawal(withdrawalId: string): Promise<{ response: AxiosResponse; body: LedgerRecord }> { - const localVarPath = - this.client.basePath + - '/withdrawals/{withdrawal_id}'.replace( - '{' + 'withdrawal_id' + '}', - encodeURIComponent(String(withdrawalId)), - ); - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + public async cancelWithdrawal(withdrawalId: string) : Promise<{ response: AxiosResponse; body: LedgerRecord; }> { + const localVarPath = this.client.basePath + '/withdrawals/{withdrawal_id}' + .replace('{' + 'withdrawal_id' + '}', encodeURIComponent(String(withdrawalId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -131,6 +126,7 @@ export class WithdrawalApi { throw new Error('Required parameter withdrawalId was null or undefined when calling cancelWithdrawal.'); } + const config: AxiosRequestConfig = { method: 'DELETE', params: localVarQueryParameters, @@ -139,6 +135,6 @@ export class WithdrawalApi { }; const authSettings = ['apiv4']; - return this.client.request(config, 'LedgerRecord', authSettings); + return this.client.request(config, "LedgerRecord", authSettings); } } diff --git a/docs/AccountApi.md b/docs/AccountApi.md index 0a5b032..627317a 100644 --- a/docs/AccountApi.md +++ b/docs/AccountApi.md @@ -5,14 +5,14 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- [**getAccountDetail**](AccountApi.md#getAccountDetail) | **GET** /account/detail | Get account detail -[**getAccountRateLimit**](AccountApi.md#getAccountRateLimit) | **GET** /account/rate_limit | 获取用户成交比率限频信息 +[**getAccountRateLimit**](AccountApi.md#getAccountRateLimit) | **GET** /account/rate_limit | Get user transaction rate limit information [**listSTPGroups**](AccountApi.md#listSTPGroups) | **GET** /account/stp_groups | List STP Groups [**createSTPGroup**](AccountApi.md#createSTPGroup) | **POST** /account/stp_groups | Create STP Group [**listSTPGroupsUsers**](AccountApi.md#listSTPGroupsUsers) | **GET** /account/stp_groups/{stp_id}/users | List users of the STP group [**addSTPGroupUsers**](AccountApi.md#addSTPGroupUsers) | **POST** /account/stp_groups/{stp_id}/users | Add users to the STP group [**deleteSTPGroupUsers**](AccountApi.md#deleteSTPGroupUsers) | **DELETE** /account/stp_groups/{stp_id}/users | Delete the user in the STP group -[**getDebitFee**](AccountApi.md#getDebitFee) | **GET** /account/debit_fee | 查询GT抵扣配置 -[**setDebitFee**](AccountApi.md#setDebitFee) | **POST** /account/debit_fee | 设定GT抵扣 +[**getDebitFee**](AccountApi.md#getDebitFee) | **GET** /account/debit_fee | Query GT deduction configuration. +[**setDebitFee**](AccountApi.md#setDebitFee) | **POST** /account/debit_fee | Set GT deduction. ## getAccountDetail @@ -58,7 +58,7 @@ Promise<{ response: AxiosResponse; body: AccountDetail; }> [AccountDetail](Accou > Promise<{ response: http.IncomingMessage; body: Array; }> getAccountRateLimit() -获取用户成交比率限频信息 +Get user transaction rate limit information ### Example @@ -326,11 +326,11 @@ Promise<{ response: AxiosResponse; body: Array; }> [StpGroupUser]( ## getDebitFee -> Promise<{ response: http.IncomingMessage; body: InlineResponse2001; }> getDebitFee() +> Promise<{ response: http.IncomingMessage; body: DebitFee; }> getDebitFee() -查询GT抵扣配置 +Query GT deduction configuration. -查询当前帐户的GT抵扣配置 +Query the current GT deduction configuration for the account. ### Example @@ -354,7 +354,7 @@ This endpoint does not need any parameter. ### Return type -Promise<{ response: AxiosResponse; body: InlineResponse2001; }> [InlineResponse2001](InlineResponse2001.md) +Promise<{ response: AxiosResponse; body: DebitFee; }> [DebitFee](DebitFee.md) ### Authorization @@ -367,11 +367,11 @@ Promise<{ response: AxiosResponse; body: InlineResponse2001; }> [InlineResponse2 ## setDebitFee -> Promise<{ response: http.IncomingMessage; body?: any; }> setDebitFee(inlineObject1) +> Promise<{ response: http.IncomingMessage; body?: any; }> setDebitFee(debitFee) -设定GT抵扣 +Set GT deduction. -开启或关闭当前帐户的GT抵扣 +Enable or disable GT deduction for the current account. ### Example @@ -384,8 +384,8 @@ const client = new GateApi.ApiClient(); client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); const api = new GateApi.AccountApi(client); -const inlineObject1 = new InlineObject1(); // InlineObject1 | -api.setDebitFee(inlineObject1) +const debitFee = new DebitFee(); // DebitFee | +api.setDebitFee(debitFee) .then(value => console.log('API called successfully.'), error => console.error(error)); ``` @@ -395,7 +395,7 @@ api.setDebitFee(inlineObject1) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **inlineObject1** | [**InlineObject1**](InlineObject1.md)| | + **debitFee** | [**DebitFee**](DebitFee.md)| | ### Return type diff --git a/docs/AccountDetail.md b/docs/AccountDetail.md index 3b35403..3269c86 100644 --- a/docs/AccountDetail.md +++ b/docs/AccountDetail.md @@ -9,5 +9,5 @@ Name | Type | Description | Notes **userId** | **number** | User ID | [optional] [default to undefined] **tier** | **number** | User VIP level | [optional] [default to undefined] **key** | [**AccountDetailKey**](AccountDetailKey.md) | | [optional] [default to undefined] -**copyTradingRole** | **number** | 用户角色: 0 - 普通用户 1 - 带单者 2 - 跟单者 3 - 带单者与跟单者 | [optional] [default to undefined] +**copyTradingRole** | **number** | User role: 0 - Ordinary user 1 - Order leader 2 - Follower 3 - Order leader and follower | [optional] [default to undefined] diff --git a/docs/AccountRateLimit.md b/docs/AccountRateLimit.md index 2a6a433..504e295 100644 --- a/docs/AccountRateLimit.md +++ b/docs/AccountRateLimit.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**tier** | **string** | 限频等级(详细限频规则查看[成交比率限频](#成交比率限频)) | [optional] [default to undefined] -**ratio** | **string** | 成交率 | [optional] [default to undefined] -**mainRatio** | **string** | 主账户合计成交比率 | [optional] [default to undefined] -**updatedAt** | **string** | 更新时间 | [optional] [default to undefined] +**tier** | **string** | Frequency limit level (For detailed frequency limit rules, see [Transaction ratio frequency limit](#rate-limit-based-on-fill-ratio)) | [optional] [default to undefined] +**ratio** | **string** | Transaction rate | [optional] [default to undefined] +**mainRatio** | **string** | Total transaction ratio of main account | [optional] [default to undefined] +**updatedAt** | **string** | Update time | [optional] [default to undefined] diff --git a/docs/AmendOrderResult.md b/docs/AmendOrderResult.md deleted file mode 100644 index f793790..0000000 --- a/docs/AmendOrderResult.md +++ /dev/null @@ -1,15 +0,0 @@ -# AmendOrderResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**orderId** | **string** | Order ID | [optional] [readonly] [default to undefined] -**amount** | **string** | Trade amount | [optional] [readonly] [default to undefined] -**price** | **string** | Order price | [optional] [readonly] [default to undefined] -**amendText** | **string** | The custom data that the user remarked when amending the order | [optional] [readonly] [default to undefined] -**succeeded** | **boolean** | Update success status | [optional] [readonly] [default to undefined] -**label** | **string** | Error indicator for failed modifications; empty when successful | [optional] [readonly] [default to undefined] -**message** | **string** | Error description for failed modifications; empty when successful | [optional] [readonly] [default to undefined] -**account** | **string** | Account types, spot - spot account, margin - margin account, unified - unified account, cross_margin - cross margin account.Portfolio margin accounts can only be set to `cross_margin` | [optional] [readonly] [default to undefined] - diff --git a/docs/ApiV4KeyPerm.md b/docs/ApiV4KeyPerm.md deleted file mode 100644 index 5f91e1b..0000000 --- a/docs/ApiV4KeyPerm.md +++ /dev/null @@ -1,30 +0,0 @@ -# ApiV4KeyPerm - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **string** | Permission name (all permissions will be removed if no value is passed) - wallet: wallet - spot: spot/margin - futures: perpetual contract - delivery: delivery - earn: earn - options: options\\m- account: Account - unified: unified - loan: Loan | [optional] [default to undefined] -**readOnly** | **boolean** | read only | [optional] [default to undefined] - -## Enum: ApiV4KeyPerm.Name - -* `Wallet` (value: `'wallet'`) - -* `Spot` (value: `'spot'`) - -* `Futures` (value: `'futures'`) - -* `Delivery` (value: `'delivery'`) - -* `Earn` (value: `'earn'`) - -* `Options` (value: `'options'`) - -* `Account` (value: `'account'`) - -* `Unified` (value: `'unified'`) - -* `Loan` (value: `'loan'`) - - diff --git a/docs/BatchAmendOrderReq.md b/docs/BatchAmendOrderReq.md index 5f52d8f..0a2570c 100644 --- a/docs/BatchAmendOrderReq.md +++ b/docs/BatchAmendOrderReq.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**orderId** | **number** | 订单id,order_id和text至少传一个 | [optional] [default to undefined] -**text** | **string** | 用户自定义订单text,order_id和text至少传一个 | [optional] [default to undefined] -**size** | **number** | 新的委托大小。包括已成交委托的部分。 - 如果小于等于已成交数量,则撤销委托。 - 新的委托买卖方向必须跟原有的一致。 - 不能修改平仓单的size。 - 对于只减仓委托,如果调大size,则可能踢出其他只减仓委托。 - 如果不修改价格,则调小size不会影响深度排队,调大size会排到当前价位最后。 | [optional] [default to undefined] +**orderId** | **number** | Order id, order_id and text must contain at least one | [optional] [default to undefined] +**text** | **string** | User-defined order text, at least one of order_id and text must be passed | [optional] [default to undefined] +**size** | **number** | 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] [default to undefined] **price** | **string** | New order price. | [optional] [default to undefined] **amendText** | **string** | Custom info during amending order | [optional] [default to undefined] diff --git a/docs/BatchFuturesOrder.md b/docs/BatchFuturesOrder.md index cfa4ef5..4e29b2d 100644 --- a/docs/BatchFuturesOrder.md +++ b/docs/BatchFuturesOrder.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **user** | **number** | User ID | [optional] [readonly] [default to undefined] **createTime** | **number** | Creation time of order | [optional] [readonly] [default to undefined] **finishTime** | **number** | Order finished time. Not returned if order is open | [optional] [readonly] [default to undefined] -**finishAs** | **string** | How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close - stp: cancelled because self trade prevention | [optional] [readonly] [default to undefined] +**finishAs** | **string** | 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] [default to undefined] **status** | **string** | Order status - `open`: waiting to be traded - `finished`: finished | [optional] [readonly] [default to undefined] **contract** | **string** | Futures contract | [optional] [default to undefined] **size** | **number** | Order size. Specify positive number to make a bid, and negative number to ask | [optional] [default to undefined] diff --git a/docs/CancelOrder.md b/docs/CancelOrder.md deleted file mode 100644 index 56ef3cf..0000000 --- a/docs/CancelOrder.md +++ /dev/null @@ -1,10 +0,0 @@ -# CancelOrder - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currencyPair** | **string** | Order currency pair | [default to undefined] -**id** | **string** | Order ID or user custom ID. Custom ID are accepted only within 30 minutes after order creation | [default to undefined] -**account** | **string** | If cancelled order is cross margin order or is portfolio margin account\'s API key, this field must be set and can only be `cross_margin`If cancelled order is cross margin order, this field must be set and can only be `cross_margin` | [optional] [default to undefined] - diff --git a/docs/CancelOrderResult.md b/docs/CancelOrderResult.md index ca3697a..803bde1 100644 --- a/docs/CancelOrderResult.md +++ b/docs/CancelOrderResult.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **currencyPair** | **string** | Order currency pair | [optional] [default to undefined] **id** | **string** | Order ID | [optional] [default to undefined] -**text** | **string** | 订单自定义信息 | [optional] [default to undefined] +**text** | **string** | Custom order information | [optional] [default to undefined] **succeeded** | **boolean** | Whether cancellation succeeded | [optional] [default to undefined] **label** | **string** | Error label when failed to cancel the order; emtpy if succeeded | [optional] [default to undefined] **message** | **string** | Error message when failed to cancel the order; empty if succeeded | [optional] [default to undefined] diff --git a/docs/CollateralCurrentRate.md b/docs/CollateralCurrentRate.md index 4ea819c..a037294 100644 --- a/docs/CollateralCurrentRate.md +++ b/docs/CollateralCurrentRate.md @@ -5,5 +5,5 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **currency** | **string** | Currency | [optional] [default to undefined] -**currentRate** | **string** | 币种活期利率 | [optional] [default to undefined] +**currentRate** | **string** | Currency current interest rate | [optional] [default to undefined] diff --git a/docs/Contract.md b/docs/Contract.md index 17fb288..a2c0600 100644 --- a/docs/Contract.md +++ b/docs/Contract.md @@ -34,7 +34,7 @@ Name | Type | Description | Notes **tradeSize** | **number** | Historical accumulated trade size | [optional] [default to undefined] **positionSize** | **number** | Current total long position size | [optional] [default to undefined] **configChangeTime** | **number** | Last changed time of configuration | [optional] [default to undefined] -**inDelisting** | **boolean** | `in_delisting=true` 并且position_size>0时候 表示该合约处于下线过渡期 `in_delisting=true`` 并且position_size=0时候 表示该合约处于下线状态 | [optional] [default to undefined] +**inDelisting** | **boolean** | `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] [default to undefined] **ordersLimit** | **number** | Maximum number of open orders | [optional] [default to undefined] **enableBonus** | **boolean** | Whether bouns is enabled | [optional] [default to undefined] **enableCredit** | **boolean** | Whether portfolio margin account is enabled | [optional] [default to undefined] diff --git a/docs/ConvertSmallBalance.md b/docs/ConvertSmallBalance.md index 8fdddb3..41aeeea 100644 --- a/docs/ConvertSmallBalance.md +++ b/docs/ConvertSmallBalance.md @@ -5,5 +5,5 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **currency** | **Array<string>** | Currency | [optional] [default to undefined] -**isAll** | **boolean** | 是否全部兑换 | [optional] [default to undefined] +**isAll** | **boolean** | Whether to exchange all | [optional] [default to undefined] diff --git a/docs/CountdownCancelAllOptionsTask.md b/docs/CountdownCancelAllOptionsTask.md index 3d6ccf2..b0b6491 100644 --- a/docs/CountdownCancelAllOptionsTask.md +++ b/docs/CountdownCancelAllOptionsTask.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**timeout** | **number** | 倒计时时间,单位 秒 至少5秒,为0时表示取消倒计时 | [default to undefined] +**timeout** | **number** | Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown | [default to undefined] **contract** | **string** | Options contract name | [optional] [default to undefined] **underlying** | **string** | Underlying | [optional] [default to undefined] diff --git a/docs/CrossMarginBorrowable.md b/docs/CrossMarginBorrowable.md deleted file mode 100644 index 4c49d7b..0000000 --- a/docs/CrossMarginBorrowable.md +++ /dev/null @@ -1,9 +0,0 @@ -# CrossMarginBorrowable - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **string** | Currency detail | [optional] [default to undefined] -**amount** | **string** | Max borrowable amount | [optional] [default to undefined] - diff --git a/docs/CurrencyPair.md b/docs/CurrencyPair.md index d32ad96..cc48bb5 100644 --- a/docs/CurrencyPair.md +++ b/docs/CurrencyPair.md @@ -17,7 +17,7 @@ Name | Type | Description | Notes **tradeStatus** | **string** | 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] [default to undefined] **sellStart** | **number** | Sell start unix timestamp in seconds | [optional] [default to undefined] **buyStart** | **number** | Buy start unix timestamp in seconds | [optional] [default to undefined] -**type** | **string** | 交易对类型,normal:常规, premarket:盘前 | [optional] [default to undefined] +**type** | **string** | Trading pair type, normal: normal, premarket: pre-market | [optional] [default to undefined] ## Enum: CurrencyPair.TradeStatus diff --git a/docs/InlineObject1.md b/docs/DebitFee.md similarity index 92% rename from docs/InlineObject1.md rename to docs/DebitFee.md index 6a948e8..cea682a 100644 --- a/docs/InlineObject1.md +++ b/docs/DebitFee.md @@ -1,4 +1,4 @@ -# InlineObject1 +# DebitFee ## Properties diff --git a/docs/DeliveryApi.md b/docs/DeliveryApi.md index 074eb72..324a6a8 100644 --- a/docs/DeliveryApi.md +++ b/docs/DeliveryApi.md @@ -1158,7 +1158,7 @@ Promise<{ response: AxiosResponse; body: Array; }> [Delivery List risk limit tiers -contract 参数不传,默认查询前 100 个市场的风险限额,limit 和 offset 对应市场维度的分页查询,不对应返回数组的长度,仅当 contract 参数为空时生效 +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/FlashSwapApi.md b/docs/FlashSwapApi.md index 7a07dde..3317618 100644 --- a/docs/FlashSwapApi.md +++ b/docs/FlashSwapApi.md @@ -31,7 +31,7 @@ const api = new GateApi.FlashSwapApi(client); const opts = { 'currency': "BTC", // string | Retrieve data of the specified currency 'page': 1, // number | Page number - 'limit': 1000 // number | 列表返回的最大数量。默认为1000,最小1,最大1000。 + 'limit': 1000 // number | Maximum response items. Default: 100, minimum: 1, Maximum: 1000 }; api.listFlashSwapCurrencyPair(opts) .then(value => console.log('API called successfully. Returned data: ', value.body), @@ -45,7 +45,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **currency** | **string**| Retrieve data of the specified currency | [optional] [default to undefined] **page** | **number**| Page number | [optional] [default to 1] - **limit** | **number**| 列表返回的最大数量。默认为1000,最小1,最大1000。 | [optional] [default to 1000] + **limit** | **number**| Maximum response items. Default: 100, minimum: 1, Maximum: 1000 | [optional] [default to 1000] ### Return type diff --git a/docs/FlashSwapCurrency.md b/docs/FlashSwapCurrency.md deleted file mode 100644 index 8097d60..0000000 --- a/docs/FlashSwapCurrency.md +++ /dev/null @@ -1,11 +0,0 @@ -# FlashSwapCurrency - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **string** | Currency name | [optional] [readonly] [default to undefined] -**minAmount** | **string** | Minimum amount required in flash swap | [optional] [readonly] [default to undefined] -**maxAmount** | **string** | Maximum amount allowed in flash swap | [optional] [readonly] [default to undefined] -**swappable** | **Array<string>** | Currencies which can be swapped to from this currency | [optional] [readonly] [default to undefined] - diff --git a/docs/FundingBookItem.md b/docs/FundingBookItem.md deleted file mode 100644 index 445461b..0000000 --- a/docs/FundingBookItem.md +++ /dev/null @@ -1,10 +0,0 @@ -# FundingBookItem - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**rate** | **string** | Loan rate (daily rate) | [optional] [default to undefined] -**amount** | **string** | Borrowable amount | [optional] [default to undefined] -**days** | **number** | The number of days till the loan repayment\'s dateline | [optional] [default to undefined] - diff --git a/docs/FuturesAccount.md b/docs/FuturesAccount.md index 1e424c0..1ade493 100644 --- a/docs/FuturesAccount.md +++ b/docs/FuturesAccount.md @@ -14,16 +14,16 @@ Name | Type | Description | Notes **inDualMode** | **boolean** | Whether dual mode is enabled | [optional] [default to undefined] **enableCredit** | **boolean** | Whether portfolio margin account mode is enabled | [optional] [default to undefined] **positionInitialMargin** | **string** | Initial margin position, applicable to the portfolio margin account model | [optional] [default to undefined] -**maintenanceMargin** | **string** | 头寸占用的维持保证金,适用于新经典账户保证金模式和统一账户模式 | [optional] [default to undefined] +**maintenanceMargin** | **string** | The maintenance deposit occupied by the position is suitable for the new classic account margin model and unified account model | [optional] [default to undefined] **bonus** | **string** | Perpetual Contract Bonus | [optional] [default to undefined] -**enableEvolvedClassic** | **boolean** | 经典账户保证金模式,true-新模式,false-老模式 | [optional] [default to undefined] -**crossOrderMargin** | **string** | 全仓挂单保证金,适用于新经典账户保证金模式 | [optional] [default to undefined] -**crossInitialMargin** | **string** | 全仓初始保证金,适用于新经典账户保证金模式 | [optional] [default to undefined] -**crossMaintenanceMargin** | **string** | 全仓维持保证金,适用于新经典账户保证金模式 | [optional] [default to undefined] -**crossUnrealisedPnl** | **string** | 全仓未实现盈亏,适用于新经典账户保证金模式 | [optional] [default to undefined] -**crossAvailable** | **string** | 全仓可用额度,适用于新经典账户保证金模式 | [optional] [default to undefined] -**isolatedPositionMargin** | **string** | 逐仓仓位保证金,适用于新经典账户保证金模式 | [optional] [default to undefined] -**enableNewDualMode** | **boolean** | 是否开启新的双向持仓模式 | [optional] [default to undefined] -**marginMode** | **number** | 保证金模式,0-经典保证金模式,1-跨币种保证金模式,2-组合保证金模式 | [optional] [default to undefined] +**enableEvolvedClassic** | **boolean** | Classic account margin mode, true-new mode, false-old mode | [optional] [default to undefined] +**crossOrderMargin** | **string** | Full -warehouse hanging order deposit, suitable for the new classic account margin model | [optional] [default to undefined] +**crossInitialMargin** | **string** | The initial security deposit of the full warehouse is suitable for the new classic account margin model | [optional] [default to undefined] +**crossMaintenanceMargin** | **string** | Maintain deposit in full warehouse, suitable for new classic account margin models | [optional] [default to undefined] +**crossUnrealisedPnl** | **string** | The full warehouse does not achieve profit and loss, suitable for the new classic account margin model | [optional] [default to undefined] +**crossAvailable** | **string** | Full warehouse available amount, suitable for the new classic account margin model | [optional] [default to undefined] +**isolatedPositionMargin** | **string** | Ware -position margin, suitable for the new classic account margin model | [optional] [default to undefined] +**enableNewDualMode** | **boolean** | Whether to open a new two-way position mode | [optional] [default to undefined] +**marginMode** | **number** | Margin mode, 0-classic margin mode, 1-cross-currency margin mode, 2-combined margin mode | [optional] [default to undefined] **history** | [**FuturesAccountHistory**](FuturesAccountHistory.md) | | [optional] [default to undefined] diff --git a/docs/FuturesApi.md b/docs/FuturesApi.md index 24f40d6..6644843 100644 --- a/docs/FuturesApi.md +++ b/docs/FuturesApi.md @@ -45,7 +45,7 @@ Method | HTTP request | Description [**countdownCancelAllFutures**](FuturesApi.md#countdownCancelAllFutures) | **POST** /futures/{settle}/countdown_cancel_all | Countdown cancel orders [**getFuturesFee**](FuturesApi.md#getFuturesFee) | **GET** /futures/{settle}/fee | Query user trading fee rates [**cancelBatchFutureOrders**](FuturesApi.md#cancelBatchFutureOrders) | **POST** /futures/{settle}/batch_cancel_orders | Cancel a batch of orders with an ID list -[**amendBatchFutureOrders**](FuturesApi.md#amendBatchFutureOrders) | **POST** /futures/{settle}/batch_amend_orders | 批量修改指定 ID 的订单 +[**amendBatchFutureOrders**](FuturesApi.md#amendBatchFutureOrders) | **POST** /futures/{settle}/batch_amend_orders | Batch modify orders with specified IDs [**listPriceTriggeredOrders**](FuturesApi.md#listPriceTriggeredOrders) | **GET** /futures/{settle}/price_orders | List all auto orders [**createPriceTriggeredOrder**](FuturesApi.md#createPriceTriggeredOrder) | **POST** /futures/{settle}/price_orders | Create a price-triggered order [**cancelPriceTriggeredOrderList**](FuturesApi.md#cancelPriceTriggeredOrderList) | **DELETE** /futures/{settle}/price_orders | Cancel all open orders @@ -655,7 +655,7 @@ No authorization required List risk limit tiers -contract 参数不传,默认查询前 100 个市场的风险限额,limit 和 offset 对应市场维度的分页查询,不对应返回数组的长度,仅当 contract 参数为空时生效 +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 @@ -1015,7 +1015,7 @@ client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); const api = new GateApi.FuturesApi(client); const settle = "usdt"; // 'btc' | 'usdt' | Settle currency const contract = "BTC_USDT"; // string | Futures contract -const riskLimit = "1000000"; // string | 新的风险限额价值 +const riskLimit = "1000000"; // string | New Risk Limit Value api.updatePositionRiskLimit(settle, contract, riskLimit) .then(value => console.log('API called successfully. Returned data: ', value.body), error => console.error(error)); @@ -1028,7 +1028,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **settle** | **Settle**| Settle currency | [default to undefined] **contract** | **string**| Futures contract | [default to undefined] - **riskLimit** | **string**| 新的风险限额价值 | [default to undefined] + **riskLimit** | **string**| New Risk Limit Value | [default to undefined] ### Return type @@ -1254,7 +1254,7 @@ client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); const api = new GateApi.FuturesApi(client); const settle = "usdt"; // 'btc' | 'usdt' | Settle currency const contract = "BTC_USDT"; // string | Futures contract -const riskLimit = "1000000"; // string | 新的风险限额价值 +const riskLimit = "1000000"; // string | New Risk Limit Value api.updateDualModePositionRiskLimit(settle, contract, riskLimit) .then(value => console.log('API called successfully. Returned data: ', value.body), error => console.error(error)); @@ -1267,7 +1267,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **settle** | **Settle**| Settle currency | [default to undefined] **contract** | **string**| Futures contract | [default to undefined] - **riskLimit** | **string**| 新的风险限额价值 | [default to undefined] + **riskLimit** | **string**| New Risk Limit Value | [default to undefined] ### Return type @@ -1361,7 +1361,7 @@ const api = new GateApi.FuturesApi(client); const settle = "usdt"; // 'btc' | 'usdt' | Settle currency const futuresOrder = new FuturesOrder(); // FuturesOrder | const opts = { - 'xGateExptime': 1689560679123 // number | 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 + 'xGateExptime': 1689560679123 // number | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected }; api.createFuturesOrder(settle, futuresOrder, opts) .then(value => console.log('API called successfully. Returned data: ', value.body), @@ -1375,7 +1375,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **settle** | **Settle**| Settle currency | [default to undefined] **futuresOrder** | [**FuturesOrder**](FuturesOrder.md)| | - **xGateExptime** | **number**| 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 | [optional] [default to undefined] + **xGateExptime** | **number**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] [default to undefined] ### Return type @@ -1412,7 +1412,7 @@ const api = new GateApi.FuturesApi(client); const settle = "usdt"; // 'btc' | 'usdt' | Settle currency const contract = "BTC_USDT"; // string | Futures contract const opts = { - 'xGateExptime': 1689560679123, // number | 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 + 'xGateExptime': 1689560679123, // number | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected 'side': "ask" // string | All bids or asks. Both included if not specified }; api.cancelFuturesOrders(settle, contract, opts) @@ -1427,7 +1427,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **settle** | **Settle**| Settle currency | [default to undefined] **contract** | **string**| Futures contract | [default to undefined] - **xGateExptime** | **number**| 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 | [optional] [default to undefined] + **xGateExptime** | **number**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] [default to undefined] **side** | **string**| All bids or asks. Both included if not specified | [optional] [default to undefined] ### Return type @@ -1520,7 +1520,7 @@ const api = new GateApi.FuturesApi(client); const settle = "usdt"; // 'btc' | 'usdt' | Settle currency const futuresOrder = [new FuturesOrder()]; // Array | const opts = { - 'xGateExptime': 1689560679123 // number | 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 + 'xGateExptime': 1689560679123 // number | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected }; api.createBatchFuturesOrder(settle, futuresOrder, opts) .then(value => console.log('API called successfully. Returned data: ', value.body), @@ -1534,7 +1534,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **settle** | **Settle**| Settle currency | [default to undefined] **futuresOrder** | [**Array<FuturesOrder>**](FuturesOrder.md)| | - **xGateExptime** | **number**| 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 | [optional] [default to undefined] + **xGateExptime** | **number**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] [default to undefined] ### Return type @@ -1617,7 +1617,7 @@ const settle = "usdt"; // 'btc' | 'usdt' | Settle currency const orderId = "12345"; // string | 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. const futuresOrderAmendment = new FuturesOrderAmendment(); // FuturesOrderAmendment | const opts = { - 'xGateExptime': 1689560679123 // number | 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 + 'xGateExptime': 1689560679123 // number | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected }; api.amendFuturesOrder(settle, orderId, futuresOrderAmendment, opts) .then(value => console.log('API called successfully. Returned data: ', value.body), @@ -1632,7 +1632,7 @@ Name | Type | Description | Notes **settle** | **Settle**| Settle currency | [default to undefined] **orderId** | **string**| 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. | [default to undefined] **futuresOrderAmendment** | [**FuturesOrderAmendment**](FuturesOrderAmendment.md)| | - **xGateExptime** | **number**| 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 | [optional] [default to undefined] + **xGateExptime** | **number**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] [default to undefined] ### Return type @@ -1667,7 +1667,7 @@ const api = new GateApi.FuturesApi(client); const settle = "usdt"; // 'btc' | 'usdt' | Settle currency const orderId = "12345"; // string | 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. const opts = { - 'xGateExptime': 1689560679123 // number | 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 + 'xGateExptime': 1689560679123 // number | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected }; api.cancelFuturesOrder(settle, orderId, opts) .then(value => console.log('API called successfully. Returned data: ', value.body), @@ -1681,7 +1681,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **settle** | **Settle**| Settle currency | [default to undefined] **orderId** | **string**| 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. | [default to undefined] - **xGateExptime** | **number**| 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 | [optional] [default to undefined] + **xGateExptime** | **number**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] [default to undefined] ### Return type @@ -2087,7 +2087,7 @@ const api = new GateApi.FuturesApi(client); const settle = "usdt"; // 'btc' | 'usdt' | Settle currency const requestBody = undefined; // Array | const opts = { - 'xGateExptime': 1689560679123 // number | 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 + 'xGateExptime': 1689560679123 // number | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected }; api.cancelBatchFutureOrders(settle, requestBody, opts) .then(value => console.log('API called successfully. Returned data: ', value.body), @@ -2101,7 +2101,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **settle** | **Settle**| Settle currency | [default to undefined] **requestBody** | [**Array<string>**](string.md)| | - **xGateExptime** | **number**| 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 | [optional] [default to undefined] + **xGateExptime** | **number**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] [default to undefined] ### Return type @@ -2120,9 +2120,9 @@ Promise<{ response: AxiosResponse; body: Array; }> [Fut > Promise<{ response: http.IncomingMessage; body: Array; }> amendBatchFutureOrders(settle, batchAmendOrderReq, opts) -批量修改指定 ID 的订单 +Batch modify orders with specified IDs -可以指定多个不同的订单id。一次请求最多只能修改 10 个订单 +You can specify multiple different order IDs. You can only modify up to 10 orders in one request. ### Example @@ -2138,7 +2138,7 @@ const api = new GateApi.FuturesApi(client); const settle = "usdt"; // 'btc' | 'usdt' | Settle currency const batchAmendOrderReq = [new BatchAmendOrderReq()]; // Array | const opts = { - 'xGateExptime': 1689560679123 // number | 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 + 'xGateExptime': 1689560679123 // number | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected }; api.amendBatchFutureOrders(settle, batchAmendOrderReq, opts) .then(value => console.log('API called successfully. Returned data: ', value.body), @@ -2152,7 +2152,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **settle** | **Settle**| Settle currency | [default to undefined] **batchAmendOrderReq** | [**Array<BatchAmendOrderReq>**](BatchAmendOrderReq.md)| | - **xGateExptime** | **number**| 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 | [optional] [default to undefined] + **xGateExptime** | **number**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] [default to undefined] ### Return type diff --git a/docs/FuturesBatchAmendOrderRequest.md b/docs/FuturesBatchAmendOrderRequest.md index 8fd9d15..d09c911 100644 --- a/docs/FuturesBatchAmendOrderRequest.md +++ b/docs/FuturesBatchAmendOrderRequest.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**orderId** | **number** | 订单id,order_id和text至少传一个 | [optional] [default to undefined] -**text** | **string** | 用户自定义订单text,order_id和text至少传一个 | [optional] [default to undefined] -**size** | **number** | 新的委托大小。包括已成交委托的部分。 - 如果小于等于已成交数量,则撤销委托。 - 新的委托买卖方向必须跟原有的一致。 - 不能修改平仓单的size。 - 对于只减仓委托,如果调大size,则可能踢出其他只减仓委托。 - 如果不修改价格,则调小size不会影响深度排队,调大size会排到当前价位最后。 | [optional] [default to undefined] +**orderId** | **number** | Order id, order_id and text must contain at least one | [optional] [default to undefined] +**text** | **string** | User-defined order text, at least one of order_id and text must be passed | [optional] [default to undefined] +**size** | **number** | 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] [default to undefined] **price** | **string** | New order price. | [optional] [default to undefined] **amendText** | **string** | Custom info during amending order | [optional] [default to undefined] diff --git a/docs/FuturesLimitRiskTiers.md b/docs/FuturesLimitRiskTiers.md index 039cd0a..ce6b1d6 100644 --- a/docs/FuturesLimitRiskTiers.md +++ b/docs/FuturesLimitRiskTiers.md @@ -9,5 +9,5 @@ Name | Type | Description | Notes **initialRate** | **string** | Initial margin rate | [optional] [default to undefined] **maintenanceRate** | **string** | Maintenance margin rate | [optional] [default to undefined] **leverageMax** | **string** | Maximum leverage | [optional] [default to undefined] -**contract** | **string** | 市场,仅当市场分页请求时可见 | [optional] [default to undefined] +**contract** | **string** | Markets, visible only during market pagination requests | [optional] [default to undefined] diff --git a/docs/FuturesLiqOrder.md b/docs/FuturesLiqOrder.md index 76e96ef..0a0eadd 100644 --- a/docs/FuturesLiqOrder.md +++ b/docs/FuturesLiqOrder.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **time** | **number** | Liquidation time | [optional] [readonly] [default to undefined] **contract** | **string** | Futures contract | [optional] [readonly] [default to undefined] **size** | **number** | User position size | [optional] [readonly] [default to undefined] -**orderSize** | **number** | 强平委托数量 | [optional] [readonly] [default to undefined] +**orderSize** | **number** | Number of forced liquidation orders | [optional] [readonly] [default to undefined] **orderPrice** | **string** | Liquidation order price | [optional] [readonly] [default to undefined] **fillPrice** | **string** | Liquidation order average taker price | [optional] [readonly] [default to undefined] **left** | **number** | System liquidation order maker size | [optional] [readonly] [default to undefined] diff --git a/docs/FuturesOrder.md b/docs/FuturesOrder.md index cce4216..a85c75b 100644 --- a/docs/FuturesOrder.md +++ b/docs/FuturesOrder.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **user** | **number** | User ID | [optional] [readonly] [default to undefined] **createTime** | **number** | Creation time of order | [optional] [readonly] [default to undefined] **finishTime** | **number** | Order finished time. Not returned if order is open | [optional] [readonly] [default to undefined] -**finishAs** | **string** | How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close - stp: cancelled because self trade prevention | [optional] [readonly] [default to undefined] +**finishAs** | **string** | 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] [default to undefined] **status** | **string** | Order status - `open`: waiting to be traded - `finished`: finished | [optional] [readonly] [default to undefined] **contract** | **string** | Futures contract | [default to undefined] **size** | **number** | Order size. Specify positive number to make a bid, and negative number to ask | [default to undefined] diff --git a/docs/FuturesOrderAmendment.md b/docs/FuturesOrderAmendment.md index c1ad7df..143c7a7 100644 --- a/docs/FuturesOrderAmendment.md +++ b/docs/FuturesOrderAmendment.md @@ -7,6 +7,6 @@ Name | Type | Description | Notes **size** | **number** | 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] [default to undefined] **price** | **string** | New order price. | [optional] [default to undefined] **amendText** | **string** | Custom info during amending order | [optional] [default to undefined] -**bizInfo** | **string** | 用户可以备注这次修改的信息,比如ao。 | [optional] [default to undefined] -**bbo** | **string** | 用户可以对手价进行修改。 | [optional] [default to undefined] +**bizInfo** | **string** | Users can annotate this modification with information. | [optional] [default to undefined] +**bbo** | **string** | Users are able to modify the offer price manually. | [optional] [default to undefined] diff --git a/docs/FuturesTicker.md b/docs/FuturesTicker.md index 928a2f7..efc0643 100644 --- a/docs/FuturesTicker.md +++ b/docs/FuturesTicker.md @@ -18,13 +18,13 @@ Name | Type | Description | Notes **volume24hSettle** | **string** | Trade volume in recent 24h, in settle currency | [optional] [default to undefined] **markPrice** | **string** | Recent mark price | [optional] [default to undefined] **fundingRate** | **string** | Funding rate | [optional] [default to undefined] -**fundingRateIndicative** | **string** | Indicative Funding rate in next period | [optional] [default to undefined] +**fundingRateIndicative** | **string** | Indicative Funding rate in next period. (deprecated. use `funding_rate`) | [optional] [default to undefined] **indexPrice** | **string** | Index price | [optional] [default to undefined] **quantoBaseRate** | **string** | Exchange rate of base currency and settlement currency in Quanto contract. Does not exists in contracts of other types | [optional] [default to undefined] **basisRate** | **string** | Basis rate | [optional] [default to undefined] **basisValue** | **string** | Basis value | [optional] [default to undefined] **lowestAsk** | **string** | Recent lowest ask | [optional] [default to undefined] -**lowestSize** | **string** | 最新卖方最低价的挂单量 | [optional] [default to undefined] +**lowestSize** | **string** | The latest seller\'s lowest price order quantity | [optional] [default to undefined] **highestBid** | **string** | Recent highest bid | [optional] [default to undefined] -**highestSize** | **string** | 最新买方最高价的挂单量 | [optional] [default to undefined] +**highestSize** | **string** | The latest buyer\'s highest price order volume | [optional] [default to undefined] diff --git a/docs/InlineObject.md b/docs/InlineObject.md deleted file mode 100644 index d32c5ef..0000000 --- a/docs/InlineObject.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineObject - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **string** | Currency name | [default to undefined] -**leverage** | **string** | 倍数 | [default to undefined] - diff --git a/docs/InlineResponse200.md b/docs/InlineResponse200.md deleted file mode 100644 index 1a140c4..0000000 --- a/docs/InlineResponse200.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse200 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**txId** | **string** | Order id | [optional] [default to undefined] -**status** | **string** | 划转状态,PENDING - 处理中,SUCCESS - 划转成功,FAIL - 划转失败,PARTIAL_SUCCESS - 部分成功(子子划转时会出现此状态) | [optional] [default to undefined] - diff --git a/docs/InlineResponse2001.md b/docs/InlineResponse2001.md deleted file mode 100644 index de599a7..0000000 --- a/docs/InlineResponse2001.md +++ /dev/null @@ -1,8 +0,0 @@ -# InlineResponse2001 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enabled** | **boolean** | Whether GT fee discount is used | [optional] [default to undefined] - diff --git a/docs/Loan.md b/docs/Loan.md deleted file mode 100644 index 3f239e5..0000000 --- a/docs/Loan.md +++ /dev/null @@ -1,43 +0,0 @@ -# Loan - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Loan ID | [optional] [readonly] [default to undefined] -**createTime** | **string** | Creation time | [optional] [readonly] [default to undefined] -**expireTime** | **string** | Repay time of the loan. No value will be returned for lending loan | [optional] [readonly] [default to undefined] -**status** | **string** | Loan status open - not fully loaned loaned - all loaned out for lending loan; loaned in for borrowing side finished - loan is finished, either being all repaid or cancelled by the lender auto_repaid - automatically repaid by the system | [optional] [readonly] [default to undefined] -**side** | **string** | Loan side | [default to undefined] -**currency** | **string** | Loan currency | [default to undefined] -**rate** | **string** | Loan rate. Only rates in [0.0001, 0.01] are supported. Not required in lending. Market rate calculated from recent rates will be used if not set | [optional] [default to undefined] -**amount** | **string** | Loan amount | [default to undefined] -**days** | **number** | Loan days. Only 10 is supported for now | [optional] [default to undefined] -**autoRenew** | **boolean** | Whether to auto renew the loan upon expiration | [optional] [default to undefined] -**currencyPair** | **string** | Currency pair. Required if borrowing | [optional] [default to undefined] -**left** | **string** | Amount not lent out yet | [optional] [readonly] [default to undefined] -**repaid** | **string** | Repaid amount | [optional] [readonly] [default to undefined] -**paidInterest** | **string** | Repaid interest | [optional] [readonly] [default to undefined] -**unpaidInterest** | **string** | Outstanding interest yet to be paid | [optional] [readonly] [default to undefined] -**feeRate** | **string** | Loan fee rate | [optional] [default to undefined] -**origId** | **string** | Original loan ID of the loan if auto-renewed, otherwise equals to id | [optional] [default to undefined] -**text** | **string** | User defined custom ID | [optional] [default to undefined] - -## Enum: Loan.Status - -* `Open` (value: `'open'`) - -* `Loaned` (value: `'loaned'`) - -* `Finished` (value: `'finished'`) - -* `AutoRepaid` (value: `'auto_repaid'`) - - -## Enum: Loan.Side - -* `Lend` (value: `'lend'`) - -* `Borrow` (value: `'borrow'`) - - diff --git a/docs/LoanPatch.md b/docs/LoanPatch.md deleted file mode 100644 index c2a50fc..0000000 --- a/docs/LoanPatch.md +++ /dev/null @@ -1,19 +0,0 @@ -# LoanPatch - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **string** | Loan currency | [default to undefined] -**side** | **string** | Loan side. Possible values are `lend` and `borrow`. For `LoanRecord` patching, only `lend` is supported | [default to undefined] -**autoRenew** | **boolean** | Auto renew | [default to undefined] -**currencyPair** | **string** | Currency pair. Required if borrowing | [optional] [default to undefined] -**loanId** | **string** | Loan ID. Required for `LoanRecord` patching | [optional] [default to undefined] - -## Enum: LoanPatch.Side - -* `Lend` (value: `'lend'`) - -* `Borrow` (value: `'borrow'`) - - diff --git a/docs/LoanRecord.md b/docs/LoanRecord.md deleted file mode 100644 index 3feb2cf..0000000 --- a/docs/LoanRecord.md +++ /dev/null @@ -1,28 +0,0 @@ -# LoanRecord - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Loan record ID | [optional] [default to undefined] -**loanId** | **string** | Loan ID the record belongs to | [optional] [default to undefined] -**createTime** | **string** | Loan time | [optional] [default to undefined] -**expireTime** | **string** | Expiration time | [optional] [default to undefined] -**status** | **string** | Loan record status | [optional] [default to undefined] -**borrowUserId** | **string** | Garbled user ID | [optional] [default to undefined] -**currency** | **string** | Loan currency | [optional] [default to undefined] -**rate** | **string** | Loan rate | [optional] [default to undefined] -**amount** | **string** | Loan amount | [optional] [default to undefined] -**days** | **number** | Loan days | [optional] [default to undefined] -**autoRenew** | **boolean** | Whether the record will auto renew on expiration | [optional] [default to undefined] -**repaid** | **string** | Repaid amount | [optional] [default to undefined] -**paidInterest** | **string** | Repaid interest | [optional] [readonly] [default to undefined] -**unpaidInterest** | **string** | Outstanding interest yet to be paid | [optional] [readonly] [default to undefined] - -## Enum: LoanRecord.Status - -* `Loaned` (value: `'loaned'`) - -* `Finished` (value: `'finished'`) - - diff --git a/docs/MarginApi.md b/docs/MarginApi.md index 144d05d..c732203 100644 --- a/docs/MarginApi.md +++ b/docs/MarginApi.md @@ -10,19 +10,19 @@ Method | HTTP request | Description [**getAutoRepayStatus**](MarginApi.md#getAutoRepayStatus) | **GET** /margin/auto_repay | Retrieve user auto repayment setting [**setAutoRepay**](MarginApi.md#setAutoRepay) | **POST** /margin/auto_repay | Update user\'s auto repayment setting [**getMarginTransferable**](MarginApi.md#getMarginTransferable) | **GET** /margin/transferable | Get the max transferable amount for a specific margin currency -[**listCrossMarginCurrencies**](MarginApi.md#listCrossMarginCurrencies) | **GET** /margin/cross/currencies | Currencies supported by cross margin. -[**getCrossMarginCurrency**](MarginApi.md#getCrossMarginCurrency) | **GET** /margin/cross/currencies/{currency} | Retrieve detail of one single currency supported by cross margin -[**getCrossMarginAccount**](MarginApi.md#getCrossMarginAccount) | **GET** /margin/cross/accounts | Retrieve cross margin account -[**listCrossMarginAccountBook**](MarginApi.md#listCrossMarginAccountBook) | **GET** /margin/cross/account_book | Retrieve cross margin account change history -[**listCrossMarginLoans**](MarginApi.md#listCrossMarginLoans) | **GET** /margin/cross/loans | List cross margin borrow history -[**createCrossMarginLoan**](MarginApi.md#createCrossMarginLoan) | **POST** /margin/cross/loans | Create a cross margin borrow loan -[**getCrossMarginLoan**](MarginApi.md#getCrossMarginLoan) | **GET** /margin/cross/loans/{loan_id} | Retrieve single borrow loan detail -[**listCrossMarginRepayments**](MarginApi.md#listCrossMarginRepayments) | **GET** /margin/cross/repayments | Retrieve cross margin repayments -[**repayCrossMarginLoan**](MarginApi.md#repayCrossMarginLoan) | **POST** /margin/cross/repayments | Cross margin repayments -[**getCrossMarginInterestRecords**](MarginApi.md#getCrossMarginInterestRecords) | **GET** /margin/cross/interest_records | Interest records for the cross margin account -[**getCrossMarginTransferable**](MarginApi.md#getCrossMarginTransferable) | **GET** /margin/cross/transferable | Get the max transferable amount for a specific cross margin currency -[**getCrossMarginEstimateRate**](MarginApi.md#getCrossMarginEstimateRate) | **GET** /margin/cross/estimate_rate | Estimated interest rates -[**getCrossMarginBorrowable**](MarginApi.md#getCrossMarginBorrowable) | **GET** /margin/cross/borrowable | Get the max borrowable amount for a specific cross margin currency +[**listCrossMarginCurrencies**](MarginApi.md#listCrossMarginCurrencies) | **GET** /margin/cross/currencies | Currencies supported by cross margin.(deprecated) +[**getCrossMarginCurrency**](MarginApi.md#getCrossMarginCurrency) | **GET** /margin/cross/currencies/{currency} | Retrieve detail of one single currency supported by cross margin. (deprecated) +[**getCrossMarginAccount**](MarginApi.md#getCrossMarginAccount) | **GET** /margin/cross/accounts | Retrieve cross margin account. (deprecated) +[**listCrossMarginAccountBook**](MarginApi.md#listCrossMarginAccountBook) | **GET** /margin/cross/account_book | Retrieve cross margin account change history. (deprecated) +[**listCrossMarginLoans**](MarginApi.md#listCrossMarginLoans) | **GET** /margin/cross/loans | List cross margin borrow history. (deprecated) +[**createCrossMarginLoan**](MarginApi.md#createCrossMarginLoan) | **POST** /margin/cross/loans | Create a cross margin borrow loan. (deprecated) +[**getCrossMarginLoan**](MarginApi.md#getCrossMarginLoan) | **GET** /margin/cross/loans/{loan_id} | Retrieve single borrow loan detail. (deprecated) +[**listCrossMarginRepayments**](MarginApi.md#listCrossMarginRepayments) | **GET** /margin/cross/repayments | Retrieve cross margin repayments. (deprecated) +[**repayCrossMarginLoan**](MarginApi.md#repayCrossMarginLoan) | **POST** /margin/cross/repayments | Cross margin repayments. (deprecated) +[**getCrossMarginInterestRecords**](MarginApi.md#getCrossMarginInterestRecords) | **GET** /margin/cross/interest_records | Interest records for the cross margin account. (deprecated) +[**getCrossMarginTransferable**](MarginApi.md#getCrossMarginTransferable) | **GET** /margin/cross/transferable | Get the max transferable amount for a specific cross margin currency. (deprecated) +[**getCrossMarginEstimateRate**](MarginApi.md#getCrossMarginEstimateRate) | **GET** /margin/cross/estimate_rate | Estimated interest rates. (deprecated) +[**getCrossMarginBorrowable**](MarginApi.md#getCrossMarginBorrowable) | **GET** /margin/cross/borrowable | Get the max borrowable amount for a specific cross margin currency. (deprecated) ## listMarginAccounts @@ -307,7 +307,7 @@ Promise<{ response: AxiosResponse; body: MarginTransferable; }> [MarginTransfera > Promise<{ response: http.IncomingMessage; body: Array; }> listCrossMarginCurrencies() -Currencies supported by cross margin. +Currencies supported by cross margin.(deprecated) ### Example @@ -344,7 +344,7 @@ No authorization required > Promise<{ response: http.IncomingMessage; body: CrossMarginCurrency; }> getCrossMarginCurrency(currency) -Retrieve detail of one single currency supported by cross margin +Retrieve detail of one single currency supported by cross margin. (deprecated) ### Example @@ -385,7 +385,7 @@ No authorization required > Promise<{ response: http.IncomingMessage; body: CrossMarginAccount; }> getCrossMarginAccount() -Retrieve cross margin account +Retrieve cross margin account. (deprecated) ### Example @@ -424,9 +424,9 @@ Promise<{ response: AxiosResponse; body: CrossMarginAccount; }> [CrossMarginAcco > Promise<{ response: http.IncomingMessage; body: Array; }> listCrossMarginAccountBook(opts) -Retrieve cross margin account change history +Retrieve cross margin account change history. (deprecated) -记录查询时间范围不允许超过 30 天。 使用 limit&page分页功能检索数据时最大分页数量为100,000条,即 (limit * page - 1) <= 100000。 +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 @@ -481,7 +481,7 @@ Promise<{ response: AxiosResponse; body: Array; }> [Cros > Promise<{ response: http.IncomingMessage; body: Array; }> listCrossMarginLoans(status, opts) -List cross margin borrow history +List cross margin borrow history. (deprecated) Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. @@ -536,7 +536,7 @@ Promise<{ response: AxiosResponse; body: Array; }> [CrossMargin > Promise<{ response: http.IncomingMessage; body: CrossMarginLoan; }> createCrossMarginLoan(crossMarginLoan) -Create a cross margin borrow loan +Create a cross margin borrow loan. (deprecated) Borrow amount cannot be less than currency minimum borrow amount @@ -581,7 +581,7 @@ Promise<{ response: AxiosResponse; body: CrossMarginLoan; }> [CrossMarginLoan](C > Promise<{ response: http.IncomingMessage; body: CrossMarginLoan; }> getCrossMarginLoan(loanId) -Retrieve single borrow loan detail +Retrieve single borrow loan detail. (deprecated) ### Example @@ -624,7 +624,7 @@ Promise<{ response: AxiosResponse; body: CrossMarginLoan; }> [CrossMarginLoan](C > Promise<{ response: http.IncomingMessage; body: Array; }> listCrossMarginRepayments(opts) -Retrieve cross margin repayments +Retrieve cross margin repayments. (deprecated) Sort by creation time in descending order by default. Set `reverse=false` to return ascending results. @@ -679,7 +679,7 @@ Promise<{ response: AxiosResponse; body: Array; }> [CrossM > Promise<{ response: http.IncomingMessage; body: Array; }> repayCrossMarginLoan(crossMarginRepayRequest) -Cross margin repayments +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 @@ -724,7 +724,7 @@ Promise<{ response: AxiosResponse; body: Array; }> [CrossMargin > Promise<{ response: http.IncomingMessage; body: Array; }> getCrossMarginInterestRecords(opts) -Interest records for the cross margin account +Interest records for the cross margin account. (deprecated) ### Example @@ -777,7 +777,7 @@ Promise<{ response: AxiosResponse; body: Array; }> [UniLo > Promise<{ response: http.IncomingMessage; body: CrossMarginTransferable; }> getCrossMarginTransferable(currency) -Get the max transferable amount for a specific cross margin currency +Get the max transferable amount for a specific cross margin currency. (deprecated) ### Example @@ -820,7 +820,7 @@ Promise<{ response: AxiosResponse; body: CrossMarginTransferable; }> [CrossMargi > Promise<{ response: http.IncomingMessage; body: { [key: string]: string; }; }> getCrossMarginEstimateRate(currencies) -Estimated interest rates +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. @@ -865,7 +865,7 @@ Promise<{ response: AxiosResponse; body: { [key: string]: string; }; }> [string] > Promise<{ response: http.IncomingMessage; body: UnifiedBorrowable; }> getCrossMarginBorrowable(currency) -Get the max borrowable amount for a specific cross margin currency +Get the max borrowable amount for a specific cross margin currency. (deprecated) ### Example diff --git a/docs/MarginBorrowable.md b/docs/MarginBorrowable.md deleted file mode 100644 index 7b2e883..0000000 --- a/docs/MarginBorrowable.md +++ /dev/null @@ -1,10 +0,0 @@ -# MarginBorrowable - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **string** | Currency detail | [optional] [default to undefined] -**currencyPair** | **string** | Currency pair | [optional] [default to undefined] -**amount** | **string** | Max borrowable amount | [optional] [default to undefined] - diff --git a/docs/MarginCurrencyPair.md b/docs/MarginCurrencyPair.md deleted file mode 100644 index 21c2f6b..0000000 --- a/docs/MarginCurrencyPair.md +++ /dev/null @@ -1,15 +0,0 @@ -# MarginCurrencyPair - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Currency pair | [optional] [default to undefined] -**base** | **string** | Base currency | [optional] [default to undefined] -**quote** | **string** | Quote currency | [optional] [default to undefined] -**leverage** | **number** | Leverage | [optional] [default to undefined] -**minBaseAmount** | **string** | Minimum base currency to loan, `null` means no limit | [optional] [default to undefined] -**minQuoteAmount** | **string** | Minimum quote currency to loan, `null` means no limit | [optional] [default to undefined] -**maxQuoteAmount** | **string** | Maximum borrowable amount for quote currency. Base currency limit is calculated by quote maximum and market price. `null` means no limit | [optional] [default to undefined] -**status** | **number** | Currency pair status - `0`: disabled - `1`: enabled | [optional] [default to undefined] - diff --git a/docs/MarginTiers.md b/docs/MarginTiers.md index 153ed53..25da5c0 100644 --- a/docs/MarginTiers.md +++ b/docs/MarginTiers.md @@ -7,6 +7,6 @@ Name | Type | Description | Notes **tier** | **string** | Tier | [optional] [default to undefined] **marginRate** | **string** | Discount | [optional] [default to undefined] **lowerLimit** | **string** | Lower limit | [optional] [default to undefined] -**upperLimit** | **string** | 上限, \"\"表示大于(最后一个档位) | [optional] [default to undefined] +**upperLimit** | **string** | Upper limit, \"\" indicates greater than (the last tier) | [optional] [default to undefined] **leverage** | **string** | Position leverage | [optional] [default to undefined] diff --git a/docs/MockFuturesOrder.md b/docs/MockFuturesOrder.md index 4fba293..31299be 100644 --- a/docs/MockFuturesOrder.md +++ b/docs/MockFuturesOrder.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**contract** | **string** | 合约名,目前仅支持BTC、ETH的USDT永续合约 | [default to undefined] -**size** | **string** | 合约张数,为初始挂单数量,不参与实际结算 | [default to undefined] -**left** | **string** | 未成交张数,参与实际计算 | [default to undefined] +**contract** | **string** | Futures name, currently only supports perpetual futures for BTC and ETH with USDT. | [default to undefined] +**size** | **string** | Futures quantity, representing the initial order quantity, not involved in actual settlement. | [default to undefined] +**left** | **string** | Unfilled contract quantity, involved in actual calculation | [default to undefined] diff --git a/docs/MockFuturesPosition.md b/docs/MockFuturesPosition.md index e7884c9..a6d0f36 100644 --- a/docs/MockFuturesPosition.md +++ b/docs/MockFuturesPosition.md @@ -4,6 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**contract** | **string** | 合约名,目前仅支持BTC、ETH的USDT永续合约 | [default to undefined] -**size** | **string** | 仓位大小,单位是张数 | [default to undefined] +**contract** | **string** | Futures name, currently only supports perpetual futures for BTC and ETH with USDT. | [default to undefined] +**size** | **string** | Position size, measured in contract units. | [default to undefined] diff --git a/docs/MockMarginResult.md b/docs/MockMarginResult.md index 328fbff..271e315 100644 --- a/docs/MockMarginResult.md +++ b/docs/MockMarginResult.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | 仓位组合类型 `original_position` - 原始仓位 `long_delta_original_position` - 正向delta+原始仓位 `short_delta_original_position` - 负向delta+原始仓位 | [optional] [default to undefined] -**profitLossRanges** | [**Array<ProfitLossRange>**](ProfitLossRange.md) | mr1的33个压力场景测试结果 | [optional] [default to undefined] +**type** | **string** | Position combination type `original_position` - Original position `long_delta_original_position` - Positive delta + Original position `short_delta_original_position` - Negative delta + Original position | [optional] [default to undefined] +**profitLossRanges** | [**Array<ProfitLossRange>**](ProfitLossRange.md) | The results of 33 pressure scenarios for MR1 | [optional] [default to undefined] **maxLoss** | [**ProfitLossRange**](.md) | 最大损失 | [optional] [default to undefined] -**mr1** | **string** | 压力测试 | [optional] [default to undefined] -**mr2** | **string** | 基差跨期风险 | [optional] [default to undefined] -**mr3** | **string** | 波动率跨期风险 | [optional] [default to undefined] -**mr4** | **string** | 期权空头风险 | [optional] [default to undefined] +**mr1** | **string** | Stress testing | [optional] [default to undefined] +**mr2** | **string** | Basis spread risk | [optional] [default to undefined] +**mr3** | **string** | Volatility spread risk | [optional] [default to undefined] +**mr4** | **string** | Option short risk | [optional] [default to undefined] diff --git a/docs/MockOptionsOrder.md b/docs/MockOptionsOrder.md index e29d14c..a0a8f67 100644 --- a/docs/MockOptionsOrder.md +++ b/docs/MockOptionsOrder.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**optionsName** | **string** | 期权名称,目前只支持BTC、ETH的USDT期权 | [default to undefined] -**size** | **string** | 初始挂单张数,不参与实际计算 | [default to undefined] -**left** | **string** | 未成交张数,参与实际计算 | [default to undefined] +**optionsName** | **string** | Option name, currently only supports options for BTC and ETH with USDT. | [default to undefined] +**size** | **string** | Initial order quantity, not involved in actual calculation | [default to undefined] +**left** | **string** | Unfilled contract quantity, involved in actual calculation | [default to undefined] diff --git a/docs/MockOptionsPosition.md b/docs/MockOptionsPosition.md index e66b43b..79fb38a 100644 --- a/docs/MockOptionsPosition.md +++ b/docs/MockOptionsPosition.md @@ -4,6 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**optionsName** | **string** | 期权名称,目前只支持BTC、ETH的USDT期权 | [default to undefined] -**size** | **string** | 仓位大小,单位是张数 | [default to undefined] +**optionsName** | **string** | Option name, currently only supports options for BTC and ETH with USDT. | [default to undefined] +**size** | **string** | Position size, measured in contract units. | [default to undefined] diff --git a/docs/MockRiskUnit.md b/docs/MockRiskUnit.md index 13553cb..2f1863c 100644 --- a/docs/MockRiskUnit.md +++ b/docs/MockRiskUnit.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**symbol** | **string** | 风险单元名称 | [optional] [default to undefined] -**spotInUse** | **string** | 现货对冲使用量 | [optional] [default to undefined] -**maintainMargin** | **string** | 维持保证金 | [optional] [default to undefined] -**initialMargin** | **string** | 起始保证金 | [optional] [default to undefined] -**marginResult** | [**Array<MockMarginResult>**](MockMarginResult.md) | 保证金结果 | [optional] [default to undefined] -**delta** | **string** | 风险单元的 总 delta | [optional] [default to undefined] -**gamma** | **string** | 风险单元的 总 gamma | [optional] [default to undefined] -**theta** | **string** | 风险单元的 总 theta | [optional] [default to undefined] -**vega** | **string** | 风险单元的 总 vega | [optional] [default to undefined] +**symbol** | **string** | Risk unit name | [optional] [default to undefined] +**spotInUse** | **string** | Spot usage | [optional] [default to undefined] +**maintainMargin** | **string** | Maintenance margin | [optional] [default to undefined] +**initialMargin** | **string** | Initial margin | [optional] [default to undefined] +**marginResult** | [**Array<MockMarginResult>**](MockMarginResult.md) | Margin result | [optional] [default to undefined] +**delta** | **string** | Total Delta of risk unit | [optional] [default to undefined] +**gamma** | **string** | Total Gamma of risk unit | [optional] [default to undefined] +**theta** | **string** | Total Theta of risk unit | [optional] [default to undefined] +**vega** | **string** | Total Vega of risk unit | [optional] [default to undefined] diff --git a/docs/MockSpotBalance.md b/docs/MockSpotBalance.md index 065566e..4cfc150 100644 --- a/docs/MockSpotBalance.md +++ b/docs/MockSpotBalance.md @@ -5,5 +5,5 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **currency** | **string** | Currency name | [default to undefined] -**equity** | **string** | 币种权益,权益 = 余额 - 已借,表示您在现货部位的净delta敞口,可以为负数。目前仅支持BTC、ETH三个币种 | [default to undefined] +**equity** | **string** | 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. | [default to undefined] diff --git a/docs/MockSpotOrder.md b/docs/MockSpotOrder.md index 3c3c85b..e68a703 100644 --- a/docs/MockSpotOrder.md +++ b/docs/MockSpotOrder.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **currencyPairs** | **string** | Currency pair | [default to undefined] **orderPrice** | **string** | Price | [default to undefined] -**count** | **string** | 现货交易对初始挂单数量,不参与实际计算。目前仅支持BTC、ETH三个币种 | [optional] [default to undefined] -**left** | **string** | 未成交数量,参与实际计算 | [default to undefined] -**type** | **string** | 订单类型,sell - 卖出单,buy - 买入单 | [default to undefined] +**count** | **string** | Initial order quantity for spot trading pairs, not involved in actual calculation. Currently only supports three currencies: BTC, ETH. | [optional] [default to undefined] +**left** | **string** | Unfilled quantity, involved in actual calculation. | [default to undefined] +**type** | **string** | Order type, sell - sell order, buy - buy order. | [default to undefined] diff --git a/docs/MultiCollateralLoanApi.md b/docs/MultiCollateralLoanApi.md index 10d1d82..73f57ac 100644 --- a/docs/MultiCollateralLoanApi.md +++ b/docs/MultiCollateralLoanApi.md @@ -15,7 +15,7 @@ Method | HTTP request | Description [**listMultiCollateralCurrencies**](MultiCollateralLoanApi.md#listMultiCollateralCurrencies) | **GET** /loan/multi_collateral/currencies | Query supported borrowing and collateral currencies in Multi-Collateral [**getMultiCollateralLtv**](MultiCollateralLoanApi.md#getMultiCollateralLtv) | **GET** /loan/multi_collateral/ltv | Get Multi-Collateral ratio [**getMultiCollateralFixRate**](MultiCollateralLoanApi.md#getMultiCollateralFixRate) | **GET** /loan/multi_collateral/fixed_rate | Query fixed interest rates for the currency for 7 days and 30 days -[**getMultiCollateralCurrentRate**](MultiCollateralLoanApi.md#getMultiCollateralCurrentRate) | **GET** /loan/multi_collateral/current_rate | 查询币种活期利率 +[**getMultiCollateralCurrentRate**](MultiCollateralLoanApi.md#getMultiCollateralCurrentRate) | **GET** /loan/multi_collateral/current_rate | Query the current interest rate of the currency ## listMultiCollateralOrders @@ -511,9 +511,9 @@ No authorization required > Promise<{ response: http.IncomingMessage; body: Array; }> getMultiCollateralCurrentRate(currencies, opts) -查询币种活期利率 +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 @@ -524,9 +524,9 @@ const client = new GateApi.ApiClient(); // client.basePath = "https://some-other-host" const api = new GateApi.MultiCollateralLoanApi(client); -const currencies = [["BTC","GT"]]; // Array | 指定币种名称查询数组,数组用逗号分割,最大100个 +const currencies = [["BTC","GT"]]; // Array | Specify the currency name to query the array. The array is separated by commas and has a maximum of 100 items. const opts = { - 'vipLevel': '0' // string | vip等级,不传默认为0 + 'vipLevel': '0' // string | VIP level, defaults to 0 if not transferred }; api.getMultiCollateralCurrentRate(currencies, opts) .then(value => console.log('API called successfully. Returned data: ', value.body), @@ -538,8 +538,8 @@ api.getMultiCollateralCurrentRate(currencies, opts) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currencies** | [**Array<string>**](string.md)| 指定币种名称查询数组,数组用逗号分割,最大100个 | [default to undefined] - **vipLevel** | **string**| vip等级,不传默认为0 | [optional] [default to '0'] + **currencies** | [**Array<string>**](string.md)| Specify the currency name to query the array. The array is separated by commas and has a maximum of 100 items. | [default to undefined] + **vipLevel** | **string**| VIP level, defaults to 0 if not transferred | [optional] [default to '0'] ### Return type diff --git a/docs/MyFuturesTrade.md b/docs/MyFuturesTrade.md index 6b3c3cb..6eb6bd2 100644 --- a/docs/MyFuturesTrade.md +++ b/docs/MyFuturesTrade.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **contract** | **string** | Futures contract | [optional] [default to undefined] **orderId** | **string** | Order ID related | [optional] [default to undefined] **size** | **number** | Trading size | [optional] [default to undefined] -**closeSize** | **number** | 平仓数量: close_size=0 && size>0 开多 close_size=0 && size<0 开空 close_size>0 && size>0 && size <= close_size 平空 close_size>0 && size>0 && size > close_size 平空且开多 close_size<0 && size<0 && size >= close_size 平多 close_size<0 && size<0 && size < close_size 平多且开空 | [optional] [default to undefined] +**closeSize** | **number** | 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] [default to undefined] **price** | **string** | Trading price | [optional] [default to undefined] **role** | **string** | Trade role. Available values are `taker` and `maker` | [optional] [default to undefined] **text** | **string** | User defined information | [optional] [default to undefined] diff --git a/docs/MyFuturesTradeTimeRange.md b/docs/MyFuturesTradeTimeRange.md index ae79495..d93ed18 100644 --- a/docs/MyFuturesTradeTimeRange.md +++ b/docs/MyFuturesTradeTimeRange.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **contract** | **string** | Futures contract | [optional] [default to undefined] **orderId** | **string** | Order ID related | [optional] [default to undefined] **size** | **number** | Trading size | [optional] [default to undefined] -**closeSize** | **number** | 平仓数量: close_size=0 && size>0 开多 close_size=0 && size<0 开空 close_size>0 && size>0 && size <= close_size 平空 close_size>0 && size>0 && size > close_size 平空且开多 close_size<0 && size<0 && size >= close_size 平多 close_size<0 && size<0 && size < close_size 平多且开空 | [optional] [default to undefined] +**closeSize** | **number** | 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] [default to undefined] **price** | **string** | Trading price | [optional] [default to undefined] **role** | **string** | Trade role. Available values are `taker` and `maker` | [optional] [default to undefined] **text** | **string** | User defined information | [optional] [default to undefined] diff --git a/docs/OptionsAccount.md b/docs/OptionsAccount.md index f13b944..9a063b4 100644 --- a/docs/OptionsAccount.md +++ b/docs/OptionsAccount.md @@ -5,24 +5,24 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **user** | **number** | User ID | [optional] [default to undefined] -**total** | **string** | 账户余额 | [optional] [default to undefined] -**positionValue** | **string** | 仓位价值,做多仓位价值为正,做空仓位价值为负 | [optional] [default to undefined] -**equity** | **string** | 账户权益,账户余额与仓位价值的和 | [optional] [default to undefined] +**total** | **string** | Account balance | [optional] [default to undefined] +**positionValue** | **string** | Position value, long position value is positive, short position value is negative | [optional] [default to undefined] +**equity** | **string** | Account equity, the sum of account balance and position value | [optional] [default to undefined] **shortEnabled** | **boolean** | If the account is allowed to short | [optional] [default to undefined] -**mmpEnabled** | **boolean** | 是否启用MMP | [optional] [default to undefined] -**liqTriggered** | **boolean** | 是否触发仓位强平 | [optional] [default to undefined] +**mmpEnabled** | **boolean** | Whether to enable MMP | [optional] [default to undefined] +**liqTriggered** | **boolean** | Whether to trigger position liquidation | [optional] [default to undefined] **marginMode** | **number** | | 保证金模式: - 0:经典现货保证金模式 - 1:跨币种保证金模式 - 2:组合保证金模式 | [optional] [default to undefined] **unrealisedPnl** | **string** | Unrealized PNL | [optional] [default to undefined] **initMargin** | **string** | Initial position margin | [optional] [default to undefined] **maintMargin** | **string** | Position maintenance margin | [optional] [default to undefined] **orderMargin** | **string** | Order margin of unfinished orders | [optional] [default to undefined] -**askOrderMargin** | **string** | 未完成卖单的保证金 | [optional] [default to undefined] -**bidOrderMargin** | **string** | 未完成买单的保证金 | [optional] [default to undefined] +**askOrderMargin** | **string** | Margin for outstanding sell orders | [optional] [default to undefined] +**bidOrderMargin** | **string** | Margin for outstanding buy orders | [optional] [default to undefined] **available** | **string** | Available balance to transfer out or trade | [optional] [default to undefined] **point** | **string** | POINT amount | [optional] [default to undefined] **currency** | **string** | Settle currency | [optional] [default to undefined] -**ordersLimit** | **number** | 未完成订单数量上限 | [optional] [default to undefined] -**positionNotionalLimit** | **number** | 名义价值上限,包含仓位以及未完成订单的名义价值 | [optional] [default to undefined] +**ordersLimit** | **number** | Maximum number of outstanding orders | [optional] [default to undefined] +**positionNotionalLimit** | **number** | Notional value upper limit, including the nominal value of positions and outstanding orders | [optional] [default to undefined] ## Enum: OptionsAccount.MarginMode diff --git a/docs/OptionsApi.md b/docs/OptionsApi.md index 0e9ffba..460612f 100644 --- a/docs/OptionsApi.md +++ b/docs/OptionsApi.md @@ -29,9 +29,9 @@ Method | HTTP request | Description [**cancelOptionsOrder**](OptionsApi.md#cancelOptionsOrder) | **DELETE** /options/orders/{order_id} | Cancel a single order [**countdownCancelAllOptions**](OptionsApi.md#countdownCancelAllOptions) | **POST** /options/countdown_cancel_all | Countdown cancel orders [**listMyOptionsTrades**](OptionsApi.md#listMyOptionsTrades) | **GET** /options/my_trades | List personal trading history -[**getOptionsMMP**](OptionsApi.md#getOptionsMMP) | **GET** /options/mmp | MMP查询 -[**setOptionsMMP**](OptionsApi.md#setOptionsMMP) | **POST** /options/mmp | MMP设置 -[**resetOptionsMMP**](OptionsApi.md#resetOptionsMMP) | **POST** /options/mmp/reset | MMP重置 +[**getOptionsMMP**](OptionsApi.md#getOptionsMMP) | **GET** /options/mmp | MMP Query +[**setOptionsMMP**](OptionsApi.md#setOptionsMMP) | **POST** /options/mmp | MMP Settings +[**resetOptionsMMP**](OptionsApi.md#resetOptionsMMP) | **POST** /options/mmp/reset | MMP Reset ## listOptionsUnderlyings @@ -1105,7 +1105,7 @@ Promise<{ response: AxiosResponse; body: OptionsOrder; }> [OptionsOrder](Options Countdown cancel orders -期权订单心跳检测,在到达用户设置的`timeout`时间时如果没有取消既有倒计时或设置新的倒计时将会自动取消相关的`期权挂单`。 该接口可重复调用,以便设置新的倒计时或取消倒计时。 用法示例: 以30s的间隔重复此接口,每次倒计时`timeout`设置为30(秒)。 如果在30秒内未再次调用此接口,则您指定的`underlying` `contract`上的所有挂单都会被自动撤销,若未指定`underlying` `contract`则会自动撤销用户的全部挂单 如果在30秒内以将`timeout`设置为0,则倒数计时器将终止,自动撤单功能取消。 +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 @@ -1203,7 +1203,7 @@ Promise<{ response: AxiosResponse; body: Array; }> [OptionsMyTra > Promise<{ response: http.IncomingMessage; body: Array; }> getOptionsMMP(opts) -MMP查询 +MMP Query ### Example @@ -1248,7 +1248,7 @@ Promise<{ response: AxiosResponse; body: Array; }> [OptionsMMP](Opti > Promise<{ response: http.IncomingMessage; body: OptionsMMP; }> setOptionsMMP(optionsMMP) -MMP设置 +MMP Settings ### Example @@ -1291,7 +1291,7 @@ Promise<{ response: AxiosResponse; body: OptionsMMP; }> [OptionsMMP](OptionsMMP. > Promise<{ response: http.IncomingMessage; body: OptionsMMP; }> resetOptionsMMP(optionsMMPReset) -MMP重置 +MMP Reset ### Example diff --git a/docs/OptionsContract.md b/docs/OptionsContract.md index 74edc86..13b7c25 100644 --- a/docs/OptionsContract.md +++ b/docs/OptionsContract.md @@ -21,7 +21,7 @@ Name | Type | Description | Notes **markPriceRound** | **string** | Minimum mark price increment | [optional] [default to undefined] **orderSizeMin** | **number** | Minimum order size the contract allowed | [optional] [default to undefined] **orderSizeMax** | **number** | Maximum order size the contract allowed | [optional] [default to undefined] -**orderPriceDeviate** | **string** | 下单价与当前标记价格允许的正负偏移量, 即下单价 `order_price` 需满足如下条件: order_price 在mark_price +/- order_price_deviate * underlying_price 范围内,不区分买单卖单 | [optional] [default to undefined] +**orderPriceDeviate** | **string** | 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] [default to undefined] **refDiscountRate** | **string** | Referral fee rate discount | [optional] [default to undefined] **refRebateRate** | **string** | Referrer commission rate | [optional] [default to undefined] **orderbookId** | **number** | Current orderbook ID | [optional] [default to undefined] diff --git a/docs/OptionsMMP.md b/docs/OptionsMMP.md index 8106c02..f4dedb9 100644 --- a/docs/OptionsMMP.md +++ b/docs/OptionsMMP.md @@ -5,10 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **underlying** | **string** | Underlying | [default to undefined] -**window** | **number** | 时间窗口(毫秒),1-5000之间,0表示停用MMP | [default to undefined] -**frozenPeriod** | **number** | 冻结时长(毫秒),0表示一直冻结,需要调用重置API解冻 | [default to undefined] -**qtyLimit** | **string** | 成交量上限(正数,至多2位小数) | [default to undefined] -**deltaLimit** | **string** | 净delta值上限(正数,至多2位小数) | [default to undefined] -**triggerTimeMs** | **number** | 触发冻结时间(毫秒),0表示没有触发冻结 | [optional] [readonly] [default to undefined] -**frozenUntilMs** | **number** | 解冻时间(毫秒),如果未配置冻结时长,触发冻结后无解冻时间 | [optional] [readonly] [default to undefined] +**window** | **number** | Time window (milliseconds), between 1-5000, 0 means disabling MMP | [default to undefined] +**frozenPeriod** | **number** | Freeze duration (milliseconds), 0 means always frozen, need to call reset API to unfreeze | [default to undefined] +**qtyLimit** | **string** | Trading volume upper limit (positive number, up to 2 decimal places) | [default to undefined] +**deltaLimit** | **string** | Upper limit of net delta value (positive number, up to 2 decimal places) | [default to undefined] +**triggerTimeMs** | **number** | Trigger freeze time (milliseconds), 0 means no freeze is triggered | [optional] [readonly] [default to undefined] +**frozenUntilMs** | **number** | Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered. | [optional] [readonly] [default to undefined] diff --git a/docs/OptionsMMPReset.md b/docs/OptionsMMPReset.md index 3c4a2c4..dc37cca 100644 --- a/docs/OptionsMMPReset.md +++ b/docs/OptionsMMPReset.md @@ -5,10 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **underlying** | **string** | Underlying | [default to undefined] -**window** | **number** | 时间窗口(毫秒),1-5000之间,0表示停用MMP | [optional] [readonly] [default to undefined] -**frozenPeriod** | **number** | 冻结时长(毫秒),0表示一直冻结,需要调用重置API解冻 | [optional] [readonly] [default to undefined] -**qtyLimit** | **string** | 成交量上限(正数,至多2位小数) | [optional] [readonly] [default to undefined] -**deltaLimit** | **string** | 净delta值上限(正数,至多2位小数) | [optional] [readonly] [default to undefined] -**triggerTimeMs** | **number** | 触发冻结时间(毫秒),0表示没有触发冻结 | [optional] [readonly] [default to undefined] -**frozenUntilMs** | **number** | 解冻时间(毫秒),如果未配置冻结时长,触发冻结后无解冻时间 | [optional] [readonly] [default to undefined] +**window** | **number** | Time window (milliseconds), between 1-5000, 0 means disabling MMP | [optional] [readonly] [default to undefined] +**frozenPeriod** | **number** | Freeze duration (milliseconds), 0 means always frozen, need to call reset API to unfreeze | [optional] [readonly] [default to undefined] +**qtyLimit** | **string** | Trading volume upper limit (positive number, up to 2 decimal places) | [optional] [readonly] [default to undefined] +**deltaLimit** | **string** | Upper limit of net delta value (positive number, up to 2 decimal places) | [optional] [readonly] [default to undefined] +**triggerTimeMs** | **number** | Trigger freeze time (milliseconds), 0 means no freeze is triggered | [optional] [readonly] [default to undefined] +**frozenUntilMs** | **number** | Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered. | [optional] [readonly] [default to undefined] diff --git a/docs/OptionsOrder.md b/docs/OptionsOrder.md index 47e781f..75d0208 100644 --- a/docs/OptionsOrder.md +++ b/docs/OptionsOrder.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **user** | **number** | User ID | [optional] [readonly] [default to undefined] **createTime** | **number** | Creation time of order | [optional] [readonly] [default to undefined] **finishTime** | **number** | Order finished time. Not returned if order is open | [optional] [readonly] [default to undefined] -**finishAs** | **string** | 结束方式,包括: - filled: 完全成交 - cancelled: 用户撤销 - liquidated: 强制平仓撤销 - ioc: 未立即完全成交,因为tif设置为ioc - auto_deleveraged: 自动减仓撤销 - reduce_only: 增持仓位撤销,因为设置reduce_only或平仓 - position_closed: 因为仓位平掉了,所以挂单被撤掉 - reduce_out: 只减仓被排除的不容易成交的挂单 - mmp_cancelled: MMP撤销 | [optional] [readonly] [default to undefined] +**finishAs** | **string** | 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] [default to undefined] **status** | **string** | Order status - `open`: waiting to be traded - `finished`: finished | [optional] [readonly] [default to undefined] **contract** | **string** | Contract name | [default to undefined] **size** | **number** | Order size. Specify positive number to make a bid, and negative number to ask | [default to undefined] @@ -19,8 +19,8 @@ Name | Type | Description | Notes **reduceOnly** | **boolean** | Set as `true` to be reduce-only order | [optional] [default to undefined] **isReduceOnly** | **boolean** | Is the order reduce-only | [optional] [readonly] [default to undefined] **isLiq** | **boolean** | Is the order for liquidation | [optional] [readonly] [default to undefined] -**mmp** | **boolean** | 设置为 true 的时候,为MMP委托 | [optional] [default to undefined] -**isMmp** | **boolean** | 是否为MMP委托。对应请求中的`mmp`。 | [optional] [readonly] [default to undefined] +**mmp** | **boolean** | When set to true, delegate to MMP | [optional] [default to undefined] +**isMmp** | **boolean** | Whether it is MMP delegation. Corresponds to `mmp` in the request. | [optional] [readonly] [default to undefined] **tif** | **string** | 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** | **number** | Size left to be traded | [optional] [readonly] [default to undefined] **fillPrice** | **string** | Fill price of the order | [optional] [readonly] [default to undefined] diff --git a/docs/Order.md b/docs/Order.md index 1f1b201..60b469c 100644 --- a/docs/Order.md +++ b/docs/Order.md @@ -38,7 +38,7 @@ Name | Type | Description | Notes **rebatedFeeCurrency** | **string** | Rebated fee currency unit | [optional] [readonly] [default to undefined] **stpId** | **number** | 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] [default to undefined] **stpAct** | **string** | 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] [default to undefined] -**finishAs** | **string** | 订单结束方式,包括: - open: 等待处理 - filled: 完全成交 - cancelled: 用户撤销 - liquidate_cancelled: 爆仓撤销 - small: 订单数量太小 - depth_not_enough: 深度不足导致撤单 - trader_not_enough: 对手方不足导致撤单 - ioc: 未立即成交,因为 tif 设置为 ioc - poc: 未满足挂单策略,因为 tif 设置为 poc - fok: 未立即完全成交,因为 tif 设置为 fok - stp: 订单发生自成交限制而被撤销 - unknown: 未知 | [optional] [readonly] [default to undefined] +**finishAs** | **string** | 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] [default to undefined] **actionMode** | **string** | 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] [default to undefined] ## Enum: Order.Status diff --git a/docs/OrderPatch.md b/docs/OrderPatch.md index b9ec89a..4ac1b63 100644 --- a/docs/OrderPatch.md +++ b/docs/OrderPatch.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **currencyPair** | **string** | Currency pair | [optional] [default to undefined] -**account** | **string** | 指定查询账户。 | [optional] [default to undefined] +**account** | **string** | Specify query account. | [optional] [default to undefined] **amount** | **string** | New order amount. `amount` and `price` must specify one of them | [optional] [default to undefined] **price** | **string** | New order price. `amount` and `Price` must specify one of them\" | [optional] [default to undefined] **amendText** | **string** | Custom info during amending order | [optional] [default to undefined] diff --git a/docs/PartnerSub.md b/docs/PartnerSub.md index 8aabcb3..f90702c 100644 --- a/docs/PartnerSub.md +++ b/docs/PartnerSub.md @@ -5,6 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **userId** | **number** | User ID | [optional] [default to undefined] -**userJoinTime** | **number** | 用户加入体系的时间,秒级 Unix 时间戳 | [optional] [default to undefined] -**type** | **number** | 类型(1-子代理 2-间接直客 3-直接直客) | [optional] [default to undefined] +**userJoinTime** | **number** | The time when the user joined the system, in seconds Unix timestamp | [optional] [default to undefined] +**type** | **number** | Type (1-Sub-agent 2-Indirect Customer 3-Direct Customer) | [optional] [default to undefined] diff --git a/docs/PartnerSubList.md b/docs/PartnerSubList.md index 12ca138..724b6a5 100644 --- a/docs/PartnerSubList.md +++ b/docs/PartnerSubList.md @@ -5,5 +5,5 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **total** | **number** | Total | [optional] [default to undefined] -**list** | [**Array<PartnerSub>**](PartnerSub.md) | 下级列表 | [optional] [default to undefined] +**list** | [**Array<PartnerSub>**](PartnerSub.md) | Subordinate list | [optional] [default to undefined] diff --git a/docs/PlaceDualInvestmentOrder.md b/docs/PlaceDualInvestmentOrder.md index 9c7b95b..b6f4a1e 100644 --- a/docs/PlaceDualInvestmentOrder.md +++ b/docs/PlaceDualInvestmentOrder.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **planId** | **string** | Plan ID | [default to undefined] -**copies** | **string** | 份数,与amount 字段互斥,即将废弃.即将废弃,建议使用amount传参 | [optional] [default to undefined] -**isMax** | **number** | 是否最大申购,与amount字段互斥.即将废弃,建议使用amount传参 | [optional] [default to undefined] -**amount** | **string** | 申购金额,与copies字段互斥 | [default to undefined] +**copies** | **string** | 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] [default to undefined] +**isMax** | **number** | 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] [default to undefined] +**amount** | **string** | Subscription amount, mutually exclusive with the copies field | [default to undefined] diff --git a/docs/PortfolioAccount.md b/docs/PortfolioAccount.md deleted file mode 100644 index 3411668..0000000 --- a/docs/PortfolioAccount.md +++ /dev/null @@ -1,23 +0,0 @@ -# PortfolioAccount - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**userId** | **number** | User ID | [optional] [default to undefined] -**refreshTime** | **number** | Time of the most recent refresh | [optional] [default to undefined] -**locked** | **boolean** | Whether account is locked | [optional] [default to undefined] -**balances** | [**{ [key: string]: PortfolioMarginBalance; }**](PortfolioMarginBalance.md) | | [optional] [default to undefined] -**total** | **string** | Total account value in USDT, i.e., the sum of all currencies\' | [optional] [default to undefined] -**borrowed** | **string** | Total borrowed value in USDT, i.e., the sum of all currencies | [optional] [default to undefined] -**interest** | **string** | Total unpaid interests in USDT, i.e., the sum of all currencies | [optional] [default to undefined] -**totalInitialMargin** | **string** | Total initial margin | [optional] [default to undefined] -**totalMarginBalance** | **string** | Total margin balance | [optional] [default to undefined] -**totalMaintenanceMargin** | **string** | Total maintenance margin | [optional] [default to undefined] -**totalInitialMarginRate** | **string** | Total initial margin rate | [optional] [default to undefined] -**totalMaintenanceMarginRate** | **string** | Total maintenance margin rate | [optional] [default to undefined] -**totalAvailableMargin** | **string** | Total available margin | [optional] [default to undefined] -**portfolioMarginTotal** | **string** | Total margin balance of the account | [optional] [default to undefined] -**portfolioMarginTotalLiab** | **string** | Total liabilities of the account | [optional] [default to undefined] -**portfolioMarginTotalEquity** | **string** | Total equity of the account | [optional] [default to undefined] - diff --git a/docs/PortfolioApi.md b/docs/PortfolioApi.md deleted file mode 100644 index dcf1aef..0000000 --- a/docs/PortfolioApi.md +++ /dev/null @@ -1,427 +0,0 @@ -# PortfolioApi - -All URIs are relative to *https://api.gateio.ws/api/v4* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**listPortfolioAccounts**](PortfolioApi.md#listPortfolioAccounts) | **GET** /portfolio/accounts | Get portfolio account information -[**listAccountPortfolioMode**](PortfolioApi.md#listAccountPortfolioMode) | **GET** /portfolio/account_mode | Retrieve the account\'s portfolio mode -[**setAccountPortfolioMode**](PortfolioApi.md#setAccountPortfolioMode) | **POST** /portfolio/account_mode | Configure the account\'s portfolio mode. -[**getPortfolioBorrowable**](PortfolioApi.md#getPortfolioBorrowable) | **GET** /portfolio/borrowable | Retrieve the maximum borrowable amount for the account. -[**getPortfolioTransferable**](PortfolioApi.md#getPortfolioTransferable) | **GET** /portfolio/transferable | Retrieve the maximum amount that can be transferred out from the account -[**listPortfolioUniLoanInterestRecords**](PortfolioApi.md#listPortfolioUniLoanInterestRecords) | **GET** /portfolio/loans | List loans -[**createPortfolioLoan**](PortfolioApi.md#createPortfolioLoan) | **POST** /portfolio/loans | Borrow or repay -[**listPortfolioLoanRecords**](PortfolioApi.md#listPortfolioLoanRecords) | **GET** /portfolio/loan_records | Get load records -[**listPortfolioLoanInterestRecords**](PortfolioApi.md#listPortfolioLoanInterestRecords) | **GET** /portfolio/interest_records | List interest records - - -## listPortfolioAccounts - -> Promise<{ response: http.IncomingMessage; body: PortfolioAccount; }> listPortfolioAccounts(opts) - -Get portfolio account information - -The assets of each currency in the account will be adjusted according to their liquidity, defined by corresponding adjustment coefficients, and then uniformly converted to USD to calculate the total asset value and position value of the account. You can refer to the [Formula](#portfolio-account) in the documentation - -### Example - -```typescript -const GateApi = require('gate-api'); -const client = new GateApi.ApiClient(); -// uncomment the next line to change base path -// client.basePath = "https://some-other-host" -// Configure Gate APIv4 key authentication: -client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); - -const api = new GateApi.PortfolioApi(client); -const opts = { - 'currency': "BTC" // string | Retrieve data of the specified currency -}; -api.listPortfolioAccounts(opts) - .then(value => console.log('API called successfully. Returned data: ', value.body), - error => console.error(error)); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **string**| Retrieve data of the specified currency | [optional] [default to undefined] - -### Return type - -Promise<{ response: AxiosResponse; body: PortfolioAccount; }> [PortfolioAccount](PortfolioAccount.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -## listAccountPortfolioMode - -> Promise<{ response: http.IncomingMessage; body: { [key: string]: boolean; }; }> listAccountPortfolioMode() - -Retrieve the account\'s portfolio mode - -cross_margin - cross margin - -### Example - -```typescript -const GateApi = require('gate-api'); -const client = new GateApi.ApiClient(); -// uncomment the next line to change base path -// client.basePath = "https://some-other-host" -// Configure Gate APIv4 key authentication: -client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); - -const api = new GateApi.PortfolioApi(client); -api.listAccountPortfolioMode() - .then(value => console.log('API called successfully. Returned data: ', value.body), - error => console.error(error)); -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -Promise<{ response: AxiosResponse; body: { [key: string]: boolean; }; }> [boolean](boolean.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -## setAccountPortfolioMode - -> Promise<{ response: http.IncomingMessage; body: { [key: string]: boolean; }; }> setAccountPortfolioMode(portfolioMode) - -Configure the account\'s portfolio mode. - -### Example - -```typescript -const GateApi = require('gate-api'); -const client = new GateApi.ApiClient(); -// uncomment the next line to change base path -// client.basePath = "https://some-other-host" -// Configure Gate APIv4 key authentication: -client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); - -const api = new GateApi.PortfolioApi(client); -const portfolioMode = new PortfolioMode(); // PortfolioMode | -api.setAccountPortfolioMode(portfolioMode) - .then(value => console.log('API called successfully. Returned data: ', value.body), - error => console.error(error)); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **portfolioMode** | [**PortfolioMode**](PortfolioMode.md)| | - -### Return type - -Promise<{ response: AxiosResponse; body: { [key: string]: boolean; }; }> [boolean](boolean.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -## getPortfolioBorrowable - -> Promise<{ response: http.IncomingMessage; body: PortfolioBorrowable; }> getPortfolioBorrowable(currency) - -Retrieve the maximum borrowable amount for the account. - -### Example - -```typescript -const GateApi = require('gate-api'); -const client = new GateApi.ApiClient(); -// uncomment the next line to change base path -// client.basePath = "https://some-other-host" -// Configure Gate APIv4 key authentication: -client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); - -const api = new GateApi.PortfolioApi(client); -const currency = "BTC"; // string | Retrieve data of the specified currency -api.getPortfolioBorrowable(currency) - .then(value => console.log('API called successfully. Returned data: ', value.body), - error => console.error(error)); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **string**| Retrieve data of the specified currency | [default to undefined] - -### Return type - -Promise<{ response: AxiosResponse; body: PortfolioBorrowable; }> [PortfolioBorrowable](PortfolioBorrowable.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -## getPortfolioTransferable - -> Promise<{ response: http.IncomingMessage; body: PortfolioTransferable; }> getPortfolioTransferable(currency) - -Retrieve the maximum amount that can be transferred out from the account - -### Example - -```typescript -const GateApi = require('gate-api'); -const client = new GateApi.ApiClient(); -// uncomment the next line to change base path -// client.basePath = "https://some-other-host" -// Configure Gate APIv4 key authentication: -client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); - -const api = new GateApi.PortfolioApi(client); -const currency = "BTC"; // string | Retrieve data of the specified currency -api.getPortfolioTransferable(currency) - .then(value => console.log('API called successfully. Returned data: ', value.body), - error => console.error(error)); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **string**| Retrieve data of the specified currency | [default to undefined] - -### Return type - -Promise<{ response: AxiosResponse; body: PortfolioTransferable; }> [PortfolioTransferable](PortfolioTransferable.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -## listPortfolioUniLoanInterestRecords - -> Promise<{ response: http.IncomingMessage; body: Array; }> listPortfolioUniLoanInterestRecords(opts) - -List loans - -### Example - -```typescript -const GateApi = require('gate-api'); -const client = new GateApi.ApiClient(); -// uncomment the next line to change base path -// client.basePath = "https://some-other-host" -// Configure Gate APIv4 key authentication: -client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); - -const api = new GateApi.PortfolioApi(client); -const opts = { - 'currency': "BTC", // string | Retrieve data of the specified currency - 'page': 1, // number | Page number - 'limit': 100 // number | Maximum response items. Default: 100, minimum: 1, Maximum: 100 -}; -api.listPortfolioUniLoanInterestRecords(opts) - .then(value => console.log('API called successfully. Returned data: ', value.body), - error => console.error(error)); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **string**| Retrieve data of the specified currency | [optional] [default to undefined] - **page** | **number**| Page number | [optional] [default to 1] - **limit** | **number**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] - -### Return type - -Promise<{ response: AxiosResponse; body: Array; }> [UniLoan](UniLoan.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -## createPortfolioLoan - -> Promise<{ response: http.IncomingMessage; body?: any; }> createPortfolioLoan(portfolioLoan) - -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 - -```typescript -const GateApi = require('gate-api'); -const client = new GateApi.ApiClient(); -// uncomment the next line to change base path -// client.basePath = "https://some-other-host" -// Configure Gate APIv4 key authentication: -client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); - -const api = new GateApi.PortfolioApi(client); -const portfolioLoan = new PortfolioLoan(); // PortfolioLoan | -api.createPortfolioLoan(portfolioLoan) - .then(value => console.log('API called successfully.'), - error => console.error(error)); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **portfolioLoan** | [**PortfolioLoan**](PortfolioLoan.md)| | - -### Return type - -Promise<{ response: AxiosResponse; body?: any; }> - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - -## listPortfolioLoanRecords - -> Promise<{ response: http.IncomingMessage; body: Array; }> listPortfolioLoanRecords(opts) - -Get load records - -### Example - -```typescript -const GateApi = require('gate-api'); -const client = new GateApi.ApiClient(); -// uncomment the next line to change base path -// client.basePath = "https://some-other-host" -// Configure Gate APIv4 key authentication: -client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); - -const api = new GateApi.PortfolioApi(client); -const opts = { - 'type': "type_example", // 'borrow' | 'repay' | The types of lending records, borrow - indicates the action of borrowing funds, repay - indicates the action of repaying the borrowed funds - 'currency': "BTC", // string | Retrieve data of the specified currency - 'page': 1, // number | Page number - 'limit': 100 // number | Maximum response items. Default: 100, minimum: 1, Maximum: 100 -}; -api.listPortfolioLoanRecords(opts) - .then(value => console.log('API called successfully. Returned data: ', value.body), - error => console.error(error)); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **type** | **Type**| The types of lending records, borrow - indicates the action of borrowing funds, repay - indicates the action of repaying the borrowed funds | [optional] [default to undefined] - **currency** | **string**| Retrieve data of the specified currency | [optional] [default to undefined] - **page** | **number**| Page number | [optional] [default to 1] - **limit** | **number**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] - -### Return type - -Promise<{ response: AxiosResponse; body: Array; }> [PortfolioLoanRecord](PortfolioLoanRecord.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -## listPortfolioLoanInterestRecords - -> Promise<{ response: http.IncomingMessage; body: Array; }> listPortfolioLoanInterestRecords(opts) - -List interest records - -### Example - -```typescript -const GateApi = require('gate-api'); -const client = new GateApi.ApiClient(); -// uncomment the next line to change base path -// client.basePath = "https://some-other-host" -// Configure Gate APIv4 key authentication: -client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); - -const api = new GateApi.PortfolioApi(client); -const opts = { - 'currency': "BTC", // string | Retrieve data of the specified currency - 'page': 1, // number | Page number - 'limit': 100 // number | Maximum response items. Default: 100, minimum: 1, Maximum: 100 -}; -api.listPortfolioLoanInterestRecords(opts) - .then(value => console.log('API called successfully. Returned data: ', value.body), - error => console.error(error)); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **string**| Retrieve data of the specified currency | [optional] [default to undefined] - **page** | **number**| Page number | [optional] [default to 1] - **limit** | **number**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] - -### Return type - -Promise<{ response: AxiosResponse; body: Array; }> [UniLoanInterestRecord](UniLoanInterestRecord.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json diff --git a/docs/PortfolioBorrowable.md b/docs/PortfolioBorrowable.md deleted file mode 100644 index 389d8de..0000000 --- a/docs/PortfolioBorrowable.md +++ /dev/null @@ -1,9 +0,0 @@ -# PortfolioBorrowable - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **string** | Currency detail | [optional] [default to undefined] -**amount** | **string** | Max borrowable amount | [optional] [default to undefined] - diff --git a/docs/PortfolioLoan.md b/docs/PortfolioLoan.md deleted file mode 100644 index 7f708ce..0000000 --- a/docs/PortfolioLoan.md +++ /dev/null @@ -1,19 +0,0 @@ -# PortfolioLoan - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **string** | Currency | [default to undefined] -**type** | **string** | type: borrow - borrow, repay - repay | [default to undefined] -**amount** | **string** | The amount of lending or repaying | [default to undefined] -**repaidAll** | **boolean** | Full repayment. Repay operation only. If the value is `true`, the amount will be ignored and the loan will be repaid in full. | [optional] [default to undefined] -**text** | **string** | User defined custom ID | [optional] [default to undefined] - -## Enum: PortfolioLoan.Type - -* `Borrow` (value: `'borrow'`) - -* `Repay` (value: `'repay'`) - - diff --git a/docs/PortfolioLoanRecord.md b/docs/PortfolioLoanRecord.md deleted file mode 100644 index 533e227..0000000 --- a/docs/PortfolioLoanRecord.md +++ /dev/null @@ -1,14 +0,0 @@ -# PortfolioLoanRecord - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **number** | id | [optional] [readonly] [default to undefined] -**type** | **string** | type: borrow - borrow, repay - repay | [optional] [readonly] [default to undefined] -**repaymentType** | **string** | Repayment type: none - no repayment type, manual_repay - manual repayment, auto_repay - automatic repayment, cancel_auto_repay - automatic repayment after cancellation | [optional] [readonly] [default to undefined] -**currencyPair** | **string** | Currency pair | [optional] [readonly] [default to undefined] -**currency** | **string** | Currency | [optional] [readonly] [default to undefined] -**amount** | **string** | The amount of lending or repaying | [optional] [readonly] [default to undefined] -**createTime** | **number** | Created time | [optional] [readonly] [default to undefined] - diff --git a/docs/PortfolioMarginBalance.md b/docs/PortfolioMarginBalance.md deleted file mode 100644 index 0fdcf3a..0000000 --- a/docs/PortfolioMarginBalance.md +++ /dev/null @@ -1,16 +0,0 @@ -# PortfolioMarginBalance - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**available** | **string** | Available amount | [optional] [default to undefined] -**freeze** | **string** | Locked amount | [optional] [default to undefined] -**borrowed** | **string** | Borrowed amount | [optional] [default to undefined] -**interest** | **string** | Unpaid interests | [optional] [default to undefined] -**negativeLiab** | **string** | Negative Liabilities | [optional] [default to undefined] -**futuresPosLiab** | **string** | Borrowing to Open Positions in Futures | [optional] [default to undefined] -**equity** | **string** | Equity | [optional] [default to undefined] -**totalFreeze** | **string** | Total freeze | [optional] [default to undefined] -**totalLiab** | **string** | Total liabilities | [optional] [default to undefined] - diff --git a/docs/PortfolioMode.md b/docs/PortfolioMode.md deleted file mode 100644 index cfbb144..0000000 --- a/docs/PortfolioMode.md +++ /dev/null @@ -1,9 +0,0 @@ -# PortfolioMode - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mode** | **string** | Portfolio mode - cross_margin : cross margin | [default to undefined] -**enabled** | **boolean** | Is it enabled? | [default to undefined] - diff --git a/docs/PortfolioTransferable.md b/docs/PortfolioTransferable.md deleted file mode 100644 index 39ffc22..0000000 --- a/docs/PortfolioTransferable.md +++ /dev/null @@ -1,9 +0,0 @@ -# PortfolioTransferable - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currency** | **string** | Currency detail | [optional] [default to undefined] -**amount** | **string** | The maximum amount that can be transferred out | [optional] [default to undefined] - diff --git a/docs/Position.md b/docs/Position.md index 5ca20bd..c46c478 100644 --- a/docs/Position.md +++ b/docs/Position.md @@ -33,7 +33,7 @@ Name | Type | Description | Notes **mode** | **string** | Position mode, including: - `single`: dual mode is not enabled- `dual_long`: long position in dual mode- `dual_short`: short position in dual mode | [optional] [default to undefined] **crossLeverageLimit** | **string** | Cross margin leverage(valid only when `leverage` is 0) | [optional] [default to undefined] **updateTime** | **number** | Last update time | [optional] [readonly] [default to undefined] -**updateId** | **number** | 更新id,仓位每更新一次,数值会+1 | [optional] [readonly] [default to undefined] +**updateId** | **number** | Update id. Each time the position is updated, the value will be +1. | [optional] [readonly] [default to undefined] **openTime** | **number** | First Open Time | [optional] [default to undefined] ## Enum: Position.Mode diff --git a/docs/PositionClose.md b/docs/PositionClose.md index f552833..b4a951d 100644 --- a/docs/PositionClose.md +++ b/docs/PositionClose.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **pnlFee** | **string** | PNL - Transaction Fees | [optional] [readonly] [default to undefined] **text** | **string** | Text of close order | [optional] [readonly] [default to undefined] **maxSize** | **string** | Max Trade Size | [optional] [readonly] [default to undefined] -**accumSize** | **string** | 累计平仓量 | [optional] [readonly] [default to undefined] +**accumSize** | **string** | Cumulative closed position volume | [optional] [readonly] [default to undefined] **firstOpenTime** | **number** | First Open Time | [optional] [readonly] [default to undefined] **longPrice** | **string** | When \'side\' is \'long,\' it indicates the opening average price; when \'side\' is \'short,\' it indicates the closing average price. | [optional] [readonly] [default to undefined] **shortPrice** | **string** | When \'side\' is \'long,\' it indicates the opening average price; when \'side\' is \'short,\' it indicates the closing average price | [optional] [readonly] [default to undefined] diff --git a/docs/ProfitLossRange.md b/docs/ProfitLossRange.md index bbe3afb..4484928 100644 --- a/docs/ProfitLossRange.md +++ b/docs/ProfitLossRange.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**pricePercentage** | **string** | 价格变动百分比 | [optional] [default to undefined] -**impliedVolatilityPercentage** | **string** | 隐含波动率变动百分比 | [optional] [default to undefined] +**pricePercentage** | **string** | Percentage change in price | [optional] [default to undefined] +**impliedVolatilityPercentage** | **string** | Percentage change in implied volatility | [optional] [default to undefined] **profitLoss** | **string** | PNL | [optional] [default to undefined] diff --git a/docs/RebateApi.md b/docs/RebateApi.md index 72cfe4b..6ac25b6 100644 --- a/docs/RebateApi.md +++ b/docs/RebateApi.md @@ -6,13 +6,13 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**agencyTransactionHistory**](RebateApi.md#agencyTransactionHistory) | **GET** /rebate/agency/transaction_history | The agency obtains the transaction history of the recommended user [**agencyCommissionsHistory**](RebateApi.md#agencyCommissionsHistory) | **GET** /rebate/agency/commission_history | The agency obtains the commission history of the recommended user -[**partnerTransactionHistory**](RebateApi.md#partnerTransactionHistory) | **GET** /rebate/partner/transaction_history | 合伙人获取推荐用户的交易记录 -[**partnerCommissionsHistory**](RebateApi.md#partnerCommissionsHistory) | **GET** /rebate/partner/commission_history | 合伙人获取推荐用户的返佣记录 -[**partnerSubList**](RebateApi.md#partnerSubList) | **GET** /rebate/partner/sub_list | 合伙人下级列表 +[**partnerTransactionHistory**](RebateApi.md#partnerTransactionHistory) | **GET** /rebate/partner/transaction_history | Partner obtains transaction records of recommended users +[**partnerCommissionsHistory**](RebateApi.md#partnerCommissionsHistory) | **GET** /rebate/partner/commission_history | Partner obtains commission records of recommended users +[**partnerSubList**](RebateApi.md#partnerSubList) | **GET** /rebate/partner/sub_list | Partner subordinate list [**rebateBrokerCommissionHistory**](RebateApi.md#rebateBrokerCommissionHistory) | **GET** /rebate/broker/commission_history | The broker obtains the user\'s commission rebate records [**rebateBrokerTransactionHistory**](RebateApi.md#rebateBrokerTransactionHistory) | **GET** /rebate/broker/transaction_history | The broker obtains the user\'s trading history -[**rebateUserInfo**](RebateApi.md#rebateUserInfo) | **GET** /rebate/user/info | 用户获取返佣信息 -[**userSubRelation**](RebateApi.md#userSubRelation) | **GET** /rebate/user/sub_relation | 用户下级关系 +[**rebateUserInfo**](RebateApi.md#rebateUserInfo) | **GET** /rebate/user/info | User retrieves rebate information +[**userSubRelation**](RebateApi.md#userSubRelation) | **GET** /rebate/user/sub_relation | User-subordinate relationship ## agencyTransactionHistory @@ -133,7 +133,7 @@ Promise<{ response: AxiosResponse; body: Array; }> [Age > Promise<{ response: http.IncomingMessage; body: PartnerTransactionHistory; }> partnerTransactionHistory(opts) -合伙人获取推荐用户的交易记录 +Partner obtains transaction records of recommended users Record time range cannot exceed 30 days @@ -190,7 +190,7 @@ Promise<{ response: AxiosResponse; body: PartnerTransactionHistory; }> [PartnerT > Promise<{ response: http.IncomingMessage; body: PartnerCommissionHistory; }> partnerCommissionsHistory(opts) -合伙人获取推荐用户的返佣记录 +Partner obtains commission records of recommended users Record time range cannot exceed 30 days @@ -247,9 +247,9 @@ Promise<{ response: AxiosResponse; body: PartnerCommissionHistory; }> [PartnerCo > Promise<{ response: http.IncomingMessage; body: PartnerSubList; }> partnerSubList(opts) -合伙人下级列表 +Partner subordinate list -包含下级代理、直接直客、间接直客 +Including sub-agents, direct customers, indirect customers ### Example @@ -317,7 +317,7 @@ const opts = { 'limit': 100, // number | Maximum number of records to be returned in a single list 'offset': 0, // number | List offset, starting from 0 'userId': 10003, // number | User ID. If not specified, all user records will be returned - 'from': 1711929600, // number | 查询记录的起始时间,不指定则默认从当前时间开始向前推 30 天 + 'from': 1711929600, // number | The start time of the query record. If not specified, the default is to push forward 30 days from the current time. 'to': 1714521600 // number | Time range ending, default to current time }; api.rebateBrokerCommissionHistory(opts) @@ -333,7 +333,7 @@ Name | Type | Description | Notes **limit** | **number**| Maximum number of records to be returned in a single list | [optional] [default to 100] **offset** | **number**| List offset, starting from 0 | [optional] [default to 0] **userId** | **number**| User ID. If not specified, all user records will be returned | [optional] [default to undefined] - **from** | **number**| 查询记录的起始时间,不指定则默认从当前时间开始向前推 30 天 | [optional] [default to undefined] + **from** | **number**| The start time of the query record. If not specified, the default is to push forward 30 days from the current time. | [optional] [default to undefined] **to** | **number**| Time range ending, default to current time | [optional] [default to undefined] ### Return type @@ -372,7 +372,7 @@ const opts = { 'limit': 100, // number | Maximum number of records to be returned in a single list 'offset': 0, // number | List offset, starting from 0 'userId': 10003, // number | User ID. If not specified, all user records will be returned - 'from': 1711929600, // number | 查询记录的起始时间,不指定则默认从当前时间开始向前推 30 天 + 'from': 1711929600, // number | The start time of the query record. If not specified, the default is to push forward 30 days from the current time. 'to': 1714521600 // number | Time range ending, default to current time }; api.rebateBrokerTransactionHistory(opts) @@ -388,7 +388,7 @@ Name | Type | Description | Notes **limit** | **number**| Maximum number of records to be returned in a single list | [optional] [default to 100] **offset** | **number**| List offset, starting from 0 | [optional] [default to 0] **userId** | **number**| User ID. If not specified, all user records will be returned | [optional] [default to undefined] - **from** | **number**| 查询记录的起始时间,不指定则默认从当前时间开始向前推 30 天 | [optional] [default to undefined] + **from** | **number**| The start time of the query record. If not specified, the default is to push forward 30 days from the current time. | [optional] [default to undefined] **to** | **number**| Time range ending, default to current time | [optional] [default to undefined] ### Return type @@ -408,7 +408,7 @@ Promise<{ response: AxiosResponse; body: Array; }> [BrokerTra > Promise<{ response: http.IncomingMessage; body: Array; }> rebateUserInfo() -用户获取返佣信息 +User retrieves rebate information ### Example @@ -447,9 +447,9 @@ Promise<{ response: AxiosResponse; body: Array; }> [RebateUserIn > Promise<{ response: http.IncomingMessage; body: UserSubRelation; }> userSubRelation(userIdList) -用户下级关系 +User-subordinate relationship -查询指定用户是否在体系内 +Query whether the specified user is in the system ### Example @@ -462,7 +462,7 @@ const client = new GateApi.ApiClient(); client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); const api = new GateApi.RebateApi(client); -const userIdList = "1, 2, 3"; // string | 查询用户的ID列表,以,分割,超过100个则取100个 +const userIdList = "1, 2, 3"; // string | Query the user\'s ID list, split by,, if there are more than 100, take 100 api.userSubRelation(userIdList) .then(value => console.log('API called successfully. Returned data: ', value.body), error => console.error(error)); @@ -473,7 +473,7 @@ api.userSubRelation(userIdList) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **userIdList** | **string**| 查询用户的ID列表,以,分割,超过100个则取100个 | [default to undefined] + **userIdList** | **string**| Query the user\'s ID list, split by,, if there are more than 100, take 100 | [default to undefined] ### Return type diff --git a/docs/RebateUserInfo.md b/docs/RebateUserInfo.md index 89d43de..37d9ff0 100644 --- a/docs/RebateUserInfo.md +++ b/docs/RebateUserInfo.md @@ -4,5 +4,5 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**inviteUid** | **number** | 我的邀请人UID | [optional] [default to undefined] +**inviteUid** | **number** | My inviter\'s UID | [optional] [default to undefined] diff --git a/docs/RepayRequest.md b/docs/RepayRequest.md deleted file mode 100644 index bec4a9a..0000000 --- a/docs/RepayRequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# RepayRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**currencyPair** | **string** | Currency pair | [default to undefined] -**currency** | **string** | Loan currency | [default to undefined] -**mode** | **string** | Repay mode. all - repay all; partial - repay only some portion | [default to undefined] -**amount** | **string** | Repay amount. Required in `partial` mode | [optional] [default to undefined] - -## Enum: RepayRequest.Mode - -* `All` (value: `'all'`) - -* `Partial` (value: `'partial'`) - - diff --git a/docs/Repayment.md b/docs/Repayment.md deleted file mode 100644 index 657c901..0000000 --- a/docs/Repayment.md +++ /dev/null @@ -1,11 +0,0 @@ -# Repayment - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Loan record ID | [optional] [default to undefined] -**createTime** | **string** | Repayment time | [optional] [default to undefined] -**principal** | **string** | Repaid principal | [optional] [default to undefined] -**interest** | **string** | Repaid interest | [optional] [default to undefined] - diff --git a/docs/RiskUnits.md b/docs/RiskUnits.md index c6da122..d7db534 100644 --- a/docs/RiskUnits.md +++ b/docs/RiskUnits.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**symbol** | **string** | 风险单元标志 | [optional] [default to undefined] -**spotInUse** | **string** | 现货对冲占用数量 | [optional] [default to undefined] -**maintainMargin** | **string** | 风险单元的维持保证金 | [optional] [default to undefined] -**initialMargin** | **string** | 风险单元的起始保证金 | [optional] [default to undefined] -**delta** | **string** | 风险单元的 总 delta | [optional] [default to undefined] -**gamma** | **string** | 风险单元的 总 gamma | [optional] [default to undefined] -**theta** | **string** | 风险单元的 总 theta | [optional] [default to undefined] -**vega** | **string** | 风险单元的 总 vega | [optional] [default to undefined] +**symbol** | **string** | Risk unit flag | [optional] [default to undefined] +**spotInUse** | **string** | Spot hedging utilization | [optional] [default to undefined] +**maintainMargin** | **string** | Maintenance margin for risk unit | [optional] [default to undefined] +**initialMargin** | **string** | Initial margin for risk unit | [optional] [default to undefined] +**delta** | **string** | Total Delta of risk unit | [optional] [default to undefined] +**gamma** | **string** | Total Gamma of risk unit | [optional] [default to undefined] +**theta** | **string** | Total Theta of risk unit | [optional] [default to undefined] +**vega** | **string** | Total Vega of risk unit | [optional] [default to undefined] diff --git a/docs/SpotAccount.md b/docs/SpotAccount.md index 7cbbefa..e879ac2 100644 --- a/docs/SpotAccount.md +++ b/docs/SpotAccount.md @@ -7,5 +7,5 @@ Name | Type | Description | Notes **currency** | **string** | Currency detail | [optional] [default to undefined] **available** | **string** | Available amount | [optional] [default to undefined] **locked** | **string** | Locked amount, used in trading | [optional] [default to undefined] -**updateId** | **number** | 版本号 | [optional] [default to undefined] +**updateId** | **number** | Version number | [optional] [default to undefined] diff --git a/docs/SpotApi.md b/docs/SpotApi.md index c81ccac..e10a13f 100644 --- a/docs/SpotApi.md +++ b/docs/SpotApi.md @@ -30,7 +30,7 @@ Method | HTTP request | Description [**getSystemTime**](SpotApi.md#getSystemTime) | **GET** /spot/time | Get server current time [**countdownCancelAllSpot**](SpotApi.md#countdownCancelAllSpot) | **POST** /spot/countdown_cancel_all | Countdown cancel orders [**amendBatchOrders**](SpotApi.md#amendBatchOrders) | **POST** /spot/amend_batch_orders | Batch modification of orders -[**getSpotInsuranceHistory**](SpotApi.md#getSpotInsuranceHistory) | **GET** /spot/insurance_history | 查询现货保险基金历史数据 +[**getSpotInsuranceHistory**](SpotApi.md#getSpotInsuranceHistory) | **GET** /spot/insurance_history | Query spot insurance fund historical data [**listSpotPriceTriggeredOrders**](SpotApi.md#listSpotPriceTriggeredOrders) | **GET** /spot/price_orders | Retrieve running auto order list [**createSpotPriceTriggeredOrder**](SpotApi.md#createSpotPriceTriggeredOrder) | **POST** /spot/price_orders | Create a price-triggered order [**cancelSpotPriceTriggeredOrderList**](SpotApi.md#cancelSpotPriceTriggeredOrderList) | **DELETE** /spot/price_orders | Cancel all open orders @@ -300,7 +300,7 @@ No authorization required Retrieve market trades -支持指定 `from` 和 `to` 按时间范围查询或基于 `last_id` 的翻页查询。默认按时间范围查询,查询范围为最近30天。 基于 `last_id` 翻页的查询方式不再推荐继续使用。如果指定 `last_id` ,时间范围查询参数会被忽略。 使用 limit&page分页功能检索数据时最大分页数量为100,000条,即 (limit * page - 1) <= 100000。 +Supports specifying `from` and `to` to query by time range or paging query based on `last_id`. The default query is by time range, and the query range is the last 30 days. The query method based on `last_id` paging is no longer recommended. If `last_id` is specified, the time range query parameter will be ignored. 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 @@ -545,7 +545,7 @@ Promise<{ response: AxiosResponse; body: Array; }> [SpotAccount](Sp Query account book -记录查询时间范围不允许超过 30 天。 使用 limit&page分页功能检索数据时最大分页数量为100,000条,即 (limit * page - 1) <= 100000。 +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 @@ -617,7 +617,7 @@ client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); const api = new GateApi.SpotApi(client); const order = [new Order()]; // Array | const opts = { - 'xGateExptime': 1689560679123 // number | 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 + 'xGateExptime': 1689560679123 // number | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected }; api.createBatchOrders(order, opts) .then(value => console.log('API called successfully. Returned data: ', value.body), @@ -630,7 +630,7 @@ api.createBatchOrders(order, opts) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **order** | [**Array<Order>**](Order.md)| | - **xGateExptime** | **number**| 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 | [optional] [default to undefined] + **xGateExptime** | **number**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] [default to undefined] ### Return type @@ -808,7 +808,7 @@ Promise<{ response: AxiosResponse; body: Array; }> [Order](Order.md) Create an order -支持现货、保证金、杠杆、全仓杠杆下单。通过 `account` 字段来使用不同的账户,默认为 `spot` ,即使用现货账户下单,如果用户是 `unified` 账户,默认是用统一账户下单 使用杠杆账户交易,即 `account` 设置为 `margin` 的时候,可以设置 `auto_borrow` 为 `true`, 在账户余额不足的情况,由系统自动执行 `POST /margin/uni/loans` 借入不足部分。 杠杆下单成交之后的获取到的资产是否自动用于归还逐仓杠杆账户的借入单,取决于用户逐仓杠杆**账户**的自动还款设置, 该账户自动还款设置可以通过 `/margin/auto_repay` 来查询和设置。 使用全仓杠杆账户交易,即 `account` 设置为 `cross_margin` 的时候,同样可以启用 `auto_borrow` 来实现自动借入不足部分,但是与逐仓杠杆账户不同的是,全仓杠杆账户的委托是否自动还款取决于下单时的 `auto_repay` 设置,该设置只对当前委托生效,即只有该委托成交之后获取到的资产会用来还款全仓杠杆账户的借入单。 全仓杠杆账户下单目前支持同时开启 `auto_borrow` 和 `auto_repay`。 自动还款会在订单结束时触发,即 `status` 为 `cancelled` 或者 `closed` 。 **委托状态** 挂单中的委托状态是 `open` ,在数量全部成交之前保持为 `open` 。如果被全部吃掉,则订单结束,状态变成 `closed` 。 假如全部成交之前,订单被撤销,不管是否有部分成交,状态都会变为 `cancelled` **冰山委托** `iceberg` 用来设置冰山委托显示的数量,如果需要完全隐藏,设置为 `-1` 。注意隐藏部分成交时按照 taker 的手续费率收取。 **限制用户自成交** 设置 `stp_act` 来决定使用限制用户自成交的策略 +Supports spot, margin, leverage, and cross margin orders. Use different accounts through the `account` field, the default is `spot`, that is, use the spot account to place orders, if the user is `unified` account, the default is to use the unified account to place orders When using margin account trading, that is, when `account` is set to `margin`, you can set `auto_borrow` to `true`, When the account balance is insufficient, the system automatically executes `POST marginuniloans` to borrow the insufficient amount. Whether the assets obtained after placing a margin order are automatically used to return the borrowing order of the isolated margin account depends on the automatic repayment settings of the user\'s isolated margin account, The automatic repayment settings of this account can be queried and set through `marginauto_repay`. When using cross margin account trading, that is, when `account` is set to `cross_margin`, `auto_borrow` To realize the automatic borrowing of the insufficient part, but unlike the isolated margin account, whether the entrustment of the cross margin account is automatically repaid depends on the time when the order is placed `auto_repay` setting, this setting only takes effect for the current order, that is, only the assets obtained after the order is completed will be used to repay the borrowing order of the cross margin account. Placing orders on cross margin accounts currently supports enabling `auto_borrow` and `auto_repay` at the same time. Automatic repayment will be triggered when the order ends, that is, the `status` is `cancelled` or `closed`. Delegation status The order status in the pending order is `open` and remains `open` until all the quantities are filled. If all are filled, the order ends and the status becomes `closed`. If the order is canceled before all transactions are completed, the status will change to `cancelled` regardless of whether there is partial execution or not. Iceberg Commission `iceberg` is used to set the number of iceberg orders displayed. If you need to hide it completely, set it to `-1`. Note that when hiding partial transactions, follow the instructions The taker\'s handling fee is charged. Restrict users to self-transact Set `stp_act` to decide to use a strategy that limits users\' self-transactions ### Example @@ -823,7 +823,7 @@ client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); const api = new GateApi.SpotApi(client); const order = new Order(); // Order | const opts = { - 'xGateExptime': 1689560679123 // number | 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 + 'xGateExptime': 1689560679123 // number | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected }; api.createOrder(order, opts) .then(value => console.log('API called successfully. Returned data: ', value.body), @@ -836,7 +836,7 @@ api.createOrder(order, opts) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **order** | [**Order**](Order.md)| | - **xGateExptime** | **number**| 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 | [optional] [default to undefined] + **xGateExptime** | **number**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] [default to undefined] ### Return type @@ -857,7 +857,7 @@ Promise<{ response: AxiosResponse; body: Order; }> [Order](Order.md) Cancel all `open` orders in specified currency pair -不指定 `account` 参数时,包括现货、保证金、逐仓杠杆和全仓杠杆在内的所有挂单都会执行撤销操作。 不指定 `currency_pair`时,会撤销所有交易对的挂单 可以单独指定某一种账户,撤销指定账户下的所有挂单 +If `account` is not set, all open orders, including spot, portfolio, margin and cross margin ones, will be cancelled. If `currency_pair` is not specified, all pending orders for trading pairs will be cancelled. You can set `account` to cancel only orders within the specified account ### Example @@ -873,9 +873,9 @@ const api = new GateApi.SpotApi(client); const opts = { 'currencyPair': "BTC_USDT", // string | Currency pair 'side': "sell", // string | All bids or asks. Both included if not specified - 'account': "spot", // string | 指定账户类型 - 经典账户:不指定则全部包含 - 统一账户:指定`unified` - 统一账户(旧):只能指定`cross_margin` + 'account': "spot", // string | Specify account type: - Classic account: Includes all if not specified - Unified account: Specify `unified` - Unified account (legacy): Can only specify `cross_margin` 'actionMode': "ACK", // string | 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) - 'xGateExptime': 1689560679123 // number | 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 + 'xGateExptime': 1689560679123 // number | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected }; api.cancelOrders(opts) .then(value => console.log('API called successfully. Returned data: ', value.body), @@ -889,9 +889,9 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **currencyPair** | **string**| Currency pair | [optional] [default to undefined] **side** | **string**| All bids or asks. Both included if not specified | [optional] [default to undefined] - **account** | **string**| 指定账户类型 - 经典账户:不指定则全部包含 - 统一账户:指定`unified` - 统一账户(旧):只能指定`cross_margin` | [optional] [default to undefined] + **account** | **string**| Specify account type: - Classic account: Includes all if not specified - Unified account: Specify `unified` - Unified account (legacy): Can only specify `cross_margin` | [optional] [default to undefined] **actionMode** | **string**| 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] [default to undefined] - **xGateExptime** | **number**| 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 | [optional] [default to undefined] + **xGateExptime** | **number**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] [default to undefined] ### Return type @@ -927,7 +927,7 @@ client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); const api = new GateApi.SpotApi(client); const cancelBatchOrder = [new CancelBatchOrder()]; // Array | const opts = { - 'xGateExptime': 1689560679123 // number | 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 + 'xGateExptime': 1689560679123 // number | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected }; api.cancelBatchOrders(cancelBatchOrder, opts) .then(value => console.log('API called successfully. Returned data: ', value.body), @@ -940,7 +940,7 @@ api.cancelBatchOrders(cancelBatchOrder, opts) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **cancelBatchOrder** | [**Array<CancelBatchOrder>**](CancelBatchOrder.md)| | - **xGateExptime** | **number**| 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 | [optional] [default to undefined] + **xGateExptime** | **number**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] [default to undefined] ### Return type @@ -975,7 +975,7 @@ client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); const api = new GateApi.SpotApi(client); const orderId = "12345"; // string | Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted. -const currencyPair = "BTC_USDT"; // string | 指定交易对查询。如果查询挂单的记录,该字段必选。如果查询已成交的记录,该字段可以不指定 +const currencyPair = "BTC_USDT"; // string | 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. const opts = { 'account': "cross_margin" // string | Specify operation account. Default to spot ,portfolio and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only }; @@ -990,7 +990,7 @@ api.getOrder(orderId, currencyPair, opts) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **orderId** | **string**| Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted. | [default to undefined] - **currencyPair** | **string**| 指定交易对查询。如果查询挂单的记录,该字段必选。如果查询已成交的记录,该字段可以不指定 | [default to undefined] + **currencyPair** | **string**| 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. | [default to undefined] **account** | **string**| Specify operation account. Default to spot ,portfolio and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only | [optional] [default to undefined] ### Return type @@ -1030,7 +1030,7 @@ const currencyPair = "BTC_USDT"; // string | Currency pair const opts = { 'account': "cross_margin", // string | Specify operation account. Default to spot ,portfolio and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only 'actionMode': "ACK", // string | 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) - 'xGateExptime': 1689560679123 // number | 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 + 'xGateExptime': 1689560679123 // number | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected }; api.cancelOrder(orderId, currencyPair, opts) .then(value => console.log('API called successfully. Returned data: ', value.body), @@ -1046,7 +1046,7 @@ Name | Type | Description | Notes **currencyPair** | **string**| Currency pair | [default to undefined] **account** | **string**| Specify operation account. Default to spot ,portfolio and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only | [optional] [default to undefined] **actionMode** | **string**| 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] [default to undefined] - **xGateExptime** | **number**| 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 | [optional] [default to undefined] + **xGateExptime** | **number**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] [default to undefined] ### Return type @@ -1067,7 +1067,7 @@ Promise<{ response: AxiosResponse; body: Order; }> [Order](Order.md) Amend an order -默认修改现货、保证金和逐仓杠杆账户的订单,如果需要修改全仓杠杆账户订单,必须指定 `account` 为 `cross_margin`,统一账户 `account` 只能指定为 `cross_margin`。 目前请求体和query都支持currency_pair和account传参,但请求体优先级更高 currency_pair必须在请求体或query中二选一填入 目前只支持修改价格或数量(二选一) 关于限速:修改订单和创建订单共享限速规则 关于匹配优先级:只修改数量变小不影响匹配优先级,修改价格或修改数量变大则优先级将调整到新价格最后面 注意事项:修改数量小于已成交数量会触发撤单操作 +By default, orders for spot, margin and isolated margin accounts are modified. If you need to modify orders for cross margin accounts, you must specify `account` as `cross_margin` and unify the account.`account` can only be specified as `cross_margin`. Currently both the request body and query support currency_pair and account parameters, but the request body has a higher priority currency_pair must be filled in either the request body or query Currently only supports modifying price or quantity (choose one of the two) About speed limit: Modify orders and create orders to share speed limit rules About matching priority: only modifying the quantity to make it smaller will not affect the matching priority. If you modify the price or modify the quantity to become larger, the priority will be adjusted to the end of the new price Note: The modified quantity is smaller than the completed quantity, which will trigger the order cancellation operation ### Example @@ -1085,7 +1085,7 @@ const orderPatch = new OrderPatch(); // OrderPatch | const opts = { 'currencyPair': "BTC_USDT", // string | Currency pair 'account': "cross_margin", // string | Specify operation account. Default to spot ,portfolio and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only - 'xGateExptime': 1689560679123 // number | 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 + 'xGateExptime': 1689560679123 // number | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected }; api.amendOrder(orderId, orderPatch, opts) .then(value => console.log('API called successfully. Returned data: ', value.body), @@ -1101,7 +1101,7 @@ Name | Type | Description | Notes **orderPatch** | [**OrderPatch**](OrderPatch.md)| | **currencyPair** | **string**| Currency pair | [optional] [default to undefined] **account** | **string**| Specify operation account. Default to spot ,portfolio and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only | [optional] [default to undefined] - **xGateExptime** | **number**| 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 | [optional] [default to undefined] + **xGateExptime** | **number**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] [default to undefined] ### Return type @@ -1122,7 +1122,7 @@ Promise<{ response: AxiosResponse; body: Order; }> [Order](Order.md) List personal trading history -默认查询现货、保证金和逐仓杠杆账户的成交记录,如果需要查询全仓杠杆账户的成交记录,必须指定 `account` 为 `cross_margin` 。 可以通过指定 `from` 或(和) `to` 来查询指定时间范围内的历史。 - 如果不指定任何时间参数,只能获取最近 7 天的数据。 - 如果只指定 `from` 或 `to` 的任一参数,也同样只返回指定时间开始(或结束)的 7 天范围的数据。 - `from` 和 `to` 的范围不允许超过 30 天 。 时间范围筛选的参数均是按订单**结束**时间来处理。 使用 limit&page分页功能检索数据时最大分页数量为100,000条,即 (limit * page - 1) <= 100000。 +Spot,portfolio and margin trades are queried by default. If cross margin trades are needed, `account` must be set to `cross_margin` You can also set `from` and(or) `to` to query by time range. If you don\'t specify `from` and/or `to` parameters, only the last 7 days of data will be retured. The range of `from` and `to` is not alloed to exceed 30 days. Time range parameters are handled as order finish time. 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 @@ -1278,7 +1278,7 @@ client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); const api = new GateApi.SpotApi(client); const batchAmendItem = [new BatchAmendItem()]; // Array | const opts = { - 'xGateExptime': 1689560679123 // number | 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 + 'xGateExptime': 1689560679123 // number | Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected }; api.amendBatchOrders(batchAmendItem, opts) .then(value => console.log('API called successfully. Returned data: ', value.body), @@ -1291,7 +1291,7 @@ api.amendBatchOrders(batchAmendItem, opts) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **batchAmendItem** | [**Array<BatchAmendItem>**](BatchAmendItem.md)| | - **xGateExptime** | **number**| 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 | [optional] [default to undefined] + **xGateExptime** | **number**| Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected | [optional] [default to undefined] ### Return type @@ -1310,7 +1310,7 @@ Promise<{ response: AxiosResponse; body: Array; }> [BatchOrder](Batc > Promise<{ response: http.IncomingMessage; body: Array; }> getSpotInsuranceHistory(business, currency, from, to, opts) -查询现货保险基金历史数据 +Query spot insurance fund historical data ### Example @@ -1321,13 +1321,13 @@ const client = new GateApi.ApiClient(); // client.basePath = "https://some-other-host" const api = new GateApi.SpotApi(client); -const business = "margin"; // string | 杠杆业务,margin - 逐仓;unified - 统一账户 +const business = "margin"; // string | Leverage business, margin - position by position; unified - unified account const currency = "BTC"; // string | Currency -const from = 1547706332; // number | 起始时间戳,秒级 -const to = 1547706332; // number | 终止时间戳,秒级 +const from = 1547706332; // number | Start timestamp, seconds +const to = 1547706332; // number | End timestamp, in seconds const opts = { 'page': 1, // number | Page number - 'limit': 30 // number | 列表返回的最大数量, 默认值30 + 'limit': 30 // number | The maximum number of items returned in the list, the default value is 30 }; api.getSpotInsuranceHistory(business, currency, from, to, opts) .then(value => console.log('API called successfully. Returned data: ', value.body), @@ -1339,12 +1339,12 @@ api.getSpotInsuranceHistory(business, currency, from, to, opts) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **business** | **string**| 杠杆业务,margin - 逐仓;unified - 统一账户 | [default to undefined] + **business** | **string**| Leverage business, margin - position by position; unified - unified account | [default to undefined] **currency** | **string**| Currency | [default to undefined] - **from** | **number**| 起始时间戳,秒级 | [default to undefined] - **to** | **number**| 终止时间戳,秒级 | [default to undefined] + **from** | **number**| Start timestamp, seconds | [default to undefined] + **to** | **number**| End timestamp, in seconds | [default to undefined] **page** | **number**| Page number | [optional] [default to 1] - **limit** | **number**| 列表返回的最大数量, 默认值30 | [optional] [default to 30] + **limit** | **number**| The maximum number of items returned in the list, the default value is 30 | [optional] [default to 30] ### Return type diff --git a/docs/SpotInsuranceHistory.md b/docs/SpotInsuranceHistory.md index 95f6307..7a2a857 100644 --- a/docs/SpotInsuranceHistory.md +++ b/docs/SpotInsuranceHistory.md @@ -5,6 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **currency** | **string** | Currency | [optional] [default to undefined] -**balance** | **string** | 余额 | [optional] [default to undefined] -**time** | **number** | 创建时间,时间戳,毫秒级 | [optional] [default to undefined] +**balance** | **string** | balance | [optional] [default to undefined] +**time** | **number** | Creation time, timestamp, milliseconds | [optional] [default to undefined] diff --git a/docs/StructuredGetProjectListRequest.md b/docs/StructuredGetProjectListRequest.md deleted file mode 100644 index 39d5bea..0000000 --- a/docs/StructuredGetProjectListRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# StructuredGetProjectListRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **string** | Product Type, default to empty for querying all. `SharkFin2.0`-Shark Fin 2.0 `BullishSharkFin`-Bullish Shark Fin `BearishSharkFin`-Bearish Shark Fin `DoubleNoTouch`-Double No-Touch `RangeAccrual`-RangeAccrual `SnowBall`-Snow Ball | [optional] [default to undefined] -**status** | **string** | Status: default to empty for querying all. `in_process`-in progress `will_begin`-will begin `wait_settlement`-waiting for settlement `done`-done | [optional] [default to undefined] -**page** | **number** | Page number | [optional] [default to undefined] -**limit** | **number** | Number of items returned in the list. Default is 100. | [optional] [default to undefined] - diff --git a/docs/StructuredOrderListRequest.md b/docs/StructuredOrderListRequest.md deleted file mode 100644 index bca354f..0000000 --- a/docs/StructuredOrderListRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# StructuredOrderListRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**from** | **number** | start time | [default to undefined] -**to** | **number** | Finished time | [default to undefined] -**page** | **number** | Page number | [optional] [default to undefined] -**limit** | **number** | Number of items returned in the list. Default is 100. | [optional] [default to undefined] - diff --git a/docs/SubAccountApi.md b/docs/SubAccountApi.md index 6cc8bb7..071fa31 100644 --- a/docs/SubAccountApi.md +++ b/docs/SubAccountApi.md @@ -14,7 +14,7 @@ Method | HTTP request | Description [**deleteSubAccountKeys**](SubAccountApi.md#deleteSubAccountKeys) | **DELETE** /sub_accounts/{user_id}/keys/{key} | Delete API key of the sub-account [**lockSubAccount**](SubAccountApi.md#lockSubAccount) | **POST** /sub_accounts/{user_id}/lock | Lock the sub-account [**unlockSubAccount**](SubAccountApi.md#unlockSubAccount) | **POST** /sub_accounts/{user_id}/unlock | Unlock the sub-account -[**listUnifiedMode**](SubAccountApi.md#listUnifiedMode) | **GET** /sub_accounts/unified_mode | 获取子帐号模式 +[**listUnifiedMode**](SubAccountApi.md#listUnifiedMode) | **GET** /sub_accounts/unified_mode | Get sub-account mode ## listSubAccounts @@ -463,9 +463,9 @@ Promise<{ response: AxiosResponse; body?: any; }> > Promise<{ response: http.IncomingMessage; body: Array; }> listUnifiedMode() -获取子帐号模式 +Get sub-account mode -统一账户模式: - `classic`: 经典账户模式 - `multi_currency`: 跨币种保证金模式 - `portfolio`: 组合保证金模式 +Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode ### Example diff --git a/docs/SubAccountKey.md b/docs/SubAccountKey.md index a3ab41c..4ab13b0 100644 --- a/docs/SubAccountKey.md +++ b/docs/SubAccountKey.md @@ -13,5 +13,5 @@ Name | Type | Description | Notes **state** | **number** | State 1 - normal 2 - locked 3 - frozen | [optional] [readonly] [default to undefined] **createdAt** | **number** | Creation time | [optional] [readonly] [default to undefined] **updatedAt** | **number** | Last update time | [optional] [readonly] [default to undefined] -**lastAccess** | **number** | 最近使用时间 | [optional] [readonly] [default to undefined] +**lastAccess** | **number** | Last access time | [optional] [readonly] [default to undefined] diff --git a/docs/SubAccountKeyPerms.md b/docs/SubAccountKeyPerms.md index fe8781b..718164f 100644 --- a/docs/SubAccountKeyPerms.md +++ b/docs/SubAccountKeyPerms.md @@ -4,6 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | 权限功能名称(不传值即为清空) - wallet: 钱包 - spot: 现货/杠杆 - futures: 永续合约 - delivery: 交割合约 - earn: 理财 - custody: 托管 - options: 期权 - account: 账户信息 - loan: 借贷 - margin: 杠杆 - unified: 统一账户 - copy: 跟单 | [optional] [default to undefined] +**name** | **string** | 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] [default to undefined] **readOnly** | **boolean** | read only | [optional] [default to undefined] diff --git a/docs/SubAccountToSubAccount.md b/docs/SubAccountToSubAccount.md index 9112b1c..1a169d3 100644 --- a/docs/SubAccountToSubAccount.md +++ b/docs/SubAccountToSubAccount.md @@ -7,8 +7,8 @@ Name | Type | Description | Notes **currency** | **string** | Transfer currency name | [default to undefined] **subAccountType** | **string** | Transfer from the account. (deprecate, use `sub_account_from_type` and `sub_account_to_type` instead) | [optional] [default to undefined] **subAccountFrom** | **string** | Transfer from the user id of the sub-account | [default to undefined] -**subAccountFromType** | **string** | 转出的子账号交易账户, spot - 现货账户, futures - 永续合约账户, delivery - 交割合约账户 | [default to undefined] +**subAccountFromType** | **string** | The sub-account\'s outgoing trading account, spot - spot account, futures - perpetual contract account, delivery - delivery contract account. | [default to undefined] **subAccountTo** | **string** | Transfer to the user id of the sub-account | [default to undefined] -**subAccountToType** | **string** | 转入的子账号交易账户, spot - 现货账户, futures - 永续合约账户, delivery - 交割合约账户 | [default to undefined] +**subAccountToType** | **string** | The sub-account\'s incoming trading account, spot - spot account, futures - perpetual contract account, delivery - delivery contract account | [default to undefined] **amount** | **string** | Transfer amount | [default to undefined] diff --git a/docs/SubAccountTransfer.md b/docs/SubAccountTransfer.md index b987cb2..d1a449a 100644 --- a/docs/SubAccountTransfer.md +++ b/docs/SubAccountTransfer.md @@ -12,5 +12,5 @@ Name | Type | Description | Notes **clientOrderId** | **string** | 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] [default to undefined] **timest** | **string** | Transfer timestamp | [optional] [readonly] [default to undefined] **source** | **string** | Where the operation is initiated from | [optional] [readonly] [default to undefined] -**subAccountType** | **string** | 操作的子账号交易账户, spot - 现货账户, futures - 永续合约账户, delivery - 交割合约账户 | [optional] [default to 'spot'] +**subAccountType** | **string** | Target sub user\'s account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account | [optional] [default to 'spot'] diff --git a/docs/SubUserMode.md b/docs/SubUserMode.md index 829747f..aa30e52 100644 --- a/docs/SubUserMode.md +++ b/docs/SubUserMode.md @@ -5,6 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **userId** | **number** | User ID | [optional] [default to undefined] -**isUnified** | **boolean** | 是否是统一账户 | [optional] [default to undefined] -**mode** | **string** | 统一账户模式: - `classic`: 经典账户模式 - `multi_currency`: 跨币种保证金模式 - `portfolio`: 组合保证金模式 | [optional] [default to undefined] +**isUnified** | **boolean** | Is it a unified account? | [optional] [default to undefined] +**mode** | **string** | Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode | [optional] [default to undefined] diff --git a/docs/Ticker.md b/docs/Ticker.md index 544e659..6023ba7 100644 --- a/docs/Ticker.md +++ b/docs/Ticker.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes **currencyPair** | **string** | Currency pair | [optional] [default to undefined] **last** | **string** | Last trading price | [optional] [default to undefined] **lowestAsk** | **string** | Recent lowest ask | [optional] [default to undefined] -**lowestSize** | **string** | 最新卖方最低价数量;批量查询时不存在;单个查询时存在,如果没有数据时为空 | [optional] [default to undefined] +**lowestSize** | **string** | 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] [default to undefined] **highestBid** | **string** | Recent highest bid | [optional] [default to undefined] -**highestSize** | **string** | 最新买方最高价数量;批量查询时不存在;单个查询时存在,如果没有数据时为空 | [optional] [default to undefined] +**highestSize** | **string** | 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] [default to undefined] **changePercentage** | **string** | Change percentage in the last 24h | [optional] [default to undefined] **changeUtc0** | **string** | utc0 timezone, the percentage change in the last 24 hours | [optional] [default to undefined] **changeUtc8** | **string** | utc8 timezone, the percentage change in the last 24 hours | [optional] [default to undefined] diff --git a/docs/TransferOrderStatus.md b/docs/TransferOrderStatus.md new file mode 100644 index 0000000..b0d2944 --- /dev/null +++ b/docs/TransferOrderStatus.md @@ -0,0 +1,9 @@ +# TransferOrderStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**txId** | **string** | Order id | [optional] [default to undefined] +**status** | **string** | 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] [default to undefined] + diff --git a/docs/UidPushOrder.md b/docs/UidPushOrder.md index 2b29ce2..efe9a6a 100644 --- a/docs/UidPushOrder.md +++ b/docs/UidPushOrder.md @@ -5,12 +5,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **number** | Order ID | [optional] [default to undefined] -**pushUid** | **number** | 发起方用户ID | [optional] [default to undefined] -**receiveUid** | **number** | 接收方用户ID | [optional] [default to undefined] +**pushUid** | **number** | Initiator User ID | [optional] [default to undefined] +**receiveUid** | **number** | Recipient User ID | [optional] [default to undefined] **currency** | **string** | Currency name | [optional] [default to undefined] -**amount** | **string** | 转账数量 | [optional] [default to undefined] +**amount** | **string** | Transfer amount | [optional] [default to undefined] **createTime** | **number** | Creation time | [optional] [default to undefined] -**status** | **string** | 提现状态: - CREATING: 创建中 - PENDING: 等待接收 (请联系对方在 Gate 官网接受转帐) - CANCELLING: 撤销中 - CANCELLED: 已撤销 - REFUSING: 拒绝中 - REFUSED: 已拒绝 - RECEIVING: 正在接收 - RECEIVED: 成功 | [optional] [default to undefined] -**message** | **string** | PENDING原因提示 | [optional] [default to undefined] -**transactionType** | **string** | 订单类型 | [optional] [default to undefined] +**status** | **string** | 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] [default to undefined] +**message** | **string** | PENDING Reason Tips | [optional] [default to undefined] +**transactionType** | **string** | Order Type | [optional] [default to undefined] diff --git a/docs/UidPushWithdrawal.md b/docs/UidPushWithdrawal.md index ab46bce..81d8cbf 100644 --- a/docs/UidPushWithdrawal.md +++ b/docs/UidPushWithdrawal.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**receiveUid** | **number** | 接收方uid | [default to undefined] +**receiveUid** | **number** | Recipient UID | [default to undefined] **currency** | **string** | Currency name | [default to undefined] -**amount** | **string** | 转账数量 | [default to undefined] +**amount** | **string** | Transfer amount | [default to undefined] diff --git a/docs/UnifiedAccount.md b/docs/UnifiedAccount.md index 24dc697..56eb88d 100644 --- a/docs/UnifiedAccount.md +++ b/docs/UnifiedAccount.md @@ -6,21 +6,21 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **userId** | **number** | User ID | [optional] [default to undefined] **refreshTime** | **number** | Time of the most recent refresh | [optional] [default to undefined] -**locked** | **boolean** | 账户是否被锁定,在跨币种保证金/组合保证金模式下有效,其他如单币种保证金模式下是false | [optional] [default to undefined] +**locked** | **boolean** | Whether the account is locked, valid in cross-currency margin/combined margin mode, false in other modes such as single-currency margin mode | [optional] [default to undefined] **balances** | [**{ [key: string]: UnifiedBalance; }**](UnifiedBalance.md) | | [optional] [default to undefined] -**total** | **string** | 折算成 USD 的账户总资产,即所有币种 `(available + freeze) * price` 之和,(已废弃,待下线字段,用unified_account_total代替) | [optional] [default to undefined] -**borrowed** | **string** | 折算成 USD 的账户总借入数量,即所有币种(不包括点卡)的 `borrowed * price` 之和,在跨币种保证金/组合保证金模式下有效,其他如单币种保证金模式下是0 | [optional] [default to undefined] -**totalInitialMargin** | **string** | 总初始保证金,在跨币种保证金/组合保证金模式下有效,其他如单币种保证金模式下是0 | [optional] [default to undefined] -**totalMarginBalance** | **string** | 总保证金余额,在跨币种保证金/组合保证金模式下有效,其他如单币种保证金模式下是0 | [optional] [default to undefined] -**totalMaintenanceMargin** | **string** | 总维持保证金,在跨币种保证金/组合保证金模式下有效,其他如单币种保证金模式下是0 | [optional] [default to undefined] -**totalInitialMarginRate** | **string** | 总初始保证金率,在跨币种保证金/组合保证金模式下有效,其他如单币种保证金模式下是0 | [optional] [default to undefined] -**totalMaintenanceMarginRate** | **string** | 总维持保证金率,在跨币种保证金/组合保证金模式下有效,其他如单币种保证金模式下是0 | [optional] [default to undefined] -**totalAvailableMargin** | **string** | 可用的保证金额度,在跨币种保证金/组合保证金模式下有效,其他如单币种保证金模式下是0 | [optional] [default to undefined] -**unifiedAccountTotal** | **string** | 统一账户总资产,在单币种保证金/跨币种保证金/组合保证金模式模式下有效 | [optional] [default to undefined] -**unifiedAccountTotalLiab** | **string** | 统一账户总借贷,在跨币种保证金/组合保证金模式下有效,其他如单币种保证金模式下是0 | [optional] [default to undefined] -**unifiedAccountTotalEquity** | **string** | 统一账户总权益,在单币种保证金/跨币种保证金/组合保证金模式模式下有效 | [optional] [default to undefined] -**leverage** | **string** | 实际杠杆,在跨币种保证金/组合保证金模式下有效 | [optional] [readonly] [default to undefined] -**spotOrderLoss** | **string** | 总挂单损失,单位USDT,在跨币种保证金/组合保证金模式下有效,其他如单币种保证金模式下是0 | [optional] [default to undefined] -**spotHedge** | **boolean** | 现货对冲状态, true - 启用,false - 未启用 | [optional] [default to undefined] -**useFunding** | **boolean** | 是否将余币宝理财资金作为保证金 | [optional] [default to undefined] +**total** | **string** | 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] [default to undefined] +**borrowed** | **string** | 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] [default to undefined] +**totalInitialMargin** | **string** | Total initial margin, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] [default to undefined] +**totalMarginBalance** | **string** | Total margin balance, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] [default to undefined] +**totalMaintenanceMargin** | **string** | 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] [default to undefined] +**totalInitialMarginRate** | **string** | Total initial margin rate, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] [default to undefined] +**totalMaintenanceMarginRate** | **string** | Total maintenance margin rate, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] [default to undefined] +**totalAvailableMargin** | **string** | Available margin amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] [default to undefined] +**unifiedAccountTotal** | **string** | Unify the total account assets, valid in single currency margin/cross-currency margin/combined margin mode | [optional] [default to undefined] +**unifiedAccountTotalLiab** | **string** | 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] [default to undefined] +**unifiedAccountTotalEquity** | **string** | Unify the total account equity, valid in single currency margin/cross-currency margin/combined margin mode | [optional] [default to undefined] +**leverage** | **string** | Actual leverage, valid in cross-currency margin/combined margin mode | [optional] [readonly] [default to undefined] +**spotOrderLoss** | **string** | 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] [default to undefined] +**spotHedge** | **boolean** | Spot hedging status, true - enabled, false - not enabled. | [optional] [default to undefined] +**useFunding** | **boolean** | Whether to use funds as margin | [optional] [default to undefined] diff --git a/docs/UnifiedApi.md b/docs/UnifiedApi.md index ea1b00c..1527f82 100644 --- a/docs/UnifiedApi.md +++ b/docs/UnifiedApi.md @@ -11,17 +11,17 @@ Method | HTTP request | Description [**createUnifiedLoan**](UnifiedApi.md#createUnifiedLoan) | **POST** /unified/loans | Borrow or repay [**listUnifiedLoanRecords**](UnifiedApi.md#listUnifiedLoanRecords) | **GET** /unified/loan_records | Get load records [**listUnifiedLoanInterestRecords**](UnifiedApi.md#listUnifiedLoanInterestRecords) | **GET** /unified/interest_records | List interest records -[**getUnifiedRiskUnits**](UnifiedApi.md#getUnifiedRiskUnits) | **GET** /unified/risk_units | 获取用户风险单元详情,仅在组合保证金模式有效 +[**getUnifiedRiskUnits**](UnifiedApi.md#getUnifiedRiskUnits) | **GET** /unified/risk_units | Get user risk unit details [**getUnifiedMode**](UnifiedApi.md#getUnifiedMode) | **GET** /unified/unified_mode | Query mode of the unified account [**setUnifiedMode**](UnifiedApi.md#setUnifiedMode) | **PUT** /unified/unified_mode | Set mode of the unified account [**getUnifiedEstimateRate**](UnifiedApi.md#getUnifiedEstimateRate) | **GET** /unified/estimate_rate | Get unified estimate rate -[**listCurrencyDiscountTiers**](UnifiedApi.md#listCurrencyDiscountTiers) | **GET** /unified/currency_discount_tiers | list currency discount tiers -[**listLoanMarginTiers**](UnifiedApi.md#listLoanMarginTiers) | **GET** /unified/loan_margin_tiers | 查询统一账户借贷梯度保证金 -[**calculatePortfolioMargin**](UnifiedApi.md#calculatePortfolioMargin) | **POST** /unified/portfolio_calculator | 组合保证金计算器计算 -[**getUserLeverageCurrencyConfig**](UnifiedApi.md#getUserLeverageCurrencyConfig) | **GET** /unified/leverage/user_currency_config | 用户最大、最小可设置币种杠杆倍数 -[**getUserLeverageCurrencySetting**](UnifiedApi.md#getUserLeverageCurrencySetting) | **GET** /unified/leverage/user_currency_setting | 获取用户币种杠杆倍数,currency不传则查询全部币种 -[**setUserLeverageCurrencySetting**](UnifiedApi.md#setUserLeverageCurrencySetting) | **POST** /unified/leverage/user_currency_setting | 设置借贷币种杠杆倍数 -[**getHistoryLoanRate**](UnifiedApi.md#getHistoryLoanRate) | **GET** /unified/history_loan_rate | 获取历史借币利率 +[**listCurrencyDiscountTiers**](UnifiedApi.md#listCurrencyDiscountTiers) | **GET** /unified/currency_discount_tiers | List currency discount tiers +[**listLoanMarginTiers**](UnifiedApi.md#listLoanMarginTiers) | **GET** /unified/loan_margin_tiers | List loan margin tiers +[**calculatePortfolioMargin**](UnifiedApi.md#calculatePortfolioMargin) | **POST** /unified/portfolio_calculator | Portfolio margin calculator +[**getUserLeverageCurrencyConfig**](UnifiedApi.md#getUserLeverageCurrencyConfig) | **GET** /unified/leverage/user_currency_config | Minimum currency leverage that can be set +[**getUserLeverageCurrencySetting**](UnifiedApi.md#getUserLeverageCurrencySetting) | **GET** /unified/leverage/user_currency_setting | Get the leverage multiple of the user currency +[**setUserLeverageCurrencySetting**](UnifiedApi.md#setUserLeverageCurrencySetting) | **POST** /unified/leverage/user_currency_setting | Set the loan currency leverage +[**getHistoryLoanRate**](UnifiedApi.md#getHistoryLoanRate) | **GET** /unified/history_loan_rate | get historical lending rates ## listUnifiedAccounts @@ -327,7 +327,7 @@ const opts = { 'limit': 100, // number | Maximum response items. Default: 100, minimum: 1, Maximum: 100 'from': 1627706330, // number | Start timestamp of the query 'to': 1635329650, // number | Time range ending, default to current time - 'type': "platform" // string | 借贷类型,平台借币 - platform,杠杆借币 - margin,不传时默认为margin + 'type': "platform" // string | Loan type, platform loan - platform, leverage loan - margin, if not passed, defaults to margin }; api.listUnifiedLoanInterestRecords(opts) .then(value => console.log('API called successfully. Returned data: ', value.body), @@ -344,7 +344,7 @@ Name | Type | Description | Notes **limit** | **number**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] **from** | **number**| Start timestamp of the query | [optional] [default to undefined] **to** | **number**| Time range ending, default to current time | [optional] [default to undefined] - **type** | **string**| 借贷类型,平台借币 - platform,杠杆借币 - margin,不传时默认为margin | [optional] [default to undefined] + **type** | **string**| Loan type, platform loan - platform, leverage loan - margin, if not passed, defaults to margin | [optional] [default to undefined] ### Return type @@ -363,7 +363,9 @@ Promise<{ response: AxiosResponse; body: Array; }> [UniLo > Promise<{ response: http.IncomingMessage; body: UnifiedRiskUnits; }> getUnifiedRiskUnits() -获取用户风险单元详情,仅在组合保证金模式有效 +Get user risk unit details + +Retrieve user risk unit details, only valid in portfolio margin mode ### Example @@ -404,7 +406,7 @@ Promise<{ response: AxiosResponse; body: UnifiedRiskUnits; }> [UnifiedRiskUnits] Query mode of the unified account -统一账户模式: - `classic`: 经典账户模式 - `multi_currency`: 跨币种保证金模式 - `portfolio`: 组合保证金模式 - `single_currency`: 单币种保证金模式 +Unified account mode: - `classic`: Classic account mode - `multi_currency`: Cross-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single-currency margin mode ### Example @@ -445,7 +447,7 @@ Promise<{ response: AxiosResponse; body: UnifiedModeSet; }> [UnifiedModeSet](Uni 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\" } ``` +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 @@ -533,7 +535,7 @@ Promise<{ response: AxiosResponse; body: { [key: string]: string; }; }> [string] > Promise<{ response: http.IncomingMessage; body: Array; }> listCurrencyDiscountTiers() -list currency discount tiers +List currency discount tiers ### Example @@ -570,7 +572,7 @@ No authorization required > Promise<{ response: http.IncomingMessage; body: Array; }> listLoanMarginTiers() -查询统一账户借贷梯度保证金 +List loan margin tiers ### Example @@ -607,9 +609,9 @@ No authorization required > Promise<{ response: http.IncomingMessage; body: UnifiedPortfolioOutput; }> calculatePortfolioMargin(unifiedPortfolioInput) -组合保证金计算器计算 +Portfolio margin calculator -组合保证金计算器 当输入为模拟仓位组合时,每个仓位包括仓位名和持有量,只支持市场范围:BTC、ETH的永续合约、期权、现货 当输入为模拟挂单时,每个挂单包括市场标识、挂单价、挂单量,只支持市场范围:BTC、ETH的永续合约、期权、现货。挂单不包括市价单 +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 @@ -650,7 +652,7 @@ No authorization required > Promise<{ response: http.IncomingMessage; body: UnifiedLeverageConfig; }> getUserLeverageCurrencyConfig(currency) -用户最大、最小可设置币种杠杆倍数 +Minimum currency leverage that can be set ### Example @@ -693,7 +695,9 @@ Promise<{ response: AxiosResponse; body: UnifiedLeverageConfig; }> [UnifiedLever > Promise<{ response: http.IncomingMessage; body: UnifiedLeverageSetting; }> getUserLeverageCurrencySetting(opts) -获取用户币种杠杆倍数,currency不传则查询全部币种 +Get the leverage multiple of the user currency + +Get the user\'s currency leverage. If currency is not passed, query all currencies. ### Example @@ -736,9 +740,9 @@ Promise<{ response: AxiosResponse; body: UnifiedLeverageSetting; }> [UnifiedLeve ## setUserLeverageCurrencySetting -> Promise<{ response: http.IncomingMessage; body?: any; }> setUserLeverageCurrencySetting(inlineObject) +> Promise<{ response: http.IncomingMessage; body?: any; }> setUserLeverageCurrencySetting(unifiedLeverageSetting) -设置借贷币种杠杆倍数 +Set the loan currency leverage ### Example @@ -751,8 +755,8 @@ const client = new GateApi.ApiClient(); client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); const api = new GateApi.UnifiedApi(client); -const inlineObject = new InlineObject(); // InlineObject | -api.setUserLeverageCurrencySetting(inlineObject) +const unifiedLeverageSetting = new UnifiedLeverageSetting(); // UnifiedLeverageSetting | +api.setUserLeverageCurrencySetting(unifiedLeverageSetting) .then(value => console.log('API called successfully.'), error => console.error(error)); ``` @@ -762,7 +766,7 @@ api.setUserLeverageCurrencySetting(inlineObject) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **inlineObject** | [**InlineObject**](InlineObject.md)| | + **unifiedLeverageSetting** | [**UnifiedLeverageSetting**](UnifiedLeverageSetting.md)| | ### Return type @@ -781,7 +785,7 @@ Promise<{ response: AxiosResponse; body?: any; }> > Promise<{ response: http.IncomingMessage; body: UnifiedHistoryLoanRate; }> getHistoryLoanRate(currency, opts) -获取历史借币利率 +get historical lending rates ### Example @@ -796,7 +800,7 @@ client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); const api = new GateApi.UnifiedApi(client); const currency = "USDT"; // string | Currency const opts = { - 'tier': "1", // string | 需要查询的上浮费率的vip等级 + 'tier': "1", // string | The VIP level of the floating rate that needs to be queried 'page': 1, // number | Page number 'limit': 100 // number | Maximum response items. Default: 100, minimum: 1, Maximum: 100 }; @@ -811,7 +815,7 @@ api.getHistoryLoanRate(currency, opts) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **currency** | **string**| Currency | [default to undefined] - **tier** | **string**| 需要查询的上浮费率的vip等级 | [optional] [default to undefined] + **tier** | **string**| The VIP level of the floating rate that needs to be queried | [optional] [default to undefined] **page** | **number**| Page number | [optional] [default to 1] **limit** | **number**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] diff --git a/docs/UnifiedBalance.md b/docs/UnifiedBalance.md index 4146f75..9f2b29d 100644 --- a/docs/UnifiedBalance.md +++ b/docs/UnifiedBalance.md @@ -4,23 +4,23 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**available** | **string** | 可用额度,在单币种保证金/跨币种保证金/组合保证金模式模式下有效,不同模式计算不一样 | [optional] [default to undefined] -**freeze** | **string** | 被锁定的额度,在单币种保证金/跨币种保证金/组合保证金模式模式下有效 | [optional] [default to undefined] -**borrowed** | **string** | 借入额度,在跨币种保证金/组合保证金模式下有效,其他如单币种保证金模式下是0 | [optional] [default to undefined] -**negativeLiab** | **string** | 负余额借贷,在跨币种保证金/组合保证金模式下有效,其他如单币种保证金模式下是0 | [optional] [default to undefined] -**futuresPosLiab** | **string** | 合约开仓借币(已废弃,待下线字段) | [optional] [default to undefined] -**equity** | **string** | 权益,在单币种保证金/跨币种保证金/组合保证金模式模式下有效 | [optional] [default to undefined] -**totalFreeze** | **string** | 总占用(已废弃,待下线字段) | [optional] [default to undefined] -**totalLiab** | **string** | 总借款,在跨币种保证金/组合保证金模式下有效,其他如单币种保证金模式下是0 | [optional] [default to undefined] -**spotInUse** | **string** | 现货对冲占用数量,在组合保证金模式下有效,其他如单币种、跨币种保证金模式下是0 | [optional] [default to undefined] -**funding** | **string** | 余币宝理财数量,在余币宝理财作为统一账户保证金开关打开有效 | [optional] [default to undefined] -**fundingVersion** | **string** | 余币宝理财版本号 | [optional] [default to undefined] -**crossBalance** | **string** | 全仓余额,在单币种保证金模式下有效,其他如跨币种保证金/组合保证金模式下是0 | [optional] [default to undefined] -**isoBalance** | **string** | 逐仓余额,在单币种保证金模式下有效,其他如跨币种保证金/组合保证金模式下是0 | [optional] [default to undefined] -**im** | **string** | 全仓初始保证金,在单币种保证金模式下有效,其他如跨币种保证金/组合保证金模式下是0 | [optional] [default to undefined] -**mm** | **string** | 全仓维持保证金率,在单币种保证金模式下有效,其他如跨币种保证金/组合保证金模式下是0 | [optional] [default to undefined] -**imr** | **string** | 全仓初始保证金率,在单币种保证金模式下有效,其他如跨币种保证金/组合保证金模式下是0 | [optional] [default to undefined] -**mmr** | **string** | 全仓维持保证金率,在单币种保证金模式下有效,其他如跨币种保证金/组合保证金模式下是0 | [optional] [default to undefined] -**marginBalance** | **string** | 全仓保证金余额,在单币种保证金模式下有效,其他如跨币种保证金/组合保证金模式下是0 | [optional] [default to undefined] -**availableMargin** | **string** | 全仓可用保证金,在单币种保证金模式下有效,其他如跨币种保证金/组合保证金模式下是0 | [optional] [default to undefined] +**available** | **string** | Available amount is valid in single currency margin/cross-currency margin/combined margin mode, and the calculation is different in different modes | [optional] [default to undefined] +**freeze** | **string** | The locked amount is valid in single currency margin/cross-currency margin/combined margin mode | [optional] [default to undefined] +**borrowed** | **string** | Borrow limit, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] [default to undefined] +**negativeLiab** | **string** | 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] [default to undefined] +**futuresPosLiab** | **string** | Contract opening position borrowing currency (abandoned, to be offline field) | [optional] [default to undefined] +**equity** | **string** | Equity, valid in single currency margin/cross currency margin/combined margin mode | [optional] [default to undefined] +**totalFreeze** | **string** | Total occupancy (discarded, to be offline field) | [optional] [default to undefined] +**totalLiab** | **string** | Total borrowing, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode | [optional] [default to undefined] +**spotInUse** | **string** | 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] [default to undefined] +**funding** | **string** | Uniloan financial management amount, effective when Uniloan financial management is turned on as a unified account margin switch | [optional] [default to undefined] +**fundingVersion** | **string** | Funding version | [optional] [default to undefined] +**crossBalance** | **string** | 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] [default to undefined] +**isoBalance** | **string** | 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] [default to undefined] +**im** | **string** | 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] [default to undefined] +**mm** | **string** | 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] [default to undefined] +**imr** | **string** | 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] [default to undefined] +**mmr** | **string** | 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] [default to undefined] +**marginBalance** | **string** | 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] [default to undefined] +**availableMargin** | **string** | 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] [default to undefined] diff --git a/docs/UnifiedHistoryLoanRate.md b/docs/UnifiedHistoryLoanRate.md index 5a0fb67..557804e 100644 --- a/docs/UnifiedHistoryLoanRate.md +++ b/docs/UnifiedHistoryLoanRate.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **currency** | **string** | Currency name | [optional] [default to undefined] -**tier** | **string** | 需要获取的上浮费率的vip等级 | [optional] [default to undefined] -**tierUpRate** | **string** | vip等级对应的上浮费率 | [optional] [default to undefined] -**rates** | [**Array<UnifiedHistoryLoanRateRates>**](UnifiedHistoryLoanRateRates.md) | 历史利率信息,每个整点小时一个数据,数组大小根据接口请求参数提供的page和limit参数确定,按照时间从近到远排序 | [optional] [default to undefined] +**tier** | **string** | The VIP level of the floating rate required | [optional] [default to undefined] +**tierUpRate** | **string** | VIP level corresponding floating rate | [optional] [default to undefined] +**rates** | [**Array<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] [default to undefined] diff --git a/docs/UnifiedHistoryLoanRateRates.md b/docs/UnifiedHistoryLoanRateRates.md index 91c8e10..2663721 100644 --- a/docs/UnifiedHistoryLoanRateRates.md +++ b/docs/UnifiedHistoryLoanRateRates.md @@ -4,6 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**time** | **number** | 该利率对应的整点小时时间戳,单位为毫秒 | [optional] [default to undefined] -**rate** | **string** | 该整点小时的历史利率 | [optional] [default to undefined] +**time** | **number** | The hourly timestamp corresponding to the interest rate, in milliseconds | [optional] [default to undefined] +**rate** | **string** | Historical interest rates for this hour | [optional] [default to undefined] diff --git a/docs/UnifiedLeverageConfig.md b/docs/UnifiedLeverageConfig.md index 1b6a7be..2f5f2e5 100644 --- a/docs/UnifiedLeverageConfig.md +++ b/docs/UnifiedLeverageConfig.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**currentLeverage** | **string** | 当前杠杆倍数 | [optional] [default to undefined] -**minLeverage** | **string** | 最小可调杠杆倍数 | [optional] [default to undefined] -**maxLeverage** | **string** | 最大可调杠杆倍数 | [optional] [default to undefined] -**debit** | **string** | 当前负债 | [optional] [default to undefined] -**availableMargin** | **string** | 可用保证金 | [optional] [default to undefined] -**borrowable** | **string** | 当前选择杠杆可借 | [optional] [default to undefined] -**exceptLeverageBorrowable** | **string** | 保证金最大可借、余币宝最大可借,两者取较小的值 | [optional] [default to undefined] +**currentLeverage** | **string** | Current leverage ratio | [optional] [default to undefined] +**minLeverage** | **string** | Minimum adjustable leverage ratio | [optional] [default to undefined] +**maxLeverage** | **string** | Maximum adjustable leverage ratio | [optional] [default to undefined] +**debit** | **string** | Current liabilities | [optional] [default to undefined] +**availableMargin** | **string** | Available Margin | [optional] [default to undefined] +**borrowable** | **string** | The current leverage you can choose is | [optional] [default to undefined] +**exceptLeverageBorrowable** | **string** | The maximum amount of margin that can be borrowed and the maximum amount of Uniloan that can be borrowed, whichever is smaller | [optional] [default to undefined] diff --git a/docs/UnifiedLeverageSetting.md b/docs/UnifiedLeverageSetting.md index e2848d4..857dfe0 100644 --- a/docs/UnifiedLeverageSetting.md +++ b/docs/UnifiedLeverageSetting.md @@ -5,5 +5,5 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **currency** | **string** | Currency name | [default to undefined] -**leverage** | **string** | 倍数 | [default to undefined] +**leverage** | **string** | multiple | [default to undefined] diff --git a/docs/UnifiedLoanRecord.md b/docs/UnifiedLoanRecord.md index bb7f35b..f920244 100644 --- a/docs/UnifiedLoanRecord.md +++ b/docs/UnifiedLoanRecord.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **id** | **number** | id | [optional] [readonly] [default to undefined] **type** | **string** | type: borrow - borrow, repay - repay | [optional] [readonly] [default to undefined] **repaymentType** | **string** | Repayment type: none - no repayment type, manual_repay - manual repayment, auto_repay - automatic repayment, cancel_auto_repay - automatic repayment after cancellation | [optional] [readonly] [default to undefined] -**borrowType** | **string** | 借款类型, 查询借款记录时返回,manual_borrow - 手动还款 , auto_borrow - 自动还款 | [optional] [default to undefined] +**borrowType** | **string** | Loan type, returned when querying loan records. manual_borrow - Manual repayment , auto_borrow - Automatic repayment | [optional] [default to undefined] **currencyPair** | **string** | Currency pair | [optional] [readonly] [default to undefined] **currency** | **string** | Currency | [optional] [readonly] [default to undefined] **amount** | **string** | The amount of lending or repaying | [optional] [readonly] [default to undefined] diff --git a/docs/UnifiedMarginTiers.md b/docs/UnifiedMarginTiers.md index a5cdffd..3302b23 100644 --- a/docs/UnifiedMarginTiers.md +++ b/docs/UnifiedMarginTiers.md @@ -5,5 +5,5 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **currency** | **string** | Currency name | [optional] [default to undefined] -**marginTiers** | [**Array<MarginTiers>**](MarginTiers.md) | 阶梯式保证金 | [optional] [default to undefined] +**marginTiers** | [**Array<MarginTiers>**](MarginTiers.md) | Margin tiers | [optional] [default to undefined] diff --git a/docs/UnifiedMode.md b/docs/UnifiedMode.md deleted file mode 100644 index c262671..0000000 --- a/docs/UnifiedMode.md +++ /dev/null @@ -1,9 +0,0 @@ -# UnifiedMode - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mode** | **string** | Portfolio mode - cross_margin : cross margin - usdt_futures : usdt futures | [default to undefined] -**enabled** | **boolean** | Is it enabled? | [default to undefined] - diff --git a/docs/UnifiedModeSet.md b/docs/UnifiedModeSet.md index 13cec35..894f284 100644 --- a/docs/UnifiedModeSet.md +++ b/docs/UnifiedModeSet.md @@ -4,6 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**mode** | **string** | 统一账户模式: - `classic`: 经典账户模式 - `multi_currency`: 跨币种保证金模式 - `portfolio`: 组合保证金模式 - `single_currency`: 单币种保证金模式 | [default to undefined] +**mode** | **string** | Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single Currency Margin Model | [default to undefined] **settings** | [**UnifiedSettings**](UnifiedSettings.md) | | [optional] [default to undefined] diff --git a/docs/UnifiedPortfolioInput.md b/docs/UnifiedPortfolioInput.md index 9f128f9..4b11dc6 100644 --- a/docs/UnifiedPortfolioInput.md +++ b/docs/UnifiedPortfolioInput.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**spotBalances** | [**Array<MockSpotBalance>**](MockSpotBalance.md) | 现货 | [optional] [default to undefined] -**spotOrders** | [**Array<MockSpotOrder>**](MockSpotOrder.md) | 现货订单 | [optional] [default to undefined] -**futuresPositions** | [**Array<MockFuturesPosition>**](MockFuturesPosition.md) | 合约仓位 | [optional] [default to undefined] -**futuresOrders** | [**Array<MockFuturesOrder>**](MockFuturesOrder.md) | 合约订单 | [optional] [default to undefined] -**optionsPositions** | [**Array<MockOptionsPosition>**](MockOptionsPosition.md) | 期权仓位 | [optional] [default to undefined] -**optionsOrders** | [**Array<MockOptionsOrder>**](MockOptionsOrder.md) | 期权订单 | [optional] [default to undefined] -**spotHedge** | **boolean** | 是否开启现货对冲 | [optional] [default to undefined] +**spotBalances** | [**Array<MockSpotBalance>**](MockSpotBalance.md) | Spot | [optional] [default to undefined] +**spotOrders** | [**Array<MockSpotOrder>**](MockSpotOrder.md) | Spot orders | [optional] [default to undefined] +**futuresPositions** | [**Array<MockFuturesPosition>**](MockFuturesPosition.md) | Futures positions | [optional] [default to undefined] +**futuresOrders** | [**Array<MockFuturesOrder>**](MockFuturesOrder.md) | Futures order | [optional] [default to undefined] +**optionsPositions** | [**Array<MockOptionsPosition>**](MockOptionsPosition.md) | Options positions | [optional] [default to undefined] +**optionsOrders** | [**Array<MockOptionsOrder>**](MockOptionsOrder.md) | Option orders | [optional] [default to undefined] +**spotHedge** | **boolean** | Whether to enable spot hedging. | [optional] [default to undefined] diff --git a/docs/UnifiedPortfolioOutput.md b/docs/UnifiedPortfolioOutput.md index 07484cb..750a835 100644 --- a/docs/UnifiedPortfolioOutput.md +++ b/docs/UnifiedPortfolioOutput.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**maintainMarginTotal** | **string** | 总维持保证金,只包含risk unit的仓位的组合保证金计算结果,不包含借币保证金。如果存在借币,实际还会产生常规的借币保证金要求。 | [optional] [default to undefined] -**initialMarginTotal** | **string** | 总起始保证金,为以下三个组合的最大计算结果:仓位、仓位+正delta挂单、仓位+负delta挂单 | [optional] [default to undefined] -**calculateTime** | **number** | 计算时间 | [optional] [default to undefined] -**riskUnit** | [**Array<MockRiskUnit>**](MockRiskUnit.md) | 风险单元 | [optional] [default to undefined] +**maintainMarginTotal** | **string** | 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] [default to undefined] +**initialMarginTotal** | **string** | Total initial margin, calculated as the maximum of the following three combinations: position, position + positive delta orders, position + negative delta orders. | [optional] [default to undefined] +**calculateTime** | **number** | Calculate time | [optional] [default to undefined] +**riskUnit** | [**Array<MockRiskUnit>**](MockRiskUnit.md) | Risk unit | [optional] [default to undefined] diff --git a/docs/UnifiedRiskUnits.md b/docs/UnifiedRiskUnits.md index cec65d0..10100e9 100644 --- a/docs/UnifiedRiskUnits.md +++ b/docs/UnifiedRiskUnits.md @@ -5,6 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **userId** | **number** | User ID | [optional] [default to undefined] -**spotHedge** | **boolean** | 现货对冲状态, true - 启用,false - 未启用 | [optional] [default to undefined] -**riskUnits** | [**Array<RiskUnits>**](RiskUnits.md) | 风险单元 | [optional] [default to undefined] +**spotHedge** | **boolean** | Spot hedging status, true - enabled, false - not enabled. | [optional] [default to undefined] +**riskUnits** | [**Array<RiskUnits>**](RiskUnits.md) | Risk unit | [optional] [default to undefined] diff --git a/docs/UnifiedSettings.md b/docs/UnifiedSettings.md index fa2f8f4..0d4167f 100644 --- a/docs/UnifiedSettings.md +++ b/docs/UnifiedSettings.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**usdtFutures** | **boolean** | USDT合约开关。跨币种保证金模式下只能打开不能关闭 | [optional] [default to undefined] -**spotHedge** | **boolean** | 现货对冲开关。 | [optional] [default to undefined] -**useFunding** | **boolean** | 余币宝开关,当mode为跨币种保证金模式时,是否将余币宝理财资金作为保证金 | [optional] [default to undefined] -**options** | **boolean** | 期权开关。跨币种保证金模式下只能打开不能关闭 | [optional] [default to undefined] +**usdtFutures** | **boolean** | USDT contract switch. In cross-currency margin mode, it can only be turned on and not off | [optional] [default to undefined] +**spotHedge** | **boolean** | Spot hedging switch. | [optional] [default to undefined] +**useFunding** | **boolean** | switch, when the mode is cross-currency margin mode, whether to use Uniloan financial funds as margin | [optional] [default to undefined] +**options** | **boolean** | Option switch. In cross-currency margin mode, it can only be turned on and not off | [optional] [default to undefined] diff --git a/docs/UserSub.md b/docs/UserSub.md index cfd96ab..952ac69 100644 --- a/docs/UserSub.md +++ b/docs/UserSub.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uid** | **number** | User ID | [optional] [default to undefined] -**belong** | **string** | 用户所属体系(partner / referral),为空表示不属于任何体系 | [optional] [default to undefined] -**type** | **number** | 类型(0-不在体系 1-直接下级代理 2-间接下级代理 3-直接直客 4-间接直客 5-普通用户) | [optional] [default to undefined] -**refUid** | **number** | 邀请人用户ID | [optional] [default to undefined] +**belong** | **string** | The system to which the user belongs (partner referral). If empty, it means not belonging to any system. | [optional] [default to undefined] +**type** | **number** | 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] [default to undefined] +**refUid** | **number** | Inviter user ID | [optional] [default to undefined] diff --git a/docs/UserSubRelation.md b/docs/UserSubRelation.md index 8826109..6ca7ad2 100644 --- a/docs/UserSubRelation.md +++ b/docs/UserSubRelation.md @@ -4,5 +4,5 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**list** | [**Array<UserSub>**](UserSub.md) | 下级关系列表 | [optional] [default to undefined] +**list** | [**Array<UserSub>**](UserSub.md) | Subordinate relationship list | [optional] [default to undefined] diff --git a/docs/WalletApi.md b/docs/WalletApi.md index 5af1554..b7ee715 100644 --- a/docs/WalletApi.md +++ b/docs/WalletApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**listSubAccountTransfers**](WalletApi.md#listSubAccountTransfers) | **GET** /wallet/sub_account_transfers | Retrieve transfer records between main and sub accounts [**transferWithSubAccount**](WalletApi.md#transferWithSubAccount) | **POST** /wallet/sub_account_transfers | Transfer between main and sub accounts [**subAccountToSubAccount**](WalletApi.md#subAccountToSubAccount) | **POST** /wallet/sub_account_to_sub_account | Sub-account transfers to sub-account -[**getTransferOrderStatus**](WalletApi.md#getTransferOrderStatus) | **GET** /wallet/order_status | 划转状态查询 +[**getTransferOrderStatus**](WalletApi.md#getTransferOrderStatus) | **GET** /wallet/order_status | Transfer status query [**listWithdrawStatus**](WalletApi.md#listWithdrawStatus) | **GET** /wallet/withdraw_status | Retrieve withdrawal status [**listSubAccountBalances**](WalletApi.md#listSubAccountBalances) | **GET** /wallet/sub_account_balances | Retrieve sub account balances [**listSubAccountMarginBalances**](WalletApi.md#listSubAccountMarginBalances) | **GET** /wallet/sub_account_margin_balances | Query sub accounts\' margin balances @@ -24,7 +24,7 @@ Method | HTTP request | Description [**listSmallBalance**](WalletApi.md#listSmallBalance) | **GET** /wallet/small_balance | List small balance [**convertSmallBalance**](WalletApi.md#convertSmallBalance) | **POST** /wallet/small_balance | Convert small balance [**listSmallBalanceHistory**](WalletApi.md#listSmallBalanceHistory) | **GET** /wallet/small_balance_history | List small balance history -[**listPushOrders**](WalletApi.md#listPushOrders) | **GET** /wallet/push | 获取UID转帐历史纪录 +[**listPushOrders**](WalletApi.md#listPushOrders) | **GET** /wallet/push | Retrieve the UID transfer history ## listCurrencyChains @@ -227,7 +227,7 @@ Promise<{ response: AxiosResponse; body: Array; }> [LedgerRecord]( Transfer between trading accounts -个人交易账户之间的余额互转,目前支持以下互转操作: 1. 现货账户 - 杠杆账户 2. 现货账户 - 永续合约账户 3. 现货账户 - 交割合约账户 4. 现货账户 - 期权账户 +Transfer between different accounts. Currently support transfers between the following: 1. spot - margin 2. spot - futures(perpetual) 3. spot - delivery 4. spot - options ### Example @@ -413,11 +413,11 @@ Promise<{ response: AxiosResponse; body: TransactionID; }> [TransactionID](Trans ## getTransferOrderStatus -> Promise<{ response: http.IncomingMessage; body: InlineResponse200; }> getTransferOrderStatus(opts) +> Promise<{ response: http.IncomingMessage; body: TransferOrderStatus; }> getTransferOrderStatus(opts) -划转状态查询 +Transfer status query -支持根据用户自定义client_order_id或者划转接口返回的tx_id查询划转状态 +Support querying transfer status based on user-defined client_order_id or tx_id returned by the transfer interface ### Example @@ -432,7 +432,7 @@ client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); const api = new GateApi.WalletApi(client); const opts = { 'clientOrderId': "da3ce7a088c8b0372b741419c7829033", // string | 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. - 'txId': "59636381286" // string | 划转操作单号,和client_order_id不能同时为空 + 'txId': "59636381286" // string | The transfer operation number and client_order_id cannot be empty at the same time }; api.getTransferOrderStatus(opts) .then(value => console.log('API called successfully. Returned data: ', value.body), @@ -445,11 +445,11 @@ api.getTransferOrderStatus(opts) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **clientOrderId** | **string**| 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] [default to undefined] - **txId** | **string**| 划转操作单号,和client_order_id不能同时为空 | [optional] [default to undefined] + **txId** | **string**| The transfer operation number and client_order_id cannot be empty at the same time | [optional] [default to undefined] ### Return type -Promise<{ response: AxiosResponse; body: InlineResponse200; }> [InlineResponse200](InlineResponse200.md) +Promise<{ response: AxiosResponse; body: TransferOrderStatus; }> [TransferOrderStatus](TransferOrderStatus.md) ### Authorization @@ -967,7 +967,7 @@ Promise<{ response: AxiosResponse; body: Array; }> [SmallBa > Promise<{ response: http.IncomingMessage; body: Array; }> listPushOrders(opts) -获取UID转帐历史纪录 +Retrieve the UID transfer history ### Example @@ -982,11 +982,11 @@ client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); const api = new GateApi.WalletApi(client); const opts = { 'id': 56, // number | Order ID - 'from': 56, // number | 查询记录的起始时间,不指定则默认从当前时间开始向前推7天,秒级Unix的时间戳 - 'to': 56, // number | 查询记录的结束时间,不指定则默认为当前时间,秒级Unix的时间戳 - 'limit': 100, // number | 列表返回的最大数量,默认值是 100 + 'from': 56, // number | The start time of the query record. If not specified, it defaults to 7 days forward from the current time, in seconds Unix timestamp + 'to': 56, // number | The end time of the query record. If not specified, the default is the current time, which is a Unix timestamp in seconds. + 'limit': 100, // number | The maximum number of items returned in the list, the default value is 100 'offset': 0, // number | List offset, starting from 0 - 'transactionType': 'withdraw' // string | 列表返回订单类型 `withdraw`, `deposit`,默认为`withdraw`. + 'transactionType': 'withdraw' // string | The list returns the order type `withdraw`, `deposit`, the default is `withdraw`. }; api.listPushOrders(opts) .then(value => console.log('API called successfully. Returned data: ', value.body), @@ -999,11 +999,11 @@ api.listPushOrders(opts) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **number**| Order ID | [optional] [default to undefined] - **from** | **number**| 查询记录的起始时间,不指定则默认从当前时间开始向前推7天,秒级Unix的时间戳 | [optional] [default to undefined] - **to** | **number**| 查询记录的结束时间,不指定则默认为当前时间,秒级Unix的时间戳 | [optional] [default to undefined] - **limit** | **number**| 列表返回的最大数量,默认值是 100 | [optional] [default to 100] + **from** | **number**| 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] [default to undefined] + **to** | **number**| The end time of the query record. If not specified, the default is the current time, which is a Unix timestamp in seconds. | [optional] [default to undefined] + **limit** | **number**| The maximum number of items returned in the list, the default value is 100 | [optional] [default to 100] **offset** | **number**| List offset, starting from 0 | [optional] [default to 0] - **transactionType** | **string**| 列表返回订单类型 `withdraw`, `deposit`,默认为`withdraw`. | [optional] [default to 'withdraw'] + **transactionType** | **string**| The list returns the order type `withdraw`, `deposit`, the default is `withdraw`. | [optional] [default to 'withdraw'] ### Return type diff --git a/docs/WithdrawalApi.md b/docs/WithdrawalApi.md index 3c1622e..e27beeb 100644 --- a/docs/WithdrawalApi.md +++ b/docs/WithdrawalApi.md @@ -5,7 +5,7 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- [**withdraw**](WithdrawalApi.md#withdraw) | **POST** /withdrawals | Withdraw -[**withdrawPushOrder**](WithdrawalApi.md#withdrawPushOrder) | **POST** /withdrawals/push | UID 转帐 +[**withdrawPushOrder**](WithdrawalApi.md#withdrawPushOrder) | **POST** /withdrawals/push | UID transfer [**cancelWithdrawal**](WithdrawalApi.md#cancelWithdrawal) | **DELETE** /withdrawals/{withdrawal_id} | Cancel withdrawal with specified ID @@ -15,7 +15,7 @@ Method | HTTP request | Description Withdraw -如果对方的链上地址也是Gate的话, 则不收取手续费 +Withdrawals to Gate addresses do not incur transaction fees. ### Example @@ -58,9 +58,9 @@ Promise<{ response: AxiosResponse; body: LedgerRecord; }> [LedgerRecord](LedgerR > Promise<{ response: http.IncomingMessage; body: UidPushWithdrawalResp; }> withdrawPushOrder(uidPushWithdrawal) -UID 转帐 +UID transfer -现货主账号之间转帐,转帐双方不可为子账号 +Transfers between main spot accounts are allowed; however, both parties cannot be sub-accounts ### Example diff --git a/docs/WithdrawalRecord.md b/docs/WithdrawalRecord.md index 23d4bf0..8995ef9 100644 --- a/docs/WithdrawalRecord.md +++ b/docs/WithdrawalRecord.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **currency** | **string** | Currency name | [default to undefined] **address** | **string** | Withdrawal address. Required for withdrawals | [optional] [default to undefined] **memo** | **string** | Additional remarks with regards to the withdrawal | [optional] [default to undefined] -**status** | **string** | 交易状态 - DONE: 完成 (block_number > 0 才算真的上链完成) - CANCEL: 已取消 - REQUEST: 请求中 - MANUAL: 待人工审核 - BCODE: 充值码操作 - EXTPEND: 已经发送等待确认 - FAIL: 链上失败等待确认 - INVALID: 无效订单 - VERIFY: 验证中 - PROCES: 处理中 - PEND: 处理中 - DMOVE: 待人工审核 - SPLITPEND: cny提现大于5w,自动分单 | [optional] [readonly] [default to undefined] +**status** | **string** | 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 - SPLITPEND: cny withdrawal is greater than 50,000, orders will be split automatically | [optional] [readonly] [default to undefined] **chain** | **string** | Name of the chain used in withdrawals | [default to undefined] ## Enum: WithdrawalRecord.Status diff --git a/model/accountBalance.ts b/model/accountBalance.ts index a3f4411..8126060 100644 --- a/model/accountBalance.ts +++ b/model/accountBalance.ts @@ -9,51 +9,51 @@ * Do not edit the class manually. */ + /** - * Total balances calculated with specified currency unit - */ +* Total balances calculated with specified currency unit +*/ export class AccountBalance { /** - * Account total balance amount - */ + * Account total balance amount + */ 'amount'?: string; /** - * Currency - */ + * Currency + */ 'currency'?: AccountBalance.Currency; /** - * Unrealised_pnl, this field will only appear in futures, options, delivery, and total accounts - */ + * Unrealised_pnl, this field will only appear in futures, options, delivery, and total accounts + */ 'unrealisedPnl'?: string; /** - * Borrowed,this field will only appear in margin and cross_margin accounts - */ + * Borrowed,this field will only appear in margin and cross_margin accounts + */ 'borrowed'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'currency', - baseName: 'currency', - type: 'AccountBalance.Currency', + "name": "currency", + "baseName": "currency", + "type": "AccountBalance.Currency" }, { - name: 'unrealisedPnl', - baseName: 'unrealised_pnl', - type: 'string', + "name": "unrealisedPnl", + "baseName": "unrealised_pnl", + "type": "string" }, { - name: 'borrowed', - baseName: 'borrowed', - type: 'string', - }, - ]; + "name": "borrowed", + "baseName": "borrowed", + "type": "string" + } ]; static getAttributeTypeMap() { return AccountBalance.attributeTypeMap; @@ -62,9 +62,9 @@ export class AccountBalance { export namespace AccountBalance { export enum Currency { - BTC = 'BTC', - CNY = 'CNY', - USD = 'USD', - USDT = 'USDT', + BTC = 'BTC', + CNY = 'CNY', + USD = 'USD', + USDT = 'USDT' } } diff --git a/model/accountDetail.ts b/model/accountDetail.ts index ed14730..884e2cf 100644 --- a/model/accountDetail.ts +++ b/model/accountDetail.ts @@ -12,67 +12,67 @@ import { AccountDetailKey } from './accountDetailKey'; /** - * Account detail - */ +* Account detail +*/ export class AccountDetail { /** - * IP whitelist - */ + * IP whitelist + */ 'ipWhitelist'?: Array; /** - * CurrencyPair whitelisting - */ + * CurrencyPair whitelisting + */ 'currencyPairs'?: Array; /** - * User ID - */ + * User ID + */ 'userId'?: number; /** - * User VIP level - */ + * User VIP level + */ 'tier'?: number; 'key'?: AccountDetailKey; /** - * 用户角色: 0 - 普通用户 1 - 带单者 2 - 跟单者 3 - 带单者与跟单者 - */ + * User role: 0 - Ordinary user 1 - Order leader 2 - Follower 3 - Order leader and follower + */ 'copyTradingRole'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'ipWhitelist', - baseName: 'ip_whitelist', - type: 'Array', + "name": "ipWhitelist", + "baseName": "ip_whitelist", + "type": "Array" }, { - name: 'currencyPairs', - baseName: 'currency_pairs', - type: 'Array', + "name": "currencyPairs", + "baseName": "currency_pairs", + "type": "Array" }, { - name: 'userId', - baseName: 'user_id', - type: 'number', + "name": "userId", + "baseName": "user_id", + "type": "number" }, { - name: 'tier', - baseName: 'tier', - type: 'number', + "name": "tier", + "baseName": "tier", + "type": "number" }, { - name: 'key', - baseName: 'key', - type: 'AccountDetailKey', + "name": "key", + "baseName": "key", + "type": "AccountDetailKey" }, { - name: 'copyTradingRole', - baseName: 'copy_trading_role', - type: 'number', - }, - ]; + "name": "copyTradingRole", + "baseName": "copy_trading_role", + "type": "number" + } ]; static getAttributeTypeMap() { return AccountDetail.attributeTypeMap; } } + diff --git a/model/accountDetailKey.ts b/model/accountDetailKey.ts index 3799d6c..7ca7a47 100644 --- a/model/accountDetailKey.ts +++ b/model/accountDetailKey.ts @@ -9,26 +9,27 @@ * Do not edit the class manually. */ + /** - * API Key detail - */ +* API Key detail +*/ export class AccountDetailKey { /** - * mode: 1 - classic account 2 - portfolio margin account - */ + * mode: 1 - classic account 2 - portfolio margin account + */ 'mode'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'mode', - baseName: 'mode', - type: 'number', - }, - ]; + "name": "mode", + "baseName": "mode", + "type": "number" + } ]; static getAttributeTypeMap() { return AccountDetailKey.attributeTypeMap; } } + diff --git a/model/accountRateLimit.ts b/model/accountRateLimit.ts index 935d9c1..6e86011 100644 --- a/model/accountRateLimit.ts +++ b/model/accountRateLimit.ts @@ -9,50 +9,51 @@ * Do not edit the class manually. */ + export class AccountRateLimit { /** - * 限频等级(详细限频规则查看[成交比率限频](#成交比率限频)) - */ + * Frequency limit level (For detailed frequency limit rules, see [Transaction ratio frequency limit](#rate-limit-based-on-fill-ratio)) + */ 'tier'?: string; /** - * 成交率 - */ + * Transaction rate + */ 'ratio'?: string; /** - * 主账户合计成交比率 - */ + * Total transaction ratio of main account + */ 'mainRatio'?: string; /** - * 更新时间 - */ + * Update time + */ 'updatedAt'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'tier', - baseName: 'tier', - type: 'string', + "name": "tier", + "baseName": "tier", + "type": "string" }, { - name: 'ratio', - baseName: 'ratio', - type: 'string', + "name": "ratio", + "baseName": "ratio", + "type": "string" }, { - name: 'mainRatio', - baseName: 'main_ratio', - type: 'string', + "name": "mainRatio", + "baseName": "main_ratio", + "type": "string" }, { - name: 'updatedAt', - baseName: 'updated_at', - type: 'string', - }, - ]; + "name": "updatedAt", + "baseName": "updated_at", + "type": "string" + } ]; static getAttributeTypeMap() { return AccountRateLimit.attributeTypeMap; } } + diff --git a/model/agencyCommission.ts b/model/agencyCommission.ts index 580793e..3050b13 100644 --- a/model/agencyCommission.ts +++ b/model/agencyCommission.ts @@ -9,68 +9,69 @@ * Do not edit the class manually. */ + export class AgencyCommission { /** - * Commission Time. (unix timestamp) - */ + * Commission Time. (unix timestamp) + */ 'commissionTime'?: number; /** - * User ID - */ + * User ID + */ 'userId'?: number; /** - * Group name - */ + * Group name + */ 'groupName'?: string; /** - * Commission Amount - */ + * Commission Amount + */ 'commissionAmount'?: string; /** - * Commission Asset - */ + * Commission Asset + */ 'commissionAsset'?: string; /** - * Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate - */ + * Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate + */ 'source'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'commissionTime', - baseName: 'commission_time', - type: 'number', + "name": "commissionTime", + "baseName": "commission_time", + "type": "number" }, { - name: 'userId', - baseName: 'user_id', - type: 'number', + "name": "userId", + "baseName": "user_id", + "type": "number" }, { - name: 'groupName', - baseName: 'group_name', - type: 'string', + "name": "groupName", + "baseName": "group_name", + "type": "string" }, { - name: 'commissionAmount', - baseName: 'commission_amount', - type: 'string', + "name": "commissionAmount", + "baseName": "commission_amount", + "type": "string" }, { - name: 'commissionAsset', - baseName: 'commission_asset', - type: 'string', + "name": "commissionAsset", + "baseName": "commission_asset", + "type": "string" }, { - name: 'source', - baseName: 'source', - type: 'string', - }, - ]; + "name": "source", + "baseName": "source", + "type": "string" + } ]; static getAttributeTypeMap() { return AgencyCommission.attributeTypeMap; } } + diff --git a/model/agencyCommissionHistory.ts b/model/agencyCommissionHistory.ts index 083d02b..489c744 100644 --- a/model/agencyCommissionHistory.ts +++ b/model/agencyCommissionHistory.ts @@ -13,39 +13,39 @@ import { AgencyCommission } from './agencyCommission'; export class AgencyCommissionHistory { /** - * Currency pair - */ + * Currency pair + */ 'currencyPair'?: string; /** - * Total - */ + * Total + */ 'total'?: number; /** - * List of comission history - */ + * List of comission history + */ 'list'?: Array; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" }, { - name: 'total', - baseName: 'total', - type: 'number', + "name": "total", + "baseName": "total", + "type": "number" }, { - name: 'list', - baseName: 'list', - type: 'Array', - }, - ]; + "name": "list", + "baseName": "list", + "type": "Array" + } ]; static getAttributeTypeMap() { return AgencyCommissionHistory.attributeTypeMap; } } + diff --git a/model/agencyTransaction.ts b/model/agencyTransaction.ts index 0feae31..7955c53 100644 --- a/model/agencyTransaction.ts +++ b/model/agencyTransaction.ts @@ -9,95 +9,96 @@ * Do not edit the class manually. */ + export class AgencyTransaction { /** - * Transaction Time. (unix timestamp) - */ + * Transaction Time. (unix timestamp) + */ 'transactionTime'?: number; /** - * User ID - */ + * User ID + */ 'userId'?: number; /** - * Group name - */ + * Group name + */ 'groupName'?: string; /** - * Fee - */ + * Fee + */ 'fee'?: string; /** - * Fee currency - */ + * Fee currency + */ 'feeAsset'?: string; /** - * Currency pair - */ + * Currency pair + */ 'currencyPair'?: string; /** - * Commission Amount - */ + * Commission Amount + */ 'amount'?: string; /** - * Commission Asset - */ + * Commission Asset + */ 'amountAsset'?: string; /** - * Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate - */ + * Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate + */ 'source'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'transactionTime', - baseName: 'transaction_time', - type: 'number', + "name": "transactionTime", + "baseName": "transaction_time", + "type": "number" }, { - name: 'userId', - baseName: 'user_id', - type: 'number', + "name": "userId", + "baseName": "user_id", + "type": "number" }, { - name: 'groupName', - baseName: 'group_name', - type: 'string', + "name": "groupName", + "baseName": "group_name", + "type": "string" }, { - name: 'fee', - baseName: 'fee', - type: 'string', + "name": "fee", + "baseName": "fee", + "type": "string" }, { - name: 'feeAsset', - baseName: 'fee_asset', - type: 'string', + "name": "feeAsset", + "baseName": "fee_asset", + "type": "string" }, { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'amountAsset', - baseName: 'amount_asset', - type: 'string', + "name": "amountAsset", + "baseName": "amount_asset", + "type": "string" }, { - name: 'source', - baseName: 'source', - type: 'string', - }, - ]; + "name": "source", + "baseName": "source", + "type": "string" + } ]; static getAttributeTypeMap() { return AgencyTransaction.attributeTypeMap; } } + diff --git a/model/agencyTransactionHistory.ts b/model/agencyTransactionHistory.ts index 7de9370..84cc103 100644 --- a/model/agencyTransactionHistory.ts +++ b/model/agencyTransactionHistory.ts @@ -13,39 +13,39 @@ import { AgencyTransaction } from './agencyTransaction'; export class AgencyTransactionHistory { /** - * Currency pair - */ + * Currency pair + */ 'currencyPair'?: string; /** - * Total - */ + * Total + */ 'total'?: number; /** - * List of transaction history - */ + * List of transaction history + */ 'list'?: Array; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" }, { - name: 'total', - baseName: 'total', - type: 'number', + "name": "total", + "baseName": "total", + "type": "number" }, { - name: 'list', - baseName: 'list', - type: 'Array', - }, - ]; + "name": "list", + "baseName": "list", + "type": "Array" + } ]; static getAttributeTypeMap() { return AgencyTransactionHistory.attributeTypeMap; } } + diff --git a/model/amendOrderResult.ts b/model/amendOrderResult.ts deleted file mode 100644 index 9cd1703..0000000 --- a/model/amendOrderResult.ts +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Gate API v4 - * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. - * - * Contact: support@mail.gate.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Batch order modification results - */ -export class AmendOrderResult { - /** - * Order ID - */ - 'orderId'?: string; - /** - * Trade amount - */ - 'amount'?: string; - /** - * Order price - */ - 'price'?: string; - /** - * The custom data that the user remarked when amending the order - */ - 'amendText'?: string; - /** - * Update success status - */ - 'succeeded'?: boolean; - /** - * Error indicator for failed modifications; empty when successful - */ - 'label'?: string; - /** - * Error description for failed modifications; empty when successful - */ - 'message'?: string; - /** - * Account types, spot - spot account, margin - margin account, unified - unified account, cross_margin - cross margin account.Portfolio margin accounts can only be set to `cross_margin` - */ - 'account'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ - { - name: 'orderId', - baseName: 'order_id', - type: 'string', - }, - { - name: 'amount', - baseName: 'amount', - type: 'string', - }, - { - name: 'price', - baseName: 'price', - type: 'string', - }, - { - name: 'amendText', - baseName: 'amend_text', - type: 'string', - }, - { - name: 'succeeded', - baseName: 'succeeded', - type: 'boolean', - }, - { - name: 'label', - baseName: 'label', - type: 'string', - }, - { - name: 'message', - baseName: 'message', - type: 'string', - }, - { - name: 'account', - baseName: 'account', - type: 'string', - }, - ]; - - static getAttributeTypeMap() { - return AmendOrderResult.attributeTypeMap; - } -} diff --git a/model/apiV4KeyPerm.ts b/model/apiV4KeyPerm.ts deleted file mode 100644 index be9f9c8..0000000 --- a/model/apiV4KeyPerm.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Gate API v4 - * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. - * - * Contact: support@mail.gate.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export class ApiV4KeyPerm { - /** - * Permission name (all permissions will be removed if no value is passed) - wallet: wallet - spot: spot/margin - futures: perpetual contract - delivery: delivery - earn: earn - options: options\\m- account: Account - unified: unified - loan: Loan - */ - 'name'?: ApiV4KeyPerm.Name; - /** - * read only - */ - 'readOnly'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ - { - name: 'name', - baseName: 'name', - type: 'ApiV4KeyPerm.Name', - }, - { - name: 'readOnly', - baseName: 'read_only', - type: 'boolean', - }, - ]; - - static getAttributeTypeMap() { - return ApiV4KeyPerm.attributeTypeMap; - } -} - -export namespace ApiV4KeyPerm { - export enum Name { - Wallet = 'wallet', - Spot = 'spot', - Futures = 'futures', - Delivery = 'delivery', - Earn = 'earn', - Options = 'options', - Account = 'account', - Unified = 'unified', - Loan = 'loan', - } -} diff --git a/model/autoRepaySetting.ts b/model/autoRepaySetting.ts index bcf9e0f..2b1bda7 100644 --- a/model/autoRepaySetting.ts +++ b/model/autoRepaySetting.ts @@ -9,21 +9,21 @@ * Do not edit the class manually. */ + export class AutoRepaySetting { /** - * Auto repayment status. `on` - enabled, `off` - disabled - */ + * Auto repayment status. `on` - enabled, `off` - disabled + */ 'status'?: AutoRepaySetting.Status; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'status', - baseName: 'status', - type: 'AutoRepaySetting.Status', - }, - ]; + "name": "status", + "baseName": "status", + "type": "AutoRepaySetting.Status" + } ]; static getAttributeTypeMap() { return AutoRepaySetting.attributeTypeMap; @@ -32,7 +32,7 @@ export class AutoRepaySetting { export namespace AutoRepaySetting { export enum Status { - On = 'on', - Off = 'off', + On = 'on', + Off = 'off' } } diff --git a/model/batchAmendItem.ts b/model/batchAmendItem.ts index c82734d..47b0bc6 100644 --- a/model/batchAmendItem.ts +++ b/model/batchAmendItem.ts @@ -9,80 +9,81 @@ * Do not edit the class manually. */ + /** - * Order information that needs to be modified - */ +* Order information that needs to be modified +*/ export class BatchAmendItem { /** - * The order ID returned upon successful creation or the custom ID specified by the user during creation (i.e., the \'text\' field). - */ + * The order ID returned upon successful creation or the custom ID specified by the user during creation (i.e., the \'text\' field). + */ 'orderId': string; /** - * Currency pair - */ + * Currency pair + */ 'currencyPair': string; /** - * Default to spot, portfolio, and margin accounts if not specified. Use \'cross_margin\' to query cross margin accounts. Only \'cross_margin\' can be specified for portfolio margin accounts. - */ + * Default to spot, portfolio, and margin accounts if not specified. Use \'cross_margin\' to query cross margin accounts. Only \'cross_margin\' can be specified for portfolio margin accounts. + */ 'account'?: string; /** - * trade amount, only one of amount and price can be specified - */ + * trade amount, only one of amount and price can be specified + */ 'amount'?: string; /** - * trade price, only one of amount and price can be specified - */ + * trade price, only one of amount and price can be specified + */ 'price'?: string; /** - * Custom info during amending order - */ + * Custom info during amending order + */ 'amendText'?: string; /** - * 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) - */ + * 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) + */ 'actionMode'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'orderId', - baseName: 'order_id', - type: 'string', + "name": "orderId", + "baseName": "order_id", + "type": "string" }, { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" }, { - name: 'account', - baseName: 'account', - type: 'string', + "name": "account", + "baseName": "account", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'price', - baseName: 'price', - type: 'string', + "name": "price", + "baseName": "price", + "type": "string" }, { - name: 'amendText', - baseName: 'amend_text', - type: 'string', + "name": "amendText", + "baseName": "amend_text", + "type": "string" }, { - name: 'actionMode', - baseName: 'action_mode', - type: 'string', - }, - ]; + "name": "actionMode", + "baseName": "action_mode", + "type": "string" + } ]; static getAttributeTypeMap() { return BatchAmendItem.attributeTypeMap; } } + diff --git a/model/batchAmendOrderReq.ts b/model/batchAmendOrderReq.ts index 0fee4dc..45219f5 100644 --- a/model/batchAmendOrderReq.ts +++ b/model/batchAmendOrderReq.ts @@ -9,62 +9,63 @@ * Do not edit the class manually. */ + /** - * 修改合约订单参数 - */ +* Modify contract order parameters +*/ export class BatchAmendOrderReq { /** - * 订单id,order_id和text至少传一个 - */ + * Order id, order_id and text must contain at least one + */ 'orderId'?: number; /** - * 用户自定义订单text,order_id和text至少传一个 - */ + * User-defined order text, at least one of order_id and text must be passed + */ 'text'?: string; /** - * 新的委托大小。包括已成交委托的部分。 - 如果小于等于已成交数量,则撤销委托。 - 新的委托买卖方向必须跟原有的一致。 - 不能修改平仓单的size。 - 对于只减仓委托,如果调大size,则可能踢出其他只减仓委托。 - 如果不修改价格,则调小size不会影响深度排队,调大size会排到当前价位最后。 - */ + * 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. + */ 'size'?: number; /** - * New order price. - */ + * New order price. + */ 'price'?: string; /** - * Custom info during amending order - */ + * Custom info during amending order + */ 'amendText'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'orderId', - baseName: 'order_id', - type: 'number', + "name": "orderId", + "baseName": "order_id", + "type": "number" }, { - name: 'text', - baseName: 'text', - type: 'string', + "name": "text", + "baseName": "text", + "type": "string" }, { - name: 'size', - baseName: 'size', - type: 'number', + "name": "size", + "baseName": "size", + "type": "number" }, { - name: 'price', - baseName: 'price', - type: 'string', + "name": "price", + "baseName": "price", + "type": "string" }, { - name: 'amendText', - baseName: 'amend_text', - type: 'string', - }, - ]; + "name": "amendText", + "baseName": "amend_text", + "type": "string" + } ]; static getAttributeTypeMap() { return BatchAmendOrderReq.attributeTypeMap; } } + diff --git a/model/batchFuturesOrder.ts b/model/batchFuturesOrder.ts index 35f46cc..2bcd2ee 100644 --- a/model/batchFuturesOrder.ts +++ b/model/batchFuturesOrder.ts @@ -9,267 +9,267 @@ * Do not edit the class manually. */ + /** - * Futures order details - */ +* Futures order details +*/ export class BatchFuturesOrder { /** - * Whether the batch of orders succeeded - */ + * Whether the batch of orders succeeded + */ 'succeeded'?: boolean; /** - * Error label, only exists if execution fails - */ + * Error label, only exists if execution fails + */ 'label'?: string; /** - * Error detail, only present if execution failed and details need to be given - */ + * Error detail, only present if execution failed and details need to be given + */ 'detail'?: string; /** - * Futures order ID - */ + * Futures order ID + */ 'id'?: number; /** - * User ID - */ + * User ID + */ 'user'?: number; /** - * Creation time of order - */ + * Creation time of order + */ 'createTime'?: number; /** - * Order finished time. Not returned if order is open - */ + * Order finished time. Not returned if order is open + */ 'finishTime'?: number; /** - * How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close - stp: cancelled because self trade prevention - */ + * 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 + */ 'finishAs'?: BatchFuturesOrder.FinishAs; /** - * Order status - `open`: waiting to be traded - `finished`: finished - */ + * Order status - `open`: waiting to be traded - `finished`: finished + */ 'status'?: BatchFuturesOrder.Status; /** - * Futures contract - */ + * Futures contract + */ 'contract'?: string; /** - * Order size. Specify positive number to make a bid, and negative number to ask - */ + * Order size. Specify positive number to make a bid, and negative number to ask + */ 'size'?: number; /** - * Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size - */ + * Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size + */ 'iceberg'?: number; /** - * Order price. 0 for market order with `tif` set as `ioc` - */ + * Order price. 0 for market order with `tif` set as `ioc` + */ 'price'?: string; /** - * Set as `true` to close the position, with `size` set to 0 - */ + * Set as `true` to close the position, with `size` set to 0 + */ 'close'?: boolean; /** - * Is the order to close position - */ + * Is the order to close position + */ 'isClose'?: boolean; /** - * Set as `true` to be reduce-only order - */ + * Set as `true` to be reduce-only order + */ 'reduceOnly'?: boolean; /** - * Is the order reduce-only - */ + * Is the order reduce-only + */ 'isReduceOnly'?: boolean; /** - * Is the order for liquidation - */ + * Is the order for liquidation + */ 'isLiq'?: boolean; /** - * 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 - */ + * 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 + */ 'tif'?: BatchFuturesOrder.Tif; /** - * Size left to be traded - */ + * Size left to be traded + */ 'left'?: number; /** - * Fill price of the order - */ + * Fill price of the order + */ 'fillPrice'?: string; /** - * 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 - */ + * 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 + */ 'text'?: string; /** - * Taker fee - */ + * Taker fee + */ 'tkfr'?: string; /** - * Maker fee - */ + * Maker fee + */ 'mkfr'?: string; /** - * Reference user ID - */ + * Reference user ID + */ 'refu'?: number; /** - * 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 - */ + * 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 + */ 'autoSize'?: BatchFuturesOrder.AutoSize; /** - * 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 - */ + * 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 + */ 'stpAct'?: BatchFuturesOrder.StpAct; /** - * 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` - */ + * 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` + */ 'stpId'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'succeeded', - baseName: 'succeeded', - type: 'boolean', + "name": "succeeded", + "baseName": "succeeded", + "type": "boolean" }, { - name: 'label', - baseName: 'label', - type: 'string', + "name": "label", + "baseName": "label", + "type": "string" }, { - name: 'detail', - baseName: 'detail', - type: 'string', + "name": "detail", + "baseName": "detail", + "type": "string" }, { - name: 'id', - baseName: 'id', - type: 'number', + "name": "id", + "baseName": "id", + "type": "number" }, { - name: 'user', - baseName: 'user', - type: 'number', + "name": "user", + "baseName": "user", + "type": "number" }, { - name: 'createTime', - baseName: 'create_time', - type: 'number', + "name": "createTime", + "baseName": "create_time", + "type": "number" }, { - name: 'finishTime', - baseName: 'finish_time', - type: 'number', + "name": "finishTime", + "baseName": "finish_time", + "type": "number" }, { - name: 'finishAs', - baseName: 'finish_as', - type: 'BatchFuturesOrder.FinishAs', + "name": "finishAs", + "baseName": "finish_as", + "type": "BatchFuturesOrder.FinishAs" }, { - name: 'status', - baseName: 'status', - type: 'BatchFuturesOrder.Status', + "name": "status", + "baseName": "status", + "type": "BatchFuturesOrder.Status" }, { - name: 'contract', - baseName: 'contract', - type: 'string', + "name": "contract", + "baseName": "contract", + "type": "string" }, { - name: 'size', - baseName: 'size', - type: 'number', + "name": "size", + "baseName": "size", + "type": "number" }, { - name: 'iceberg', - baseName: 'iceberg', - type: 'number', + "name": "iceberg", + "baseName": "iceberg", + "type": "number" }, { - name: 'price', - baseName: 'price', - type: 'string', + "name": "price", + "baseName": "price", + "type": "string" }, { - name: 'close', - baseName: 'close', - type: 'boolean', + "name": "close", + "baseName": "close", + "type": "boolean" }, { - name: 'isClose', - baseName: 'is_close', - type: 'boolean', + "name": "isClose", + "baseName": "is_close", + "type": "boolean" }, { - name: 'reduceOnly', - baseName: 'reduce_only', - type: 'boolean', + "name": "reduceOnly", + "baseName": "reduce_only", + "type": "boolean" }, { - name: 'isReduceOnly', - baseName: 'is_reduce_only', - type: 'boolean', + "name": "isReduceOnly", + "baseName": "is_reduce_only", + "type": "boolean" }, { - name: 'isLiq', - baseName: 'is_liq', - type: 'boolean', + "name": "isLiq", + "baseName": "is_liq", + "type": "boolean" }, { - name: 'tif', - baseName: 'tif', - type: 'BatchFuturesOrder.Tif', + "name": "tif", + "baseName": "tif", + "type": "BatchFuturesOrder.Tif" }, { - name: 'left', - baseName: 'left', - type: 'number', + "name": "left", + "baseName": "left", + "type": "number" }, { - name: 'fillPrice', - baseName: 'fill_price', - type: 'string', + "name": "fillPrice", + "baseName": "fill_price", + "type": "string" }, { - name: 'text', - baseName: 'text', - type: 'string', + "name": "text", + "baseName": "text", + "type": "string" }, { - name: 'tkfr', - baseName: 'tkfr', - type: 'string', + "name": "tkfr", + "baseName": "tkfr", + "type": "string" }, { - name: 'mkfr', - baseName: 'mkfr', - type: 'string', + "name": "mkfr", + "baseName": "mkfr", + "type": "string" }, { - name: 'refu', - baseName: 'refu', - type: 'number', + "name": "refu", + "baseName": "refu", + "type": "number" }, { - name: 'autoSize', - baseName: 'auto_size', - type: 'BatchFuturesOrder.AutoSize', + "name": "autoSize", + "baseName": "auto_size", + "type": "BatchFuturesOrder.AutoSize" }, { - name: 'stpAct', - baseName: 'stp_act', - type: 'BatchFuturesOrder.StpAct', + "name": "stpAct", + "baseName": "stp_act", + "type": "BatchFuturesOrder.StpAct" }, { - name: 'stpId', - baseName: 'stp_id', - type: 'number', - }, - ]; + "name": "stpId", + "baseName": "stp_id", + "type": "number" + } ]; static getAttributeTypeMap() { return BatchFuturesOrder.attributeTypeMap; @@ -278,34 +278,34 @@ export class BatchFuturesOrder { export namespace BatchFuturesOrder { export enum FinishAs { - Filled = 'filled', - Cancelled = 'cancelled', - Liquidated = 'liquidated', - Ioc = 'ioc', - AutoDeleveraged = 'auto_deleveraged', - ReduceOnly = 'reduce_only', - PositionClosed = 'position_closed', - ReduceOut = 'reduce_out', - Stp = 'stp', + Filled = 'filled', + Cancelled = 'cancelled', + Liquidated = 'liquidated', + Ioc = 'ioc', + AutoDeleveraged = 'auto_deleveraged', + ReduceOnly = 'reduce_only', + PositionClosed = 'position_closed', + ReduceOut = 'reduce_out', + Stp = 'stp' } export enum Status { - Open = 'open', - Finished = 'finished', + Open = 'open', + Finished = 'finished' } export enum Tif { - Gtc = 'gtc', - Ioc = 'ioc', - Poc = 'poc', - Fok = 'fok', + Gtc = 'gtc', + Ioc = 'ioc', + Poc = 'poc', + Fok = 'fok' } export enum AutoSize { - Long = 'close_long', - Short = 'close_short', + Long = 'close_long', + Short = 'close_short' } export enum StpAct { - Co = 'co', - Cn = 'cn', - Cb = 'cb', - Minus = '-', + Co = 'co', + Cn = 'cn', + Cb = 'cb', + Minus = '-' } } diff --git a/model/batchOrder.ts b/model/batchOrder.ts index eb863a8..066d4cb 100644 --- a/model/batchOrder.ts +++ b/model/batchOrder.ts @@ -9,348 +9,348 @@ * Do not edit the class manually. */ + /** - * Batch order details - */ +* Batch order details +*/ export class BatchOrder { /** - * Order ID - */ + * Order ID + */ 'orderId'?: string; /** - * The custom data that the user remarked when amending the order - */ + * The custom data that the user remarked when amending the order + */ 'amendText'?: string; /** - * 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(.) - */ + * 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(.) + */ 'text'?: string; /** - * Whether the batch of orders succeeded - */ + * Whether the batch of orders succeeded + */ 'succeeded'?: boolean; /** - * Error label, if any, otherwise an empty string - */ + * Error label, if any, otherwise an empty string + */ 'label'?: string; /** - * Detailed error message, if any, otherwise an empty string - */ + * Detailed error message, if any, otherwise an empty string + */ 'message'?: string; /** - * Order ID - */ + * Order ID + */ 'id'?: string; /** - * Creation time of order - */ + * Creation time of order + */ 'createTime'?: string; /** - * Last modification time of order - */ + * Last modification time of order + */ 'updateTime'?: string; /** - * Creation time of order (in milliseconds) - */ + * Creation time of order (in milliseconds) + */ 'createTimeMs'?: number; /** - * Last modification time of order (in milliseconds) - */ + * Last modification time of order (in milliseconds) + */ 'updateTimeMs'?: number; /** - * Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled - */ + * Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled + */ 'status'?: BatchOrder.Status; /** - * Currency pair - */ + * Currency pair + */ 'currencyPair'?: string; /** - * Order Type - limit : Limit Order - market : Market Order - */ + * Order Type - limit : Limit Order - market : Market Order + */ 'type'?: BatchOrder.Type; /** - * Account type. spot - use spot account; margin - use margin account; cross_margin - use cross margin account, unified - unified account - */ + * Account type. spot - use spot account; margin - use margin account; cross_margin - use cross margin account, unified - unified account + */ 'account'?: BatchOrder.Account; /** - * Order side - */ + * Order side + */ 'side'?: BatchOrder.Side; /** - * Trade amount - */ + * Trade amount + */ 'amount'?: string; /** - * Order price - */ + * Order price + */ 'price'?: string; /** - * 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 - */ + * 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 + */ 'timeInForce'?: BatchOrder.TimeInForce; /** - * Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. - */ + * Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. + */ 'iceberg'?: string; /** - * Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. - */ + * Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. + */ 'autoBorrow'?: boolean; /** - * 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. - */ + * 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. + */ 'autoRepay'?: boolean; /** - * Amount left to fill - */ + * Amount left to fill + */ 'left'?: string; /** - * Amount traded to fill - */ + * Amount traded to fill + */ 'filledAmount'?: string; /** - * Total filled in quote currency. Deprecated in favor of `filled_total` - */ + * Total filled in quote currency. Deprecated in favor of `filled_total` + */ 'fillPrice'?: string; /** - * Total filled in quote currency - */ + * Total filled in quote currency + */ 'filledTotal'?: string; /** - * Average fill price - */ + * Average fill price + */ 'avgDealPrice'?: string; /** - * Fee deducted - */ + * Fee deducted + */ 'fee'?: string; /** - * Fee currency unit - */ + * Fee currency unit + */ 'feeCurrency'?: string; /** - * Points used to deduct fee - */ + * Points used to deduct fee + */ 'pointFee'?: string; /** - * GT used to deduct fee - */ + * GT used to deduct fee + */ 'gtFee'?: string; /** - * Whether GT fee discount is used - */ + * Whether GT fee discount is used + */ 'gtDiscount'?: boolean; /** - * Rebated fee - */ + * Rebated fee + */ 'rebatedFee'?: string; /** - * Rebated fee currency unit - */ + * Rebated fee currency unit + */ 'rebatedFeeCurrency'?: string; /** - * 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` - */ + * 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` + */ 'stpId'?: number; /** - * 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 - */ + * 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 + */ 'stpAct'?: BatchOrder.StpAct; /** - * 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 - */ + * 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 + */ 'finishAs'?: BatchOrder.FinishAs; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'orderId', - baseName: 'order_id', - type: 'string', + "name": "orderId", + "baseName": "order_id", + "type": "string" }, { - name: 'amendText', - baseName: 'amend_text', - type: 'string', + "name": "amendText", + "baseName": "amend_text", + "type": "string" }, { - name: 'text', - baseName: 'text', - type: 'string', + "name": "text", + "baseName": "text", + "type": "string" }, { - name: 'succeeded', - baseName: 'succeeded', - type: 'boolean', + "name": "succeeded", + "baseName": "succeeded", + "type": "boolean" }, { - name: 'label', - baseName: 'label', - type: 'string', + "name": "label", + "baseName": "label", + "type": "string" }, { - name: 'message', - baseName: 'message', - type: 'string', + "name": "message", + "baseName": "message", + "type": "string" }, { - name: 'id', - baseName: 'id', - type: 'string', + "name": "id", + "baseName": "id", + "type": "string" }, { - name: 'createTime', - baseName: 'create_time', - type: 'string', + "name": "createTime", + "baseName": "create_time", + "type": "string" }, { - name: 'updateTime', - baseName: 'update_time', - type: 'string', + "name": "updateTime", + "baseName": "update_time", + "type": "string" }, { - name: 'createTimeMs', - baseName: 'create_time_ms', - type: 'number', + "name": "createTimeMs", + "baseName": "create_time_ms", + "type": "number" }, { - name: 'updateTimeMs', - baseName: 'update_time_ms', - type: 'number', + "name": "updateTimeMs", + "baseName": "update_time_ms", + "type": "number" }, { - name: 'status', - baseName: 'status', - type: 'BatchOrder.Status', + "name": "status", + "baseName": "status", + "type": "BatchOrder.Status" }, { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" }, { - name: 'type', - baseName: 'type', - type: 'BatchOrder.Type', + "name": "type", + "baseName": "type", + "type": "BatchOrder.Type" }, { - name: 'account', - baseName: 'account', - type: 'BatchOrder.Account', + "name": "account", + "baseName": "account", + "type": "BatchOrder.Account" }, { - name: 'side', - baseName: 'side', - type: 'BatchOrder.Side', + "name": "side", + "baseName": "side", + "type": "BatchOrder.Side" }, { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'price', - baseName: 'price', - type: 'string', + "name": "price", + "baseName": "price", + "type": "string" }, { - name: 'timeInForce', - baseName: 'time_in_force', - type: 'BatchOrder.TimeInForce', + "name": "timeInForce", + "baseName": "time_in_force", + "type": "BatchOrder.TimeInForce" }, { - name: 'iceberg', - baseName: 'iceberg', - type: 'string', + "name": "iceberg", + "baseName": "iceberg", + "type": "string" }, { - name: 'autoBorrow', - baseName: 'auto_borrow', - type: 'boolean', + "name": "autoBorrow", + "baseName": "auto_borrow", + "type": "boolean" }, { - name: 'autoRepay', - baseName: 'auto_repay', - type: 'boolean', + "name": "autoRepay", + "baseName": "auto_repay", + "type": "boolean" }, { - name: 'left', - baseName: 'left', - type: 'string', + "name": "left", + "baseName": "left", + "type": "string" }, { - name: 'filledAmount', - baseName: 'filled_amount', - type: 'string', + "name": "filledAmount", + "baseName": "filled_amount", + "type": "string" }, { - name: 'fillPrice', - baseName: 'fill_price', - type: 'string', + "name": "fillPrice", + "baseName": "fill_price", + "type": "string" }, { - name: 'filledTotal', - baseName: 'filled_total', - type: 'string', + "name": "filledTotal", + "baseName": "filled_total", + "type": "string" }, { - name: 'avgDealPrice', - baseName: 'avg_deal_price', - type: 'string', + "name": "avgDealPrice", + "baseName": "avg_deal_price", + "type": "string" }, { - name: 'fee', - baseName: 'fee', - type: 'string', + "name": "fee", + "baseName": "fee", + "type": "string" }, { - name: 'feeCurrency', - baseName: 'fee_currency', - type: 'string', + "name": "feeCurrency", + "baseName": "fee_currency", + "type": "string" }, { - name: 'pointFee', - baseName: 'point_fee', - type: 'string', + "name": "pointFee", + "baseName": "point_fee", + "type": "string" }, { - name: 'gtFee', - baseName: 'gt_fee', - type: 'string', + "name": "gtFee", + "baseName": "gt_fee", + "type": "string" }, { - name: 'gtDiscount', - baseName: 'gt_discount', - type: 'boolean', + "name": "gtDiscount", + "baseName": "gt_discount", + "type": "boolean" }, { - name: 'rebatedFee', - baseName: 'rebated_fee', - type: 'string', + "name": "rebatedFee", + "baseName": "rebated_fee", + "type": "string" }, { - name: 'rebatedFeeCurrency', - baseName: 'rebated_fee_currency', - type: 'string', + "name": "rebatedFeeCurrency", + "baseName": "rebated_fee_currency", + "type": "string" }, { - name: 'stpId', - baseName: 'stp_id', - type: 'number', + "name": "stpId", + "baseName": "stp_id", + "type": "number" }, { - name: 'stpAct', - baseName: 'stp_act', - type: 'BatchOrder.StpAct', + "name": "stpAct", + "baseName": "stp_act", + "type": "BatchOrder.StpAct" }, { - name: 'finishAs', - baseName: 'finish_as', - type: 'BatchOrder.FinishAs', - }, - ]; + "name": "finishAs", + "baseName": "finish_as", + "type": "BatchOrder.FinishAs" + } ]; static getAttributeTypeMap() { return BatchOrder.attributeTypeMap; @@ -359,41 +359,41 @@ export class BatchOrder { export namespace BatchOrder { export enum Status { - Open = 'open', - Closed = 'closed', - Cancelled = 'cancelled', + Open = 'open', + Closed = 'closed', + Cancelled = 'cancelled' } export enum Type { - Limit = 'limit', - Market = 'market', + Limit = 'limit', + Market = 'market' } export enum Account { - Spot = 'spot', - Margin = 'margin', - CrossMargin = 'cross_margin', - Unified = 'unified', + Spot = 'spot', + Margin = 'margin', + CrossMargin = 'cross_margin', + Unified = 'unified' } export enum Side { - Buy = 'buy', - Sell = 'sell', + Buy = 'buy', + Sell = 'sell' } export enum TimeInForce { - Gtc = 'gtc', - Ioc = 'ioc', - Poc = 'poc', - Fok = 'fok', + Gtc = 'gtc', + Ioc = 'ioc', + Poc = 'poc', + Fok = 'fok' } export enum StpAct { - Cn = 'cn', - Co = 'co', - Cb = 'cb', - Minus = '-', + Cn = 'cn', + Co = 'co', + Cb = 'cb', + Minus = '-' } export enum FinishAs { - Open = 'open', - Filled = 'filled', - Cancelled = 'cancelled', - Ioc = 'ioc', - Stp = 'stp', + Open = 'open', + Filled = 'filled', + Cancelled = 'cancelled', + Ioc = 'ioc', + Stp = 'stp' } } diff --git a/model/borrowCurrencyInfo.ts b/model/borrowCurrencyInfo.ts index 82c06df..e1f1ac2 100644 --- a/model/borrowCurrencyInfo.ts +++ b/model/borrowCurrencyInfo.ts @@ -9,59 +9,60 @@ * Do not edit the class manually. */ + export class BorrowCurrencyInfo { /** - * Currency - */ + * Currency + */ 'currency'?: string; /** - * Currency Index Price - */ + * Currency Index Price + */ 'indexPrice'?: string; /** - * outstanding principal - */ + * outstanding principal + */ 'leftRepayPrincipal'?: string; /** - * outstanding interest - */ + * outstanding interest + */ 'leftRepayInterest'?: string; /** - * Value of left total repayments amount in USDT - */ + * Value of left total repayments amount in USDT + */ 'leftRepayUsdt'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'indexPrice', - baseName: 'index_price', - type: 'string', + "name": "indexPrice", + "baseName": "index_price", + "type": "string" }, { - name: 'leftRepayPrincipal', - baseName: 'left_repay_principal', - type: 'string', + "name": "leftRepayPrincipal", + "baseName": "left_repay_principal", + "type": "string" }, { - name: 'leftRepayInterest', - baseName: 'left_repay_interest', - type: 'string', + "name": "leftRepayInterest", + "baseName": "left_repay_interest", + "type": "string" }, { - name: 'leftRepayUsdt', - baseName: 'left_repay_usdt', - type: 'string', - }, - ]; + "name": "leftRepayUsdt", + "baseName": "left_repay_usdt", + "type": "string" + } ]; static getAttributeTypeMap() { return BorrowCurrencyInfo.attributeTypeMap; } } + diff --git a/model/brokerCommission.ts b/model/brokerCommission.ts index 98a14a8..12de1e4 100644 --- a/model/brokerCommission.ts +++ b/model/brokerCommission.ts @@ -13,30 +13,30 @@ import { BrokerCommission1 } from './brokerCommission1'; export class BrokerCommission { /** - * Total - */ + * Total + */ 'total'?: number; /** - * List of comission history - */ + * List of comission history + */ 'list'?: Array; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'total', - baseName: 'total', - type: 'number', + "name": "total", + "baseName": "total", + "type": "number" }, { - name: 'list', - baseName: 'list', - type: 'Array', - }, - ]; + "name": "list", + "baseName": "list", + "type": "Array" + } ]; static getAttributeTypeMap() { return BrokerCommission.attributeTypeMap; } } + diff --git a/model/brokerCommission1.ts b/model/brokerCommission1.ts index a3486fe..23e5c0e 100644 --- a/model/brokerCommission1.ts +++ b/model/brokerCommission1.ts @@ -9,95 +9,96 @@ * Do not edit the class manually. */ + export class BrokerCommission1 { /** - * Commission Time. (unix timestamp) - */ + * Commission Time. (unix timestamp) + */ 'commissionTime'?: number; /** - * User ID - */ + * User ID + */ 'userId'?: number; /** - * Group name - */ + * Group name + */ 'groupName'?: string; /** - * The amount of commission rebates - */ + * The amount of commission rebates + */ 'amount'?: string; /** - * Fee - */ + * Fee + */ 'fee'?: string; /** - * Fee currency - */ + * Fee currency + */ 'feeAsset'?: string; /** - * The income from rebates, converted to USDT - */ + * The income from rebates, converted to USDT + */ 'rebateFee'?: string; /** - * Rebate Type: Spot、Futures、Options - */ + * Rebate Type: Spot、Futures、Options + */ 'source'?: string; /** - * Currency pair - */ + * Currency pair + */ 'currencyPair'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'commissionTime', - baseName: 'commission_time', - type: 'number', + "name": "commissionTime", + "baseName": "commission_time", + "type": "number" }, { - name: 'userId', - baseName: 'user_id', - type: 'number', + "name": "userId", + "baseName": "user_id", + "type": "number" }, { - name: 'groupName', - baseName: 'group_name', - type: 'string', + "name": "groupName", + "baseName": "group_name", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'fee', - baseName: 'fee', - type: 'string', + "name": "fee", + "baseName": "fee", + "type": "string" }, { - name: 'feeAsset', - baseName: 'fee_asset', - type: 'string', + "name": "feeAsset", + "baseName": "fee_asset", + "type": "string" }, { - name: 'rebateFee', - baseName: 'rebate_fee', - type: 'string', + "name": "rebateFee", + "baseName": "rebate_fee", + "type": "string" }, { - name: 'source', - baseName: 'source', - type: 'string', + "name": "source", + "baseName": "source", + "type": "string" }, { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', - }, - ]; + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" + } ]; static getAttributeTypeMap() { return BrokerCommission1.attributeTypeMap; } } + diff --git a/model/brokerTransaction.ts b/model/brokerTransaction.ts index 14e42e3..da70aae 100644 --- a/model/brokerTransaction.ts +++ b/model/brokerTransaction.ts @@ -13,30 +13,30 @@ import { BrokerTransaction1 } from './brokerTransaction1'; export class BrokerTransaction { /** - * Total - */ + * Total + */ 'total'?: number; /** - * List of transaction history - */ + * List of transaction history + */ 'list'?: Array; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'total', - baseName: 'total', - type: 'number', + "name": "total", + "baseName": "total", + "type": "number" }, { - name: 'list', - baseName: 'list', - type: 'Array', - }, - ]; + "name": "list", + "baseName": "list", + "type": "Array" + } ]; static getAttributeTypeMap() { return BrokerTransaction.attributeTypeMap; } } + diff --git a/model/brokerTransaction1.ts b/model/brokerTransaction1.ts index ab9cc70..ac9e119 100644 --- a/model/brokerTransaction1.ts +++ b/model/brokerTransaction1.ts @@ -9,86 +9,87 @@ * Do not edit the class manually. */ + export class BrokerTransaction1 { /** - * Transaction Time. (unix timestamp) - */ + * Transaction Time. (unix timestamp) + */ 'transactionTime'?: number; /** - * User ID - */ + * User ID + */ 'userId'?: number; /** - * Group name - */ + * Group name + */ 'groupName'?: string; /** - * fee (usdt) - */ + * fee (usdt) + */ 'fee'?: string; /** - * Currency pair - */ + * Currency pair + */ 'currencyPair'?: string; /** - * Commission Amount - */ + * Commission Amount + */ 'amount'?: string; /** - * Fee currency - */ + * Fee currency + */ 'feeAsset'?: string; /** - * Rebate Type: Spot、Futures、Options - */ + * Rebate Type: Spot、Futures、Options + */ 'source'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'transactionTime', - baseName: 'transaction_time', - type: 'number', + "name": "transactionTime", + "baseName": "transaction_time", + "type": "number" }, { - name: 'userId', - baseName: 'user_id', - type: 'number', + "name": "userId", + "baseName": "user_id", + "type": "number" }, { - name: 'groupName', - baseName: 'group_name', - type: 'string', + "name": "groupName", + "baseName": "group_name", + "type": "string" }, { - name: 'fee', - baseName: 'fee', - type: 'string', + "name": "fee", + "baseName": "fee", + "type": "string" }, { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'feeAsset', - baseName: 'fee_asset', - type: 'string', + "name": "feeAsset", + "baseName": "fee_asset", + "type": "string" }, { - name: 'source', - baseName: 'source', - type: 'string', - }, - ]; + "name": "source", + "baseName": "source", + "type": "string" + } ]; static getAttributeTypeMap() { return BrokerTransaction1.attributeTypeMap; } } + diff --git a/model/cancelBatchOrder.ts b/model/cancelBatchOrder.ts index d392211..cdc9735 100644 --- a/model/cancelBatchOrder.ts +++ b/model/cancelBatchOrder.ts @@ -9,44 +9,45 @@ * Do not edit the class manually. */ + /** - * Info of order to be cancelled - */ +* Info of order to be cancelled +*/ export class CancelBatchOrder { /** - * Order currency pair - */ + * Order currency pair + */ 'currencyPair': string; /** - * Order ID or user custom ID. Custom ID are accepted only within 30 minutes after order creation - */ + * Order ID or user custom ID. Custom ID are accepted only within 30 minutes after order creation + */ 'id': string; /** - * 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) - */ + * 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) + */ 'actionMode'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" }, { - name: 'id', - baseName: 'id', - type: 'string', + "name": "id", + "baseName": "id", + "type": "string" }, { - name: 'actionMode', - baseName: 'action_mode', - type: 'string', - }, - ]; + "name": "actionMode", + "baseName": "action_mode", + "type": "string" + } ]; static getAttributeTypeMap() { return CancelBatchOrder.attributeTypeMap; } } + diff --git a/model/cancelOrder.ts b/model/cancelOrder.ts deleted file mode 100644 index 2c62678..0000000 --- a/model/cancelOrder.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Gate API v4 - * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. - * - * Contact: support@mail.gate.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Info of order to be cancelled - */ -export class CancelOrder { - /** - * Order currency pair - */ - 'currencyPair': string; - /** - * Order ID or user custom ID. Custom ID are accepted only within 30 minutes after order creation - */ - 'id': string; - /** - * If cancelled order is cross margin order or is portfolio margin account\'s API key, this field must be set and can only be `cross_margin`If cancelled order is cross margin order, this field must be set and can only be `cross_margin` - */ - 'account'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ - { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', - }, - { - name: 'id', - baseName: 'id', - type: 'string', - }, - { - name: 'account', - baseName: 'account', - type: 'string', - }, - ]; - - static getAttributeTypeMap() { - return CancelOrder.attributeTypeMap; - } -} diff --git a/model/cancelOrderResult.ts b/model/cancelOrderResult.ts index b9e35d0..7e6958b 100644 --- a/model/cancelOrderResult.ts +++ b/model/cancelOrderResult.ts @@ -9,80 +9,81 @@ * Do not edit the class manually. */ + /** - * Order cancellation result - */ +* Order cancellation result +*/ export class CancelOrderResult { /** - * Order currency pair - */ + * Order currency pair + */ 'currencyPair'?: string; /** - * Order ID - */ + * Order ID + */ 'id'?: string; /** - * 订单自定义信息 - */ + * Custom order information + */ 'text'?: string; /** - * Whether cancellation succeeded - */ + * Whether cancellation succeeded + */ 'succeeded'?: boolean; /** - * Error label when failed to cancel the order; emtpy if succeeded - */ + * Error label when failed to cancel the order; emtpy if succeeded + */ 'label'?: string; /** - * Error message when failed to cancel the order; empty if succeeded - */ + * Error message when failed to cancel the order; empty if succeeded + */ 'message'?: string; /** - * Empty by default. If cancelled order is cross margin order, this field is set to `cross_margin` - */ + * Empty by default. If cancelled order is cross margin order, this field is set to `cross_margin` + */ 'account'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" }, { - name: 'id', - baseName: 'id', - type: 'string', + "name": "id", + "baseName": "id", + "type": "string" }, { - name: 'text', - baseName: 'text', - type: 'string', + "name": "text", + "baseName": "text", + "type": "string" }, { - name: 'succeeded', - baseName: 'succeeded', - type: 'boolean', + "name": "succeeded", + "baseName": "succeeded", + "type": "boolean" }, { - name: 'label', - baseName: 'label', - type: 'string', + "name": "label", + "baseName": "label", + "type": "string" }, { - name: 'message', - baseName: 'message', - type: 'string', + "name": "message", + "baseName": "message", + "type": "string" }, { - name: 'account', - baseName: 'account', - type: 'string', - }, - ]; + "name": "account", + "baseName": "account", + "type": "string" + } ]; static getAttributeTypeMap() { return CancelOrderResult.attributeTypeMap; } } + diff --git a/model/collateralAdjust.ts b/model/collateralAdjust.ts index f3a5cba..b305382 100644 --- a/model/collateralAdjust.ts +++ b/model/collateralAdjust.ts @@ -13,39 +13,39 @@ import { CollateralCurrency } from './collateralCurrency'; export class CollateralAdjust { /** - * Order ID - */ + * Order ID + */ 'orderId': number; /** - * Operation types: append - for adding collateral, redeem - for withdrawing collateral - */ + * Operation types: append - for adding collateral, redeem - for withdrawing collateral + */ 'type': string; /** - * Collateral Currency List - */ + * Collateral Currency List + */ 'collaterals'?: Array; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'orderId', - baseName: 'order_id', - type: 'number', + "name": "orderId", + "baseName": "order_id", + "type": "number" }, { - name: 'type', - baseName: 'type', - type: 'string', + "name": "type", + "baseName": "type", + "type": "string" }, { - name: 'collaterals', - baseName: 'collaterals', - type: 'Array', - }, - ]; + "name": "collaterals", + "baseName": "collaterals", + "type": "Array" + } ]; static getAttributeTypeMap() { return CollateralAdjust.attributeTypeMap; } } + diff --git a/model/collateralAdjustRes.ts b/model/collateralAdjustRes.ts index 38087f3..a45514b 100644 --- a/model/collateralAdjustRes.ts +++ b/model/collateralAdjustRes.ts @@ -12,34 +12,34 @@ import { CollateralCurrencyRes } from './collateralCurrencyRes'; /** - * Result of multi-collateral adjustment - */ +* Result of multi-collateral adjustment +*/ export class CollateralAdjustRes { /** - * Order ID - */ + * Order ID + */ 'orderId'?: number; /** - * Collateral Currency Information - */ + * Collateral Currency Information + */ 'collateralCurrencies'?: Array; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'orderId', - baseName: 'order_id', - type: 'number', + "name": "orderId", + "baseName": "order_id", + "type": "number" }, { - name: 'collateralCurrencies', - baseName: 'collateral_currencies', - type: 'Array', - }, - ]; + "name": "collateralCurrencies", + "baseName": "collateral_currencies", + "type": "Array" + } ]; static getAttributeTypeMap() { return CollateralAdjustRes.attributeTypeMap; } } + diff --git a/model/collateralAlign.ts b/model/collateralAlign.ts index e53febd..5d23085 100644 --- a/model/collateralAlign.ts +++ b/model/collateralAlign.ts @@ -9,50 +9,51 @@ * Do not edit the class manually. */ + export class CollateralAlign { /** - * Order ID - */ + * Order ID + */ 'orderId': number; /** - * Collateral - */ + * Collateral + */ 'collateralCurrency': string; /** - * Collateral amount - */ + * Collateral amount + */ 'collateralAmount': string; /** - * Operation types: append - for adding collateral, redeem - for withdrawing collateral - */ + * Operation types: append - for adding collateral, redeem - for withdrawing collateral + */ 'type': string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'orderId', - baseName: 'order_id', - type: 'number', + "name": "orderId", + "baseName": "order_id", + "type": "number" }, { - name: 'collateralCurrency', - baseName: 'collateral_currency', - type: 'string', + "name": "collateralCurrency", + "baseName": "collateral_currency", + "type": "string" }, { - name: 'collateralAmount', - baseName: 'collateral_amount', - type: 'string', + "name": "collateralAmount", + "baseName": "collateral_amount", + "type": "string" }, { - name: 'type', - baseName: 'type', - type: 'string', - }, - ]; + "name": "type", + "baseName": "type", + "type": "string" + } ]; static getAttributeTypeMap() { return CollateralAlign.attributeTypeMap; } } + diff --git a/model/collateralCurrency.ts b/model/collateralCurrency.ts index 9ea8163..b26581a 100644 --- a/model/collateralCurrency.ts +++ b/model/collateralCurrency.ts @@ -9,32 +9,33 @@ * Do not edit the class manually. */ + export class CollateralCurrency { /** - * Currency - */ + * Currency + */ 'currency'?: string; /** - * Size - */ + * Size + */ 'amount'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', - }, - ]; + "name": "amount", + "baseName": "amount", + "type": "string" + } ]; static getAttributeTypeMap() { return CollateralCurrency.attributeTypeMap; } } + diff --git a/model/collateralCurrencyInfo.ts b/model/collateralCurrencyInfo.ts index 94e941e..57d84dc 100644 --- a/model/collateralCurrencyInfo.ts +++ b/model/collateralCurrencyInfo.ts @@ -9,50 +9,51 @@ * Do not edit the class manually. */ + export class CollateralCurrencyInfo { /** - * Currency - */ + * Currency + */ 'currency'?: string; /** - * Currency Index Price - */ + * Currency Index Price + */ 'indexPrice'?: string; /** - * Left Collateral Amount - */ + * Left Collateral Amount + */ 'leftCollateral'?: string; /** - * Value of left collateral amount in USDT - */ + * Value of left collateral amount in USDT + */ 'leftCollateralUsdt'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'indexPrice', - baseName: 'index_price', - type: 'string', + "name": "indexPrice", + "baseName": "index_price", + "type": "string" }, { - name: 'leftCollateral', - baseName: 'left_collateral', - type: 'string', + "name": "leftCollateral", + "baseName": "left_collateral", + "type": "string" }, { - name: 'leftCollateralUsdt', - baseName: 'left_collateral_usdt', - type: 'string', - }, - ]; + "name": "leftCollateralUsdt", + "baseName": "left_collateral_usdt", + "type": "string" + } ]; static getAttributeTypeMap() { return CollateralCurrencyInfo.attributeTypeMap; } } + diff --git a/model/collateralCurrencyRes.ts b/model/collateralCurrencyRes.ts index ec42f31..7241ad5 100644 --- a/model/collateralCurrencyRes.ts +++ b/model/collateralCurrencyRes.ts @@ -9,59 +9,60 @@ * Do not edit the class manually. */ + export class CollateralCurrencyRes { /** - * Update success status - */ + * Update success status + */ 'succeeded'?: boolean; /** - * Error identifier for unsuccessful operations; empty for successful. - */ + * Error identifier for unsuccessful operations; empty for successful. + */ 'label'?: string; /** - * Error description in case of operation failure; empty when successful. - */ + * Error description in case of operation failure; empty when successful. + */ 'message'?: string; /** - * Currency - */ + * Currency + */ 'currency'?: string; /** - * Quantity of successful collateral operation; 0 if the operation fails. - */ + * Quantity of successful collateral operation; 0 if the operation fails. + */ 'amount'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'succeeded', - baseName: 'succeeded', - type: 'boolean', + "name": "succeeded", + "baseName": "succeeded", + "type": "boolean" }, { - name: 'label', - baseName: 'label', - type: 'string', + "name": "label", + "baseName": "label", + "type": "string" }, { - name: 'message', - baseName: 'message', - type: 'string', + "name": "message", + "baseName": "message", + "type": "string" }, { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', - }, - ]; + "name": "amount", + "baseName": "amount", + "type": "string" + } ]; static getAttributeTypeMap() { return CollateralCurrencyRes.attributeTypeMap; } } + diff --git a/model/collateralCurrentRate.ts b/model/collateralCurrentRate.ts index 46acd97..e7a05c9 100644 --- a/model/collateralCurrentRate.ts +++ b/model/collateralCurrentRate.ts @@ -9,35 +9,36 @@ * Do not edit the class manually. */ + /** - * 多币质押活期利率 - */ +* Multi-currency pledge current interest rate +*/ export class CollateralCurrentRate { /** - * Currency - */ + * Currency + */ 'currency'?: string; /** - * 币种活期利率 - */ + * Currency current interest rate + */ 'currentRate'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'currentRate', - baseName: 'current_rate', - type: 'string', - }, - ]; + "name": "currentRate", + "baseName": "current_rate", + "type": "string" + } ]; static getAttributeTypeMap() { return CollateralCurrentRate.attributeTypeMap; } } + diff --git a/model/collateralFixRate.ts b/model/collateralFixRate.ts index 028338c..a32a5e5 100644 --- a/model/collateralFixRate.ts +++ b/model/collateralFixRate.ts @@ -9,53 +9,54 @@ * Do not edit the class manually. */ + /** - * Multi-collateral fixed interest rate - */ +* Multi-collateral fixed interest rate +*/ export class CollateralFixRate { /** - * Currency - */ + * Currency + */ 'currency'?: string; /** - * Fixed interest rate for a lending period of 7 days - */ + * Fixed interest rate for a lending period of 7 days + */ 'rate7d'?: string; /** - * Fixed interest rate for a lending period of 30 days - */ + * Fixed interest rate for a lending period of 30 days + */ 'rate30d'?: string; /** - * Update time, timestamp, unit in seconds - */ + * Update time, timestamp, unit in seconds + */ 'updateTime'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'rate7d', - baseName: 'rate_7d', - type: 'string', + "name": "rate7d", + "baseName": "rate_7d", + "type": "string" }, { - name: 'rate30d', - baseName: 'rate_30d', - type: 'string', + "name": "rate30d", + "baseName": "rate_30d", + "type": "string" }, { - name: 'updateTime', - baseName: 'update_time', - type: 'number', - }, - ]; + "name": "updateTime", + "baseName": "update_time", + "type": "number" + } ]; static getAttributeTypeMap() { return CollateralFixRate.attributeTypeMap; } } + diff --git a/model/collateralLoanCurrency.ts b/model/collateralLoanCurrency.ts index dd3190e..e24ebc4 100644 --- a/model/collateralLoanCurrency.ts +++ b/model/collateralLoanCurrency.ts @@ -9,35 +9,36 @@ * Do not edit the class manually. */ + /** - * Supported borrowing and collateral currencies - */ +* Supported borrowing and collateral currencies +*/ export class CollateralLoanCurrency { /** - * Borrowed currency - */ + * Borrowed currency + */ 'loanCurrency'?: string; /** - * List of supported collateral currencies - */ + * List of supported collateral currencies + */ 'collateralCurrency'?: Array; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'loanCurrency', - baseName: 'loan_currency', - type: 'string', + "name": "loanCurrency", + "baseName": "loan_currency", + "type": "string" }, { - name: 'collateralCurrency', - baseName: 'collateral_currency', - type: 'Array', - }, - ]; + "name": "collateralCurrency", + "baseName": "collateral_currency", + "type": "Array" + } ]; static getAttributeTypeMap() { return CollateralLoanCurrency.attributeTypeMap; } } + diff --git a/model/collateralLtv.ts b/model/collateralLtv.ts index 07b941b..6f8e453 100644 --- a/model/collateralLtv.ts +++ b/model/collateralLtv.ts @@ -9,44 +9,45 @@ * Do not edit the class manually. */ + /** - * Collateral Ratio - */ +* Collateral Ratio +*/ export class CollateralLtv { /** - * The initial collateralization rate - */ + * The initial collateralization rate + */ 'initLtv'?: string; /** - * Warning collateralization ratio - */ + * Warning collateralization ratio + */ 'alertLtv'?: string; /** - * The liquidation collateralization rate - */ + * The liquidation collateralization rate + */ 'liquidateLtv'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'initLtv', - baseName: 'init_ltv', - type: 'string', + "name": "initLtv", + "baseName": "init_ltv", + "type": "string" }, { - name: 'alertLtv', - baseName: 'alert_ltv', - type: 'string', + "name": "alertLtv", + "baseName": "alert_ltv", + "type": "string" }, { - name: 'liquidateLtv', - baseName: 'liquidate_ltv', - type: 'string', - }, - ]; + "name": "liquidateLtv", + "baseName": "liquidate_ltv", + "type": "string" + } ]; static getAttributeTypeMap() { return CollateralLtv.attributeTypeMap; } } + diff --git a/model/collateralOrder.ts b/model/collateralOrder.ts index 495bfa1..722716d 100644 --- a/model/collateralOrder.ts +++ b/model/collateralOrder.ts @@ -9,161 +9,162 @@ * Do not edit the class manually. */ + /** - * Collateral Order - */ +* Collateral Order +*/ export class CollateralOrder { /** - * Order ID - */ + * Order ID + */ 'orderId'?: number; /** - * Collateral - */ + * Collateral + */ 'collateralCurrency'?: string; /** - * Collateral amount - */ + * Collateral amount + */ 'collateralAmount'?: string; /** - * Borrowed currency - */ + * Borrowed currency + */ 'borrowCurrency'?: string; /** - * Borrowing amount - */ + * Borrowing amount + */ 'borrowAmount'?: string; /** - * Repaid amount - */ + * Repaid amount + */ 'repaidAmount'?: string; /** - * Repaid principal - */ + * Repaid principal + */ 'repaidPrincipal'?: string; /** - * Repaid interest - */ + * Repaid interest + */ 'repaidInterest'?: string; /** - * The initial collateralization rate - */ + * The initial collateralization rate + */ 'initLtv'?: string; /** - * The current collateralization rate - */ + * The current collateralization rate + */ 'currentLtv'?: string; /** - * The liquidation collateralization rate - */ + * The liquidation collateralization rate + */ 'liquidateLtv'?: string; /** - * 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 - */ + * 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 + */ 'status'?: string; /** - * Borrowing time, timestamp in seconds - */ + * Borrowing time, timestamp in seconds + */ 'borrowTime'?: number; /** - * Outstanding principal and interest (outstanding principal + outstanding interest) - */ + * Outstanding principal and interest (outstanding principal + outstanding interest) + */ 'leftRepayTotal'?: string; /** - * outstanding principal - */ + * outstanding principal + */ 'leftRepayPrincipal'?: string; /** - * outstanding interest - */ + * outstanding interest + */ 'leftRepayInterest'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'orderId', - baseName: 'order_id', - type: 'number', + "name": "orderId", + "baseName": "order_id", + "type": "number" }, { - name: 'collateralCurrency', - baseName: 'collateral_currency', - type: 'string', + "name": "collateralCurrency", + "baseName": "collateral_currency", + "type": "string" }, { - name: 'collateralAmount', - baseName: 'collateral_amount', - type: 'string', + "name": "collateralAmount", + "baseName": "collateral_amount", + "type": "string" }, { - name: 'borrowCurrency', - baseName: 'borrow_currency', - type: 'string', + "name": "borrowCurrency", + "baseName": "borrow_currency", + "type": "string" }, { - name: 'borrowAmount', - baseName: 'borrow_amount', - type: 'string', + "name": "borrowAmount", + "baseName": "borrow_amount", + "type": "string" }, { - name: 'repaidAmount', - baseName: 'repaid_amount', - type: 'string', + "name": "repaidAmount", + "baseName": "repaid_amount", + "type": "string" }, { - name: 'repaidPrincipal', - baseName: 'repaid_principal', - type: 'string', + "name": "repaidPrincipal", + "baseName": "repaid_principal", + "type": "string" }, { - name: 'repaidInterest', - baseName: 'repaid_interest', - type: 'string', + "name": "repaidInterest", + "baseName": "repaid_interest", + "type": "string" }, { - name: 'initLtv', - baseName: 'init_ltv', - type: 'string', + "name": "initLtv", + "baseName": "init_ltv", + "type": "string" }, { - name: 'currentLtv', - baseName: 'current_ltv', - type: 'string', + "name": "currentLtv", + "baseName": "current_ltv", + "type": "string" }, { - name: 'liquidateLtv', - baseName: 'liquidate_ltv', - type: 'string', + "name": "liquidateLtv", + "baseName": "liquidate_ltv", + "type": "string" }, { - name: 'status', - baseName: 'status', - type: 'string', + "name": "status", + "baseName": "status", + "type": "string" }, { - name: 'borrowTime', - baseName: 'borrow_time', - type: 'number', + "name": "borrowTime", + "baseName": "borrow_time", + "type": "number" }, { - name: 'leftRepayTotal', - baseName: 'left_repay_total', - type: 'string', + "name": "leftRepayTotal", + "baseName": "left_repay_total", + "type": "string" }, { - name: 'leftRepayPrincipal', - baseName: 'left_repay_principal', - type: 'string', + "name": "leftRepayPrincipal", + "baseName": "left_repay_principal", + "type": "string" }, { - name: 'leftRepayInterest', - baseName: 'left_repay_interest', - type: 'string', - }, - ]; + "name": "leftRepayInterest", + "baseName": "left_repay_interest", + "type": "string" + } ]; static getAttributeTypeMap() { return CollateralOrder.attributeTypeMap; } } + diff --git a/model/collateralRecord.ts b/model/collateralRecord.ts index 5106227..dcc2612 100644 --- a/model/collateralRecord.ts +++ b/model/collateralRecord.ts @@ -9,107 +9,108 @@ * Do not edit the class manually. */ + /** - * Collateral record - */ +* Collateral record +*/ export class CollateralRecord { /** - * Order ID - */ + * Order ID + */ 'orderId'?: number; /** - * Collateral record ID - */ + * Collateral record ID + */ 'recordId'?: number; /** - * Borrowed currency - */ + * Borrowed currency + */ 'borrowCurrency'?: string; /** - * Borrowing amount - */ + * Borrowing amount + */ 'borrowAmount'?: string; /** - * Collateral - */ + * Collateral + */ 'collateralCurrency'?: string; /** - * The collateral amount before adjustment - */ + * The collateral amount before adjustment + */ 'beforeCollateral'?: string; /** - * The collateral amount after adjustment - */ + * The collateral amount after adjustment + */ 'afterCollateral'?: string; /** - * The collateral ratio before adjustment - */ + * The collateral ratio before adjustment + */ 'beforeLtv'?: string; /** - * The collateral ratio after adjustment - */ + * The collateral ratio after adjustment + */ 'afterLtv'?: string; /** - * Timestamp of the operation, in seconds - */ + * Timestamp of the operation, in seconds + */ 'operateTime'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'orderId', - baseName: 'order_id', - type: 'number', + "name": "orderId", + "baseName": "order_id", + "type": "number" }, { - name: 'recordId', - baseName: 'record_id', - type: 'number', + "name": "recordId", + "baseName": "record_id", + "type": "number" }, { - name: 'borrowCurrency', - baseName: 'borrow_currency', - type: 'string', + "name": "borrowCurrency", + "baseName": "borrow_currency", + "type": "string" }, { - name: 'borrowAmount', - baseName: 'borrow_amount', - type: 'string', + "name": "borrowAmount", + "baseName": "borrow_amount", + "type": "string" }, { - name: 'collateralCurrency', - baseName: 'collateral_currency', - type: 'string', + "name": "collateralCurrency", + "baseName": "collateral_currency", + "type": "string" }, { - name: 'beforeCollateral', - baseName: 'before_collateral', - type: 'string', + "name": "beforeCollateral", + "baseName": "before_collateral", + "type": "string" }, { - name: 'afterCollateral', - baseName: 'after_collateral', - type: 'string', + "name": "afterCollateral", + "baseName": "after_collateral", + "type": "string" }, { - name: 'beforeLtv', - baseName: 'before_ltv', - type: 'string', + "name": "beforeLtv", + "baseName": "before_ltv", + "type": "string" }, { - name: 'afterLtv', - baseName: 'after_ltv', - type: 'string', + "name": "afterLtv", + "baseName": "after_ltv", + "type": "string" }, { - name: 'operateTime', - baseName: 'operate_time', - type: 'number', - }, - ]; + "name": "operateTime", + "baseName": "operate_time", + "type": "number" + } ]; static getAttributeTypeMap() { return CollateralRecord.attributeTypeMap; } } + diff --git a/model/contract.ts b/model/contract.ts index 5966199..5384322 100644 --- a/model/contract.ts +++ b/model/contract.ts @@ -9,339 +9,339 @@ * Do not edit the class manually. */ + /** - * Futures contract details - */ +* Futures contract details +*/ export class Contract { /** - * Futures contract - */ + * Futures contract + */ 'name'?: string; /** - * Futures contract type - */ + * Futures contract type + */ 'type'?: Contract.Type; /** - * Multiplier used in converting from invoicing to settlement currency - */ + * Multiplier used in converting from invoicing to settlement currency + */ 'quantoMultiplier'?: string; /** - * Minimum leverage - */ + * Minimum leverage + */ 'leverageMin'?: string; /** - * Maximum leverage - */ + * Maximum leverage + */ 'leverageMax'?: string; /** - * Maintenance rate of margin - */ + * Maintenance rate of margin + */ 'maintenanceRate'?: string; /** - * Mark price type, internal - based on internal trading, index - based on external index price - */ + * Mark price type, internal - based on internal trading, index - based on external index price + */ 'markType'?: Contract.MarkType; /** - * Current mark price - */ + * Current mark price + */ 'markPrice'?: string; /** - * Current index price - */ + * Current index price + */ 'indexPrice'?: string; /** - * Last trading price - */ + * Last trading price + */ 'lastPrice'?: string; /** - * Maker fee rate, where negative means rebate - */ + * Maker fee rate, where negative means rebate + */ 'makerFeeRate'?: string; /** - * Taker fee rate - */ + * Taker fee rate + */ 'takerFeeRate'?: string; /** - * Minimum order price increment - */ + * Minimum order price increment + */ 'orderPriceRound'?: string; /** - * Minimum mark price increment - */ + * Minimum mark price increment + */ 'markPriceRound'?: string; /** - * Current funding rate - */ + * Current funding rate + */ 'fundingRate'?: string; /** - * Funding application interval, unit in seconds - */ + * Funding application interval, unit in seconds + */ 'fundingInterval'?: number; /** - * Next funding time - */ + * Next funding time + */ 'fundingNextApply'?: number; /** - * Risk limit base,deprecated - */ + * Risk limit base,deprecated + */ 'riskLimitBase'?: string; /** - * Step of adjusting risk limit,deprecated - */ + * Step of adjusting risk limit,deprecated + */ 'riskLimitStep'?: string; /** - * Maximum risk limit the contract allowed,deprecated,It is recommended to use /futures/{settle}/risk_limit_tiers to query risk limits. - */ + * Maximum risk limit the contract allowed,deprecated,It is recommended to use /futures/{settle}/risk_limit_tiers to query risk limits. + */ 'riskLimitMax'?: string; /** - * Minimum order size the contract allowed - */ + * Minimum order size the contract allowed + */ 'orderSizeMin'?: number; /** - * Maximum order size the contract allowed - */ + * Maximum order size the contract allowed + */ 'orderSizeMax'?: number; /** - * 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 - */ + * 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 + */ 'orderPriceDeviate'?: string; /** - * Referral fee rate discount - */ + * Referral fee rate discount + */ 'refDiscountRate'?: string; /** - * Referrer commission rate - */ + * Referrer commission rate + */ 'refRebateRate'?: string; /** - * Current orderbook ID - */ + * Current orderbook ID + */ 'orderbookId'?: number; /** - * Current trade ID - */ + * Current trade ID + */ 'tradeId'?: number; /** - * Historical accumulated trade size - */ + * Historical accumulated trade size + */ 'tradeSize'?: number; /** - * Current total long position size - */ + * Current total long position size + */ 'positionSize'?: number; /** - * Last changed time of configuration - */ + * Last changed time of configuration + */ 'configChangeTime'?: number; /** - * `in_delisting=true` 并且position_size>0时候 表示该合约处于下线过渡期 `in_delisting=true`` 并且position_size=0时候 表示该合约处于下线状态 - */ + * `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 + */ 'inDelisting'?: boolean; /** - * Maximum number of open orders - */ + * Maximum number of open orders + */ 'ordersLimit'?: number; /** - * Whether bouns is enabled - */ + * Whether bouns is enabled + */ 'enableBonus'?: boolean; /** - * Whether portfolio margin account is enabled - */ + * Whether portfolio margin account is enabled + */ 'enableCredit'?: boolean; /** - * Created time of the contract - */ + * Created time of the contract + */ 'createTime'?: number; /** - * The factor for the maximum of the funding rate. Maximum of funding rate = (1/market maximum leverage - maintenance margin rate) * funding_cap_ratio - */ + * The factor for the maximum of the funding rate. Maximum of funding rate = (1/market maximum leverage - maintenance margin rate) * funding_cap_ratio + */ 'fundingCapRatio'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'name', - baseName: 'name', - type: 'string', + "name": "name", + "baseName": "name", + "type": "string" }, { - name: 'type', - baseName: 'type', - type: 'Contract.Type', + "name": "type", + "baseName": "type", + "type": "Contract.Type" }, { - name: 'quantoMultiplier', - baseName: 'quanto_multiplier', - type: 'string', + "name": "quantoMultiplier", + "baseName": "quanto_multiplier", + "type": "string" }, { - name: 'leverageMin', - baseName: 'leverage_min', - type: 'string', + "name": "leverageMin", + "baseName": "leverage_min", + "type": "string" }, { - name: 'leverageMax', - baseName: 'leverage_max', - type: 'string', + "name": "leverageMax", + "baseName": "leverage_max", + "type": "string" }, { - name: 'maintenanceRate', - baseName: 'maintenance_rate', - type: 'string', + "name": "maintenanceRate", + "baseName": "maintenance_rate", + "type": "string" }, { - name: 'markType', - baseName: 'mark_type', - type: 'Contract.MarkType', + "name": "markType", + "baseName": "mark_type", + "type": "Contract.MarkType" }, { - name: 'markPrice', - baseName: 'mark_price', - type: 'string', + "name": "markPrice", + "baseName": "mark_price", + "type": "string" }, { - name: 'indexPrice', - baseName: 'index_price', - type: 'string', + "name": "indexPrice", + "baseName": "index_price", + "type": "string" }, { - name: 'lastPrice', - baseName: 'last_price', - type: 'string', + "name": "lastPrice", + "baseName": "last_price", + "type": "string" }, { - name: 'makerFeeRate', - baseName: 'maker_fee_rate', - type: 'string', + "name": "makerFeeRate", + "baseName": "maker_fee_rate", + "type": "string" }, { - name: 'takerFeeRate', - baseName: 'taker_fee_rate', - type: 'string', + "name": "takerFeeRate", + "baseName": "taker_fee_rate", + "type": "string" }, { - name: 'orderPriceRound', - baseName: 'order_price_round', - type: 'string', + "name": "orderPriceRound", + "baseName": "order_price_round", + "type": "string" }, { - name: 'markPriceRound', - baseName: 'mark_price_round', - type: 'string', + "name": "markPriceRound", + "baseName": "mark_price_round", + "type": "string" }, { - name: 'fundingRate', - baseName: 'funding_rate', - type: 'string', + "name": "fundingRate", + "baseName": "funding_rate", + "type": "string" }, { - name: 'fundingInterval', - baseName: 'funding_interval', - type: 'number', + "name": "fundingInterval", + "baseName": "funding_interval", + "type": "number" }, { - name: 'fundingNextApply', - baseName: 'funding_next_apply', - type: 'number', + "name": "fundingNextApply", + "baseName": "funding_next_apply", + "type": "number" }, { - name: 'riskLimitBase', - baseName: 'risk_limit_base', - type: 'string', + "name": "riskLimitBase", + "baseName": "risk_limit_base", + "type": "string" }, { - name: 'riskLimitStep', - baseName: 'risk_limit_step', - type: 'string', + "name": "riskLimitStep", + "baseName": "risk_limit_step", + "type": "string" }, { - name: 'riskLimitMax', - baseName: 'risk_limit_max', - type: 'string', + "name": "riskLimitMax", + "baseName": "risk_limit_max", + "type": "string" }, { - name: 'orderSizeMin', - baseName: 'order_size_min', - type: 'number', + "name": "orderSizeMin", + "baseName": "order_size_min", + "type": "number" }, { - name: 'orderSizeMax', - baseName: 'order_size_max', - type: 'number', + "name": "orderSizeMax", + "baseName": "order_size_max", + "type": "number" }, { - name: 'orderPriceDeviate', - baseName: 'order_price_deviate', - type: 'string', + "name": "orderPriceDeviate", + "baseName": "order_price_deviate", + "type": "string" }, { - name: 'refDiscountRate', - baseName: 'ref_discount_rate', - type: 'string', + "name": "refDiscountRate", + "baseName": "ref_discount_rate", + "type": "string" }, { - name: 'refRebateRate', - baseName: 'ref_rebate_rate', - type: 'string', + "name": "refRebateRate", + "baseName": "ref_rebate_rate", + "type": "string" }, { - name: 'orderbookId', - baseName: 'orderbook_id', - type: 'number', + "name": "orderbookId", + "baseName": "orderbook_id", + "type": "number" }, { - name: 'tradeId', - baseName: 'trade_id', - type: 'number', + "name": "tradeId", + "baseName": "trade_id", + "type": "number" }, { - name: 'tradeSize', - baseName: 'trade_size', - type: 'number', + "name": "tradeSize", + "baseName": "trade_size", + "type": "number" }, { - name: 'positionSize', - baseName: 'position_size', - type: 'number', + "name": "positionSize", + "baseName": "position_size", + "type": "number" }, { - name: 'configChangeTime', - baseName: 'config_change_time', - type: 'number', + "name": "configChangeTime", + "baseName": "config_change_time", + "type": "number" }, { - name: 'inDelisting', - baseName: 'in_delisting', - type: 'boolean', + "name": "inDelisting", + "baseName": "in_delisting", + "type": "boolean" }, { - name: 'ordersLimit', - baseName: 'orders_limit', - type: 'number', + "name": "ordersLimit", + "baseName": "orders_limit", + "type": "number" }, { - name: 'enableBonus', - baseName: 'enable_bonus', - type: 'boolean', + "name": "enableBonus", + "baseName": "enable_bonus", + "type": "boolean" }, { - name: 'enableCredit', - baseName: 'enable_credit', - type: 'boolean', + "name": "enableCredit", + "baseName": "enable_credit", + "type": "boolean" }, { - name: 'createTime', - baseName: 'create_time', - type: 'number', + "name": "createTime", + "baseName": "create_time", + "type": "number" }, { - name: 'fundingCapRatio', - baseName: 'funding_cap_ratio', - type: 'string', - }, - ]; + "name": "fundingCapRatio", + "baseName": "funding_cap_ratio", + "type": "string" + } ]; static getAttributeTypeMap() { return Contract.attributeTypeMap; @@ -350,11 +350,11 @@ export class Contract { export namespace Contract { export enum Type { - Inverse = 'inverse', - Direct = 'direct', + Inverse = 'inverse', + Direct = 'direct' } export enum MarkType { - Internal = 'internal', - Index = 'index', + Internal = 'internal', + Index = 'index' } } diff --git a/model/contractStat.ts b/model/contractStat.ts index e53cd2a..4482d6c 100644 --- a/model/contractStat.ts +++ b/model/contractStat.ts @@ -9,131 +9,132 @@ * Do not edit the class manually. */ + export class ContractStat { /** - * Stat timestamp - */ + * Stat timestamp + */ 'time'?: number; /** - * Long/short account number ratio - */ + * Long/short account number ratio + */ 'lsrTaker'?: number; /** - * Long/short taker size ratio - */ + * Long/short taker size ratio + */ 'lsrAccount'?: number; /** - * Long liquidation size - */ + * Long liquidation size + */ 'longLiqSize'?: number; /** - * Long liquidation amount(base currency) - */ + * Long liquidation amount(base currency) + */ 'longLiqAmount'?: number; /** - * Long liquidation volume(quote currency) - */ + * Long liquidation volume(quote currency) + */ 'longLiqUsd'?: number; /** - * Short liquidation size - */ + * Short liquidation size + */ 'shortLiqSize'?: number; /** - * Short liquidation amount(base currency) - */ + * Short liquidation amount(base currency) + */ 'shortLiqAmount'?: number; /** - * Short liquidation volume(quote currency) - */ + * Short liquidation volume(quote currency) + */ 'shortLiqUsd'?: number; /** - * Open interest size - */ + * Open interest size + */ 'openInterest'?: number; /** - * Open interest volume(quote currency) - */ + * Open interest volume(quote currency) + */ 'openInterestUsd'?: number; /** - * Top trader long/short account ratio - */ + * Top trader long/short account ratio + */ 'topLsrAccount'?: number; /** - * Top trader long/short position ratio - */ + * Top trader long/short position ratio + */ 'topLsrSize'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'time', - baseName: 'time', - type: 'number', + "name": "time", + "baseName": "time", + "type": "number" }, { - name: 'lsrTaker', - baseName: 'lsr_taker', - type: 'number', + "name": "lsrTaker", + "baseName": "lsr_taker", + "type": "number" }, { - name: 'lsrAccount', - baseName: 'lsr_account', - type: 'number', + "name": "lsrAccount", + "baseName": "lsr_account", + "type": "number" }, { - name: 'longLiqSize', - baseName: 'long_liq_size', - type: 'number', + "name": "longLiqSize", + "baseName": "long_liq_size", + "type": "number" }, { - name: 'longLiqAmount', - baseName: 'long_liq_amount', - type: 'number', + "name": "longLiqAmount", + "baseName": "long_liq_amount", + "type": "number" }, { - name: 'longLiqUsd', - baseName: 'long_liq_usd', - type: 'number', + "name": "longLiqUsd", + "baseName": "long_liq_usd", + "type": "number" }, { - name: 'shortLiqSize', - baseName: 'short_liq_size', - type: 'number', + "name": "shortLiqSize", + "baseName": "short_liq_size", + "type": "number" }, { - name: 'shortLiqAmount', - baseName: 'short_liq_amount', - type: 'number', + "name": "shortLiqAmount", + "baseName": "short_liq_amount", + "type": "number" }, { - name: 'shortLiqUsd', - baseName: 'short_liq_usd', - type: 'number', + "name": "shortLiqUsd", + "baseName": "short_liq_usd", + "type": "number" }, { - name: 'openInterest', - baseName: 'open_interest', - type: 'number', + "name": "openInterest", + "baseName": "open_interest", + "type": "number" }, { - name: 'openInterestUsd', - baseName: 'open_interest_usd', - type: 'number', + "name": "openInterestUsd", + "baseName": "open_interest_usd", + "type": "number" }, { - name: 'topLsrAccount', - baseName: 'top_lsr_account', - type: 'number', + "name": "topLsrAccount", + "baseName": "top_lsr_account", + "type": "number" }, { - name: 'topLsrSize', - baseName: 'top_lsr_size', - type: 'number', - }, - ]; + "name": "topLsrSize", + "baseName": "top_lsr_size", + "type": "number" + } ]; static getAttributeTypeMap() { return ContractStat.attributeTypeMap; } } + diff --git a/model/convertSmallBalance.ts b/model/convertSmallBalance.ts index 41fc976..59449ea 100644 --- a/model/convertSmallBalance.ts +++ b/model/convertSmallBalance.ts @@ -9,35 +9,36 @@ * Do not edit the class manually. */ + /** - * Convert Small Balance - */ +* Convert Small Balance +*/ export class ConvertSmallBalance { /** - * Currency - */ + * Currency + */ 'currency'?: Array; /** - * 是否全部兑换 - */ + * Whether to exchange all + */ 'isAll'?: boolean; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'Array', + "name": "currency", + "baseName": "currency", + "type": "Array" }, { - name: 'isAll', - baseName: 'is_all', - type: 'boolean', - }, - ]; + "name": "isAll", + "baseName": "is_all", + "type": "boolean" + } ]; static getAttributeTypeMap() { return ConvertSmallBalance.attributeTypeMap; } } + diff --git a/model/countdownCancelAllFuturesTask.ts b/model/countdownCancelAllFuturesTask.ts index 1cafadd..9deb84b 100644 --- a/model/countdownCancelAllFuturesTask.ts +++ b/model/countdownCancelAllFuturesTask.ts @@ -9,35 +9,36 @@ * Do not edit the class manually. */ + /** - * Countdown cancel task detail - */ +* Countdown cancel task detail +*/ export class CountdownCancelAllFuturesTask { /** - * Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown - */ + * Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown + */ 'timeout': number; /** - * Futures contract - */ + * Futures contract + */ 'contract'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'timeout', - baseName: 'timeout', - type: 'number', + "name": "timeout", + "baseName": "timeout", + "type": "number" }, { - name: 'contract', - baseName: 'contract', - type: 'string', - }, - ]; + "name": "contract", + "baseName": "contract", + "type": "string" + } ]; static getAttributeTypeMap() { return CountdownCancelAllFuturesTask.attributeTypeMap; } } + diff --git a/model/countdownCancelAllOptionsTask.ts b/model/countdownCancelAllOptionsTask.ts index d4d5b80..8daffc0 100644 --- a/model/countdownCancelAllOptionsTask.ts +++ b/model/countdownCancelAllOptionsTask.ts @@ -9,44 +9,45 @@ * Do not edit the class manually. */ + /** - * Countdown cancel task detail - */ +* Countdown cancel task detail +*/ export class CountdownCancelAllOptionsTask { /** - * 倒计时时间,单位 秒 至少5秒,为0时表示取消倒计时 - */ + * Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown + */ 'timeout': number; /** - * Options contract name - */ + * Options contract name + */ 'contract'?: string; /** - * Underlying - */ + * Underlying + */ 'underlying'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'timeout', - baseName: 'timeout', - type: 'number', + "name": "timeout", + "baseName": "timeout", + "type": "number" }, { - name: 'contract', - baseName: 'contract', - type: 'string', + "name": "contract", + "baseName": "contract", + "type": "string" }, { - name: 'underlying', - baseName: 'underlying', - type: 'string', - }, - ]; + "name": "underlying", + "baseName": "underlying", + "type": "string" + } ]; static getAttributeTypeMap() { return CountdownCancelAllOptionsTask.attributeTypeMap; } } + diff --git a/model/countdownCancelAllSpotTask.ts b/model/countdownCancelAllSpotTask.ts index 7756f07..30bdbe5 100644 --- a/model/countdownCancelAllSpotTask.ts +++ b/model/countdownCancelAllSpotTask.ts @@ -9,35 +9,36 @@ * Do not edit the class manually. */ + /** - * Countdown cancel task detail - */ +* Countdown cancel task detail +*/ export class CountdownCancelAllSpotTask { /** - * Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown - */ + * Countdown time, in seconds At least 5 seconds, 0 means cancel the countdown + */ 'timeout': number; /** - * Currency pair - */ + * Currency pair + */ 'currencyPair'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'timeout', - baseName: 'timeout', - type: 'number', + "name": "timeout", + "baseName": "timeout", + "type": "number" }, { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', - }, - ]; + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" + } ]; static getAttributeTypeMap() { return CountdownCancelAllSpotTask.attributeTypeMap; } } + diff --git a/model/createCollateralOrder.ts b/model/createCollateralOrder.ts index 1c2d288..297cc5a 100644 --- a/model/createCollateralOrder.ts +++ b/model/createCollateralOrder.ts @@ -9,50 +9,51 @@ * Do not edit the class manually. */ + export class CreateCollateralOrder { /** - * Collateral amount - */ + * Collateral amount + */ 'collateralAmount': string; /** - * Collateral - */ + * Collateral + */ 'collateralCurrency': string; /** - * Borrowing amount - */ + * Borrowing amount + */ 'borrowAmount': string; /** - * Borrowed currency - */ + * Borrowed currency + */ 'borrowCurrency': string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'collateralAmount', - baseName: 'collateral_amount', - type: 'string', + "name": "collateralAmount", + "baseName": "collateral_amount", + "type": "string" }, { - name: 'collateralCurrency', - baseName: 'collateral_currency', - type: 'string', + "name": "collateralCurrency", + "baseName": "collateral_currency", + "type": "string" }, { - name: 'borrowAmount', - baseName: 'borrow_amount', - type: 'string', + "name": "borrowAmount", + "baseName": "borrow_amount", + "type": "string" }, { - name: 'borrowCurrency', - baseName: 'borrow_currency', - type: 'string', - }, - ]; + "name": "borrowCurrency", + "baseName": "borrow_currency", + "type": "string" + } ]; static getAttributeTypeMap() { return CreateCollateralOrder.attributeTypeMap; } } + diff --git a/model/createMultiCollateralOrder.ts b/model/createMultiCollateralOrder.ts index 2f2fcf3..3fccdf6 100644 --- a/model/createMultiCollateralOrder.ts +++ b/model/createMultiCollateralOrder.ts @@ -13,93 +13,93 @@ import { CollateralCurrency } from './collateralCurrency'; export class CreateMultiCollateralOrder { /** - * Order ID - */ + * Order ID + */ 'orderId'?: string; /** - * current - current, fixed - fixed, if not specified, default to current - */ + * current - current, fixed - fixed, if not specified, default to current + */ 'orderType'?: string; /** - * Fixed interest rate loan period: 7d - 7 days, 30d - 30 days. Must be provided for fixed - */ + * Fixed interest rate loan period: 7d - 7 days, 30d - 30 days. Must be provided for fixed + */ 'fixedType'?: string; /** - * Fixed interest rate, must be specified for fixed - */ + * Fixed interest rate, must be specified for fixed + */ 'fixedRate'?: string; /** - * Fixed interest rate, automatic renewal - */ + * Fixed interest rate, automatic renewal + */ 'autoRenew'?: boolean; /** - * Fixed interest rate, automatic repayment - */ + * Fixed interest rate, automatic repayment + */ 'autoRepay'?: boolean; /** - * Borrowed currency - */ + * Borrowed currency + */ 'borrowCurrency': string; /** - * Borrowing amount - */ + * Borrowing amount + */ 'borrowAmount': string; /** - * Collateral currency and amount - */ + * Collateral currency and amount + */ 'collateralCurrencies'?: Array; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'orderId', - baseName: 'order_id', - type: 'string', + "name": "orderId", + "baseName": "order_id", + "type": "string" }, { - name: 'orderType', - baseName: 'order_type', - type: 'string', + "name": "orderType", + "baseName": "order_type", + "type": "string" }, { - name: 'fixedType', - baseName: 'fixed_type', - type: 'string', + "name": "fixedType", + "baseName": "fixed_type", + "type": "string" }, { - name: 'fixedRate', - baseName: 'fixed_rate', - type: 'string', + "name": "fixedRate", + "baseName": "fixed_rate", + "type": "string" }, { - name: 'autoRenew', - baseName: 'auto_renew', - type: 'boolean', + "name": "autoRenew", + "baseName": "auto_renew", + "type": "boolean" }, { - name: 'autoRepay', - baseName: 'auto_repay', - type: 'boolean', + "name": "autoRepay", + "baseName": "auto_repay", + "type": "boolean" }, { - name: 'borrowCurrency', - baseName: 'borrow_currency', - type: 'string', + "name": "borrowCurrency", + "baseName": "borrow_currency", + "type": "string" }, { - name: 'borrowAmount', - baseName: 'borrow_amount', - type: 'string', + "name": "borrowAmount", + "baseName": "borrow_amount", + "type": "string" }, { - name: 'collateralCurrencies', - baseName: 'collateral_currencies', - type: 'Array', - }, - ]; + "name": "collateralCurrencies", + "baseName": "collateral_currencies", + "type": "Array" + } ]; static getAttributeTypeMap() { return CreateMultiCollateralOrder.attributeTypeMap; } } + diff --git a/model/createUniLend.ts b/model/createUniLend.ts index 8edd18c..61c8d38 100644 --- a/model/createUniLend.ts +++ b/model/createUniLend.ts @@ -9,51 +9,51 @@ * Do not edit the class manually. */ + /** - * Lend or redeem - */ +* Lend or redeem +*/ export class CreateUniLend { /** - * Currency name - */ + * Currency name + */ 'currency': string; /** - * The amount of currency could be lent - */ + * The amount of currency could be lent + */ 'amount': string; /** - * type: lend - lend, redeem - redeem - */ + * type: lend - lend, redeem - redeem + */ 'type': CreateUniLend.Type; /** - * 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. - */ + * 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. + */ 'minRate'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'type', - baseName: 'type', - type: 'CreateUniLend.Type', + "name": "type", + "baseName": "type", + "type": "CreateUniLend.Type" }, { - name: 'minRate', - baseName: 'min_rate', - type: 'string', - }, - ]; + "name": "minRate", + "baseName": "min_rate", + "type": "string" + } ]; static getAttributeTypeMap() { return CreateUniLend.attributeTypeMap; @@ -62,7 +62,7 @@ export class CreateUniLend { export namespace CreateUniLend { export enum Type { - Lend = 'lend', - Redeem = 'redeem', + Lend = 'lend', + Redeem = 'redeem' } } diff --git a/model/createUniLoan.ts b/model/createUniLoan.ts index c83c881..ea4cc70 100644 --- a/model/createUniLoan.ts +++ b/model/createUniLoan.ts @@ -9,60 +9,60 @@ * Do not edit the class manually. */ + /** - * Borrow or repay - */ +* Borrow or repay +*/ export class CreateUniLoan { /** - * Currency - */ + * Currency + */ 'currency': string; /** - * type: borrow - borrow, repay - repay - */ + * type: borrow - borrow, repay - repay + */ 'type': CreateUniLoan.Type; /** - * The amount of lending or repaying - */ + * The amount of lending or repaying + */ 'amount': string; /** - * Full repayment. Repay operation only. If the value is `true`, the amount will be ignored and the loan will be repaid in full. - */ + * Full repayment. Repay operation only. If the value is `true`, the amount will be ignored and the loan will be repaid in full. + */ 'repaidAll'?: boolean; /** - * Currency pair - */ + * Currency pair + */ 'currencyPair': string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'type', - baseName: 'type', - type: 'CreateUniLoan.Type', + "name": "type", + "baseName": "type", + "type": "CreateUniLoan.Type" }, { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'repaidAll', - baseName: 'repaid_all', - type: 'boolean', + "name": "repaidAll", + "baseName": "repaid_all", + "type": "boolean" }, { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', - }, - ]; + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" + } ]; static getAttributeTypeMap() { return CreateUniLoan.attributeTypeMap; @@ -71,7 +71,7 @@ export class CreateUniLoan { export namespace CreateUniLoan { export enum Type { - Borrow = 'borrow', - Repay = 'repay', + Borrow = 'borrow', + Repay = 'repay' } } diff --git a/model/crossMarginAccount.ts b/model/crossMarginAccount.ts index a01b06f..e141b7d 100644 --- a/model/crossMarginAccount.ts +++ b/model/crossMarginAccount.ts @@ -13,162 +13,162 @@ import { CrossMarginBalance } from './crossMarginBalance'; export class CrossMarginAccount { /** - * User ID - */ + * User ID + */ 'userId'?: number; /** - * Time of the most recent refresh - */ + * Time of the most recent refresh + */ 'refreshTime'?: number; /** - * Whether account is locked - */ + * Whether account is locked + */ 'locked'?: boolean; - 'balances'?: { [key: string]: CrossMarginBalance }; + 'balances'?: { [key: string]: CrossMarginBalance; }; /** - * Total account value in USDT, i.e., the sum of all currencies\' `(available+freeze)*price*discount` - */ + * Total account value in USDT, i.e., the sum of all currencies\' `(available+freeze)*price*discount` + */ 'total'?: string; /** - * Total borrowed value in USDT, i.e., the sum of all currencies\' `borrowed*price*discount` - */ + * Total borrowed value in USDT, i.e., the sum of all currencies\' `borrowed*price*discount` + */ 'borrowed'?: string; /** - * Total unpaid interests in USDT, i.e., the sum of all currencies\' `interest*price*discount` - */ + * Total unpaid interests in USDT, i.e., the sum of all currencies\' `interest*price*discount` + */ 'interest'?: string; /** - * Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` - */ + * Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` + */ 'risk'?: string; /** - * Total initial margin - */ + * Total initial margin + */ 'totalInitialMargin'?: string; /** - * Total Margin Balance (∑(positive equity * index price * discount) + ∑(negative equity * index price)) - */ + * Total Margin Balance (∑(positive equity * index price * discount) + ∑(negative equity * index price)) + */ 'totalMarginBalance'?: string; /** - * Total maintenance margin - */ + * Total maintenance margin + */ 'totalMaintenanceMargin'?: string; /** - * Total initial margin rate - */ + * Total initial margin rate + */ 'totalInitialMarginRate'?: string; /** - * Total maintenance margin rate - */ + * Total maintenance margin rate + */ 'totalMaintenanceMarginRate'?: string; /** - * Total available margin - */ + * Total available margin + */ 'totalAvailableMargin'?: string; /** - * Total amount of the portfolio margin account - */ + * Total amount of the portfolio margin account + */ 'portfolioMarginTotal'?: string; /** - * Total liabilities of the portfolio margin account - */ + * Total liabilities of the portfolio margin account + */ 'portfolioMarginTotalLiab'?: string; /** - * Total equity of the portfolio margin account - */ + * Total equity of the portfolio margin account + */ 'portfolioMarginTotalEquity'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'userId', - baseName: 'user_id', - type: 'number', + "name": "userId", + "baseName": "user_id", + "type": "number" }, { - name: 'refreshTime', - baseName: 'refresh_time', - type: 'number', + "name": "refreshTime", + "baseName": "refresh_time", + "type": "number" }, { - name: 'locked', - baseName: 'locked', - type: 'boolean', + "name": "locked", + "baseName": "locked", + "type": "boolean" }, { - name: 'balances', - baseName: 'balances', - type: '{ [key: string]: CrossMarginBalance; }', + "name": "balances", + "baseName": "balances", + "type": "{ [key: string]: CrossMarginBalance; }" }, { - name: 'total', - baseName: 'total', - type: 'string', + "name": "total", + "baseName": "total", + "type": "string" }, { - name: 'borrowed', - baseName: 'borrowed', - type: 'string', + "name": "borrowed", + "baseName": "borrowed", + "type": "string" }, { - name: 'interest', - baseName: 'interest', - type: 'string', + "name": "interest", + "baseName": "interest", + "type": "string" }, { - name: 'risk', - baseName: 'risk', - type: 'string', + "name": "risk", + "baseName": "risk", + "type": "string" }, { - name: 'totalInitialMargin', - baseName: 'total_initial_margin', - type: 'string', + "name": "totalInitialMargin", + "baseName": "total_initial_margin", + "type": "string" }, { - name: 'totalMarginBalance', - baseName: 'total_margin_balance', - type: 'string', + "name": "totalMarginBalance", + "baseName": "total_margin_balance", + "type": "string" }, { - name: 'totalMaintenanceMargin', - baseName: 'total_maintenance_margin', - type: 'string', + "name": "totalMaintenanceMargin", + "baseName": "total_maintenance_margin", + "type": "string" }, { - name: 'totalInitialMarginRate', - baseName: 'total_initial_margin_rate', - type: 'string', + "name": "totalInitialMarginRate", + "baseName": "total_initial_margin_rate", + "type": "string" }, { - name: 'totalMaintenanceMarginRate', - baseName: 'total_maintenance_margin_rate', - type: 'string', + "name": "totalMaintenanceMarginRate", + "baseName": "total_maintenance_margin_rate", + "type": "string" }, { - name: 'totalAvailableMargin', - baseName: 'total_available_margin', - type: 'string', + "name": "totalAvailableMargin", + "baseName": "total_available_margin", + "type": "string" }, { - name: 'portfolioMarginTotal', - baseName: 'portfolio_margin_total', - type: 'string', + "name": "portfolioMarginTotal", + "baseName": "portfolio_margin_total", + "type": "string" }, { - name: 'portfolioMarginTotalLiab', - baseName: 'portfolio_margin_total_liab', - type: 'string', + "name": "portfolioMarginTotalLiab", + "baseName": "portfolio_margin_total_liab", + "type": "string" }, { - name: 'portfolioMarginTotalEquity', - baseName: 'portfolio_margin_total_equity', - type: 'string', - }, - ]; + "name": "portfolioMarginTotalEquity", + "baseName": "portfolio_margin_total_equity", + "type": "string" + } ]; static getAttributeTypeMap() { return CrossMarginAccount.attributeTypeMap; } } + diff --git a/model/crossMarginAccountBook.ts b/model/crossMarginAccountBook.ts index 3004c57..8dd7524 100644 --- a/model/crossMarginAccountBook.ts +++ b/model/crossMarginAccountBook.ts @@ -9,68 +9,69 @@ * Do not edit the class manually. */ + export class CrossMarginAccountBook { /** - * Balance change record ID - */ + * Balance change record ID + */ 'id'?: string; /** - * The timestamp of the change (in milliseconds) - */ + * The timestamp of the change (in milliseconds) + */ 'time'?: number; /** - * Currency changed - */ + * Currency changed + */ 'currency'?: string; /** - * Amount changed. Positive value means transferring in, while negative out - */ + * Amount changed. Positive value means transferring in, while negative out + */ 'change'?: string; /** - * Balance after change - */ + * Balance after change + */ 'balance'?: string; /** - * Account book type. Please refer to [account book type](#accountbook-type) for more detail - */ + * Account book type. Please refer to [account book type](#accountbook-type) for more detail + */ 'type'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'string', + "name": "id", + "baseName": "id", + "type": "string" }, { - name: 'time', - baseName: 'time', - type: 'number', + "name": "time", + "baseName": "time", + "type": "number" }, { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'change', - baseName: 'change', - type: 'string', + "name": "change", + "baseName": "change", + "type": "string" }, { - name: 'balance', - baseName: 'balance', - type: 'string', + "name": "balance", + "baseName": "balance", + "type": "string" }, { - name: 'type', - baseName: 'type', - type: 'string', - }, - ]; + "name": "type", + "baseName": "type", + "type": "string" + } ]; static getAttributeTypeMap() { return CrossMarginAccountBook.attributeTypeMap; } } + diff --git a/model/crossMarginBalance.ts b/model/crossMarginBalance.ts index 8b8d35e..116082a 100644 --- a/model/crossMarginBalance.ts +++ b/model/crossMarginBalance.ts @@ -9,95 +9,96 @@ * Do not edit the class manually. */ + export class CrossMarginBalance { /** - * Available amount - */ + * Available amount + */ 'available'?: string; /** - * Locked amount - */ + * Locked amount + */ 'freeze'?: string; /** - * Borrowed amount - */ + * Borrowed amount + */ 'borrowed'?: string; /** - * Unpaid interests - */ + * Unpaid interests + */ 'interest'?: string; /** - * Negative Liabilities. Formula:Min[available+total+unrealized_pnl,0] - */ + * Negative Liabilities. Formula:Min[available+total+unrealized_pnl,0] + */ 'negativeLiab'?: string; /** - * Borrowing to Open Positions in Futures - */ + * Borrowing to Open Positions in Futures + */ 'futuresPosLiab'?: string; /** - * Equity. Formula: available + freeze - borrowed + futures account\'s total + unrealized_pnl - */ + * Equity. Formula: available + freeze - borrowed + futures account\'s total + unrealized_pnl + */ 'equity'?: string; /** - * Total freeze. Formula: freeze + position_initial_margin + order_margin - */ + * Total freeze. Formula: freeze + position_initial_margin + order_margin + */ 'totalFreeze'?: string; /** - * Total liabilities. Formula: Max[Abs[Min[quity - total_freeze,0], borrowed]] - futures_pos_liab - */ + * Total liabilities. Formula: Max[Abs[Min[quity - total_freeze,0], borrowed]] - futures_pos_liab + */ 'totalLiab'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'available', - baseName: 'available', - type: 'string', + "name": "available", + "baseName": "available", + "type": "string" }, { - name: 'freeze', - baseName: 'freeze', - type: 'string', + "name": "freeze", + "baseName": "freeze", + "type": "string" }, { - name: 'borrowed', - baseName: 'borrowed', - type: 'string', + "name": "borrowed", + "baseName": "borrowed", + "type": "string" }, { - name: 'interest', - baseName: 'interest', - type: 'string', + "name": "interest", + "baseName": "interest", + "type": "string" }, { - name: 'negativeLiab', - baseName: 'negative_liab', - type: 'string', + "name": "negativeLiab", + "baseName": "negative_liab", + "type": "string" }, { - name: 'futuresPosLiab', - baseName: 'futures_pos_liab', - type: 'string', + "name": "futuresPosLiab", + "baseName": "futures_pos_liab", + "type": "string" }, { - name: 'equity', - baseName: 'equity', - type: 'string', + "name": "equity", + "baseName": "equity", + "type": "string" }, { - name: 'totalFreeze', - baseName: 'total_freeze', - type: 'string', + "name": "totalFreeze", + "baseName": "total_freeze", + "type": "string" }, { - name: 'totalLiab', - baseName: 'total_liab', - type: 'string', - }, - ]; + "name": "totalLiab", + "baseName": "total_liab", + "type": "string" + } ]; static getAttributeTypeMap() { return CrossMarginBalance.attributeTypeMap; } } + diff --git a/model/crossMarginBalance1.ts b/model/crossMarginBalance1.ts index c7f084e..a831c89 100644 --- a/model/crossMarginBalance1.ts +++ b/model/crossMarginBalance1.ts @@ -9,50 +9,51 @@ * Do not edit the class manually. */ + export class CrossMarginBalance1 { /** - * Available amount - */ + * Available amount + */ 'available'?: string; /** - * Locked amount - */ + * Locked amount + */ 'freeze'?: string; /** - * Borrowed amount - */ + * Borrowed amount + */ 'borrowed'?: string; /** - * Unpaid interests - */ + * Unpaid interests + */ 'interest'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'available', - baseName: 'available', - type: 'string', + "name": "available", + "baseName": "available", + "type": "string" }, { - name: 'freeze', - baseName: 'freeze', - type: 'string', + "name": "freeze", + "baseName": "freeze", + "type": "string" }, { - name: 'borrowed', - baseName: 'borrowed', - type: 'string', + "name": "borrowed", + "baseName": "borrowed", + "type": "string" }, { - name: 'interest', - baseName: 'interest', - type: 'string', - }, - ]; + "name": "interest", + "baseName": "interest", + "type": "string" + } ]; static getAttributeTypeMap() { return CrossMarginBalance1.attributeTypeMap; } } + diff --git a/model/crossMarginBorrowable.ts b/model/crossMarginBorrowable.ts deleted file mode 100644 index 7a59d4d..0000000 --- a/model/crossMarginBorrowable.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Gate API v4 - * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. - * - * Contact: support@mail.gate.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export class CrossMarginBorrowable { - /** - * Currency detail - */ - 'currency'?: string; - /** - * Max borrowable amount - */ - 'amount'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ - { - name: 'currency', - baseName: 'currency', - type: 'string', - }, - { - name: 'amount', - baseName: 'amount', - type: 'string', - }, - ]; - - static getAttributeTypeMap() { - return CrossMarginBorrowable.attributeTypeMap; - } -} diff --git a/model/crossMarginCurrency.ts b/model/crossMarginCurrency.ts index d8daa16..1aa07b9 100644 --- a/model/crossMarginCurrency.ts +++ b/model/crossMarginCurrency.ts @@ -9,104 +9,105 @@ * Do not edit the class manually. */ + export class CrossMarginCurrency { /** - * Currency name - */ + * Currency name + */ 'name'?: string; /** - * Minimum lending rate (hourly rate) - */ + * Minimum lending rate (hourly rate) + */ 'rate'?: string; /** - * Currency precision - */ + * Currency precision + */ 'prec'?: string; /** - * Currency value discount, which is used in total value calculation - */ + * Currency value discount, which is used in total value calculation + */ 'discount'?: string; /** - * Minimum currency borrow amount. Unit is currency itself - */ + * Minimum currency borrow amount. Unit is currency itself + */ 'minBorrowAmount'?: string; /** - * Maximum borrow value allowed per user, in USDT - */ + * Maximum borrow value allowed per user, in USDT + */ 'userMaxBorrowAmount'?: string; /** - * Maximum borrow value allowed for this currency, in USDT - */ + * Maximum borrow value allowed for this currency, in USDT + */ 'totalMaxBorrowAmount'?: string; /** - * Price change between this currency and USDT - */ + * Price change between this currency and USDT + */ 'price'?: string; /** - * Whether currency is borrowed - */ + * Whether currency is borrowed + */ 'loanable'?: boolean; /** - * status - `0` : disable - `1` : enable - */ + * status - `0` : disable - `1` : enable + */ 'status'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'name', - baseName: 'name', - type: 'string', + "name": "name", + "baseName": "name", + "type": "string" }, { - name: 'rate', - baseName: 'rate', - type: 'string', + "name": "rate", + "baseName": "rate", + "type": "string" }, { - name: 'prec', - baseName: 'prec', - type: 'string', + "name": "prec", + "baseName": "prec", + "type": "string" }, { - name: 'discount', - baseName: 'discount', - type: 'string', + "name": "discount", + "baseName": "discount", + "type": "string" }, { - name: 'minBorrowAmount', - baseName: 'min_borrow_amount', - type: 'string', + "name": "minBorrowAmount", + "baseName": "min_borrow_amount", + "type": "string" }, { - name: 'userMaxBorrowAmount', - baseName: 'user_max_borrow_amount', - type: 'string', + "name": "userMaxBorrowAmount", + "baseName": "user_max_borrow_amount", + "type": "string" }, { - name: 'totalMaxBorrowAmount', - baseName: 'total_max_borrow_amount', - type: 'string', + "name": "totalMaxBorrowAmount", + "baseName": "total_max_borrow_amount", + "type": "string" }, { - name: 'price', - baseName: 'price', - type: 'string', + "name": "price", + "baseName": "price", + "type": "string" }, { - name: 'loanable', - baseName: 'loanable', - type: 'boolean', + "name": "loanable", + "baseName": "loanable", + "type": "boolean" }, { - name: 'status', - baseName: 'status', - type: 'number', - }, - ]; + "name": "status", + "baseName": "status", + "type": "number" + } ]; static getAttributeTypeMap() { return CrossMarginCurrency.attributeTypeMap; } } + diff --git a/model/crossMarginLoan.ts b/model/crossMarginLoan.ts index 938e17f..b358856 100644 --- a/model/crossMarginLoan.ts +++ b/model/crossMarginLoan.ts @@ -9,102 +9,102 @@ * Do not edit the class manually. */ + export class CrossMarginLoan { /** - * Loan record ID - */ + * Loan record ID + */ 'id'?: string; /** - * Creation timestamp, in milliseconds - */ + * Creation timestamp, in milliseconds + */ 'createTime'?: number; /** - * Update timestamp, in milliseconds - */ + * Update timestamp, in milliseconds + */ 'updateTime'?: number; /** - * Currency name - */ + * Currency name + */ 'currency': string; /** - * Borrowed amount - */ + * Borrowed amount + */ 'amount': string; /** - * User defined custom ID - */ + * User defined custom ID + */ 'text'?: string; /** - * 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 - */ + * 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 + */ 'status'?: CrossMarginLoan.Status; /** - * Repaid amount - */ + * Repaid amount + */ 'repaid'?: string; /** - * Repaid interest - */ + * Repaid interest + */ 'repaidInterest'?: string; /** - * Outstanding interest yet to be paid - */ + * Outstanding interest yet to be paid + */ 'unpaidInterest'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'string', + "name": "id", + "baseName": "id", + "type": "string" }, { - name: 'createTime', - baseName: 'create_time', - type: 'number', + "name": "createTime", + "baseName": "create_time", + "type": "number" }, { - name: 'updateTime', - baseName: 'update_time', - type: 'number', + "name": "updateTime", + "baseName": "update_time", + "type": "number" }, { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'text', - baseName: 'text', - type: 'string', + "name": "text", + "baseName": "text", + "type": "string" }, { - name: 'status', - baseName: 'status', - type: 'CrossMarginLoan.Status', + "name": "status", + "baseName": "status", + "type": "CrossMarginLoan.Status" }, { - name: 'repaid', - baseName: 'repaid', - type: 'string', + "name": "repaid", + "baseName": "repaid", + "type": "string" }, { - name: 'repaidInterest', - baseName: 'repaid_interest', - type: 'string', + "name": "repaidInterest", + "baseName": "repaid_interest", + "type": "string" }, { - name: 'unpaidInterest', - baseName: 'unpaid_interest', - type: 'string', - }, - ]; + "name": "unpaidInterest", + "baseName": "unpaid_interest", + "type": "string" + } ]; static getAttributeTypeMap() { return CrossMarginLoan.attributeTypeMap; @@ -113,8 +113,8 @@ export class CrossMarginLoan { export namespace CrossMarginLoan { export enum Status { - NUMBER_1 = 1, - NUMBER_2 = 2, - NUMBER_3 = 3, + NUMBER_1 = 1, + NUMBER_2 = 2, + NUMBER_3 = 3 } } diff --git a/model/crossMarginRepayRequest.ts b/model/crossMarginRepayRequest.ts index d014f29..00e2c53 100644 --- a/model/crossMarginRepayRequest.ts +++ b/model/crossMarginRepayRequest.ts @@ -9,32 +9,33 @@ * Do not edit the class manually. */ + export class CrossMarginRepayRequest { /** - * Repayment currency - */ + * Repayment currency + */ 'currency': string; /** - * Repayment amount - */ + * Repayment amount + */ 'amount': string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', - }, - ]; + "name": "amount", + "baseName": "amount", + "type": "string" + } ]; static getAttributeTypeMap() { return CrossMarginRepayRequest.attributeTypeMap; } } + diff --git a/model/crossMarginRepayment.ts b/model/crossMarginRepayment.ts index 3a9dab4..4d8f20b 100644 --- a/model/crossMarginRepayment.ts +++ b/model/crossMarginRepayment.ts @@ -9,77 +9,78 @@ * Do not edit the class manually. */ + export class CrossMarginRepayment { /** - * Loan record ID - */ + * Loan record ID + */ 'id'?: string; /** - * Repayment time - */ + * Repayment time + */ 'createTime'?: number; /** - * Loan record ID - */ + * Loan record ID + */ 'loanId'?: string; /** - * Currency name - */ + * Currency name + */ 'currency'?: string; /** - * Repaid principal - */ + * Repaid principal + */ 'principal'?: string; /** - * Repaid interest - */ + * Repaid interest + */ 'interest'?: string; /** - * Repayment type: none - no repayment type, manual_repay - manual repayment, auto_repay - automatic repayment, cancel_auto_repay - automatic repayment after cancellation - */ + * Repayment type: none - no repayment type, manual_repay - manual repayment, auto_repay - automatic repayment, cancel_auto_repay - automatic repayment after cancellation + */ 'repaymentType'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'string', + "name": "id", + "baseName": "id", + "type": "string" }, { - name: 'createTime', - baseName: 'create_time', - type: 'number', + "name": "createTime", + "baseName": "create_time", + "type": "number" }, { - name: 'loanId', - baseName: 'loan_id', - type: 'string', + "name": "loanId", + "baseName": "loan_id", + "type": "string" }, { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'principal', - baseName: 'principal', - type: 'string', + "name": "principal", + "baseName": "principal", + "type": "string" }, { - name: 'interest', - baseName: 'interest', - type: 'string', + "name": "interest", + "baseName": "interest", + "type": "string" }, { - name: 'repaymentType', - baseName: 'repayment_type', - type: 'string', - }, - ]; + "name": "repaymentType", + "baseName": "repayment_type", + "type": "string" + } ]; static getAttributeTypeMap() { return CrossMarginRepayment.attributeTypeMap; } } + diff --git a/model/crossMarginTransferable.ts b/model/crossMarginTransferable.ts index fb7e499..280f90e 100644 --- a/model/crossMarginTransferable.ts +++ b/model/crossMarginTransferable.ts @@ -9,32 +9,33 @@ * Do not edit the class manually. */ + export class CrossMarginTransferable { /** - * Currency detail - */ + * Currency detail + */ 'currency'?: string; /** - * Max transferable amount - */ + * Max transferable amount + */ 'amount'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', - }, - ]; + "name": "amount", + "baseName": "amount", + "type": "string" + } ]; static getAttributeTypeMap() { return CrossMarginTransferable.attributeTypeMap; } } + diff --git a/model/currency.ts b/model/currency.ts index 3d5a1be..982d4fb 100644 --- a/model/currency.ts +++ b/model/currency.ts @@ -9,86 +9,87 @@ * Do not edit the class manually. */ + export class Currency { /** - * Currency name - */ + * Currency name + */ 'currency'?: string; /** - * Whether currency is de-listed - */ + * Whether currency is de-listed + */ 'delisted'?: boolean; /** - * Whether currency\'s withdrawal is disabled - */ + * Whether currency\'s withdrawal is disabled + */ 'withdrawDisabled'?: boolean; /** - * Whether currency\'s withdrawal is delayed - */ + * Whether currency\'s withdrawal is delayed + */ 'withdrawDelayed'?: boolean; /** - * Whether currency\'s deposit is disabled - */ + * Whether currency\'s deposit is disabled + */ 'depositDisabled'?: boolean; /** - * Whether currency\'s trading is disabled - */ + * Whether currency\'s trading is disabled + */ 'tradeDisabled'?: boolean; /** - * Fixed fee rate. Only for fixed rate currencies, not valid for normal currencies - */ + * Fixed fee rate. Only for fixed rate currencies, not valid for normal currencies + */ 'fixedRate'?: string; /** - * Chain of currency - */ + * Chain of currency + */ 'chain'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'delisted', - baseName: 'delisted', - type: 'boolean', + "name": "delisted", + "baseName": "delisted", + "type": "boolean" }, { - name: 'withdrawDisabled', - baseName: 'withdraw_disabled', - type: 'boolean', + "name": "withdrawDisabled", + "baseName": "withdraw_disabled", + "type": "boolean" }, { - name: 'withdrawDelayed', - baseName: 'withdraw_delayed', - type: 'boolean', + "name": "withdrawDelayed", + "baseName": "withdraw_delayed", + "type": "boolean" }, { - name: 'depositDisabled', - baseName: 'deposit_disabled', - type: 'boolean', + "name": "depositDisabled", + "baseName": "deposit_disabled", + "type": "boolean" }, { - name: 'tradeDisabled', - baseName: 'trade_disabled', - type: 'boolean', + "name": "tradeDisabled", + "baseName": "trade_disabled", + "type": "boolean" }, { - name: 'fixedRate', - baseName: 'fixed_rate', - type: 'string', + "name": "fixedRate", + "baseName": "fixed_rate", + "type": "string" }, { - name: 'chain', - baseName: 'chain', - type: 'string', - }, - ]; + "name": "chain", + "baseName": "chain", + "type": "string" + } ]; static getAttributeTypeMap() { return Currency.attributeTypeMap; } } + diff --git a/model/currencyChain.ts b/model/currencyChain.ts index ff2f5b3..868196d 100644 --- a/model/currencyChain.ts +++ b/model/currencyChain.ts @@ -9,86 +9,87 @@ * Do not edit the class manually. */ + export class CurrencyChain { /** - * Chain name - */ + * Chain name + */ 'chain'?: string; /** - * Chain name in Chinese - */ + * Chain name in Chinese + */ 'nameCn'?: string; /** - * Chain name in English - */ + * Chain name in English + */ 'nameEn'?: string; /** - * Smart contract address for the currency; if no address is available, it will be an empty string - */ + * Smart contract address for the currency; if no address is available, it will be an empty string + */ 'contractAddress'?: string; /** - * If it is disabled. 0 means NOT being disabled - */ + * If it is disabled. 0 means NOT being disabled + */ 'isDisabled'?: number; /** - * Is deposit disabled. 0 means not - */ + * Is deposit disabled. 0 means not + */ 'isDepositDisabled'?: number; /** - * Is withdrawal disabled. 0 means not - */ + * Is withdrawal disabled. 0 means not + */ 'isWithdrawDisabled'?: number; /** - * Withdrawal precision - */ + * Withdrawal precision + */ 'decimal'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'chain', - baseName: 'chain', - type: 'string', + "name": "chain", + "baseName": "chain", + "type": "string" }, { - name: 'nameCn', - baseName: 'name_cn', - type: 'string', + "name": "nameCn", + "baseName": "name_cn", + "type": "string" }, { - name: 'nameEn', - baseName: 'name_en', - type: 'string', + "name": "nameEn", + "baseName": "name_en", + "type": "string" }, { - name: 'contractAddress', - baseName: 'contract_address', - type: 'string', + "name": "contractAddress", + "baseName": "contract_address", + "type": "string" }, { - name: 'isDisabled', - baseName: 'is_disabled', - type: 'number', + "name": "isDisabled", + "baseName": "is_disabled", + "type": "number" }, { - name: 'isDepositDisabled', - baseName: 'is_deposit_disabled', - type: 'number', + "name": "isDepositDisabled", + "baseName": "is_deposit_disabled", + "type": "number" }, { - name: 'isWithdrawDisabled', - baseName: 'is_withdraw_disabled', - type: 'number', + "name": "isWithdrawDisabled", + "baseName": "is_withdraw_disabled", + "type": "number" }, { - name: 'decimal', - baseName: 'decimal', - type: 'string', - }, - ]; + "name": "decimal", + "baseName": "decimal", + "type": "string" + } ]; static getAttributeTypeMap() { return CurrencyChain.attributeTypeMap; } } + diff --git a/model/currencyPair.ts b/model/currencyPair.ts index 8fdaacc..0296aac 100644 --- a/model/currencyPair.ts +++ b/model/currencyPair.ts @@ -9,141 +9,141 @@ * Do not edit the class manually. */ + /** - * Spot currency pair - */ +* Spot currency pair +*/ export class CurrencyPair { /** - * Currency pair - */ + * Currency pair + */ 'id'?: string; /** - * Base currency - */ + * Base currency + */ 'base'?: string; /** - * Quote currency - */ + * Quote currency + */ 'quote'?: string; /** - * Trading fee - */ + * Trading fee + */ 'fee'?: string; /** - * Minimum amount of base currency to trade, `null` means no limit - */ + * Minimum amount of base currency to trade, `null` means no limit + */ 'minBaseAmount'?: string; /** - * Minimum amount of quote currency to trade, `null` means no limit - */ + * Minimum amount of quote currency to trade, `null` means no limit + */ 'minQuoteAmount'?: string; /** - * Maximum amount of base currency to trade, `null` means no limit - */ + * Maximum amount of base currency to trade, `null` means no limit + */ 'maxBaseAmount'?: string; /** - * Maximum amount of quote currency to trade, `null` means no limit - */ + * Maximum amount of quote currency to trade, `null` means no limit + */ 'maxQuoteAmount'?: string; /** - * Amount scale - */ + * Amount scale + */ 'amountPrecision'?: number; /** - * Price scale - */ + * Price scale + */ 'precision'?: number; /** - * 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 - */ + * 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 + */ 'tradeStatus'?: CurrencyPair.TradeStatus; /** - * Sell start unix timestamp in seconds - */ + * Sell start unix timestamp in seconds + */ 'sellStart'?: number; /** - * Buy start unix timestamp in seconds - */ + * Buy start unix timestamp in seconds + */ 'buyStart'?: number; /** - * 交易对类型,normal:常规, premarket:盘前 - */ + * Trading pair type, normal: normal, premarket: pre-market + */ 'type'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'string', + "name": "id", + "baseName": "id", + "type": "string" }, { - name: 'base', - baseName: 'base', - type: 'string', + "name": "base", + "baseName": "base", + "type": "string" }, { - name: 'quote', - baseName: 'quote', - type: 'string', + "name": "quote", + "baseName": "quote", + "type": "string" }, { - name: 'fee', - baseName: 'fee', - type: 'string', + "name": "fee", + "baseName": "fee", + "type": "string" }, { - name: 'minBaseAmount', - baseName: 'min_base_amount', - type: 'string', + "name": "minBaseAmount", + "baseName": "min_base_amount", + "type": "string" }, { - name: 'minQuoteAmount', - baseName: 'min_quote_amount', - type: 'string', + "name": "minQuoteAmount", + "baseName": "min_quote_amount", + "type": "string" }, { - name: 'maxBaseAmount', - baseName: 'max_base_amount', - type: 'string', + "name": "maxBaseAmount", + "baseName": "max_base_amount", + "type": "string" }, { - name: 'maxQuoteAmount', - baseName: 'max_quote_amount', - type: 'string', + "name": "maxQuoteAmount", + "baseName": "max_quote_amount", + "type": "string" }, { - name: 'amountPrecision', - baseName: 'amount_precision', - type: 'number', + "name": "amountPrecision", + "baseName": "amount_precision", + "type": "number" }, { - name: 'precision', - baseName: 'precision', - type: 'number', + "name": "precision", + "baseName": "precision", + "type": "number" }, { - name: 'tradeStatus', - baseName: 'trade_status', - type: 'CurrencyPair.TradeStatus', + "name": "tradeStatus", + "baseName": "trade_status", + "type": "CurrencyPair.TradeStatus" }, { - name: 'sellStart', - baseName: 'sell_start', - type: 'number', + "name": "sellStart", + "baseName": "sell_start", + "type": "number" }, { - name: 'buyStart', - baseName: 'buy_start', - type: 'number', + "name": "buyStart", + "baseName": "buy_start", + "type": "number" }, { - name: 'type', - baseName: 'type', - type: 'string', - }, - ]; + "name": "type", + "baseName": "type", + "type": "string" + } ]; static getAttributeTypeMap() { return CurrencyPair.attributeTypeMap; @@ -152,9 +152,9 @@ export class CurrencyPair { export namespace CurrencyPair { export enum TradeStatus { - Untradable = 'untradable', - Buyable = 'buyable', - Sellable = 'sellable', - Tradable = 'tradable', + Untradable = 'untradable', + Buyable = 'buyable', + Sellable = 'sellable', + Tradable = 'tradable' } } diff --git a/model/currencyQuota.ts b/model/currencyQuota.ts index be28d30..fb9c644 100644 --- a/model/currencyQuota.ts +++ b/model/currencyQuota.ts @@ -9,62 +9,63 @@ * Do not edit the class manually. */ + /** - * Currency Quota - */ +* Currency Quota +*/ export class CurrencyQuota { /** - * Currency - */ + * Currency + */ 'currency'?: string; /** - * Currency Index Price - */ + * Currency Index Price + */ 'indexPrice'?: string; /** - * Minimum borrowing/collateral quota for the currency - */ + * Minimum borrowing/collateral quota for the currency + */ 'minQuota'?: string; /** - * Remaining borrowing/collateral limit for the currency - */ + * Remaining borrowing/collateral limit for the currency + */ 'leftQuota'?: string; /** - * Remaining currency limit converted to USDT - */ + * Remaining currency limit converted to USDT + */ 'leftQuoteUsdt'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'indexPrice', - baseName: 'index_price', - type: 'string', + "name": "indexPrice", + "baseName": "index_price", + "type": "string" }, { - name: 'minQuota', - baseName: 'min_quota', - type: 'string', + "name": "minQuota", + "baseName": "min_quota", + "type": "string" }, { - name: 'leftQuota', - baseName: 'left_quota', - type: 'string', + "name": "leftQuota", + "baseName": "left_quota", + "type": "string" }, { - name: 'leftQuoteUsdt', - baseName: 'left_quote_usdt', - type: 'string', - }, - ]; + "name": "leftQuoteUsdt", + "baseName": "left_quote_usdt", + "type": "string" + } ]; static getAttributeTypeMap() { return CurrencyQuota.attributeTypeMap; } } + diff --git a/model/inlineObject1.ts b/model/debitFee.ts similarity index 65% rename from model/inlineObject1.ts rename to model/debitFee.ts index 7115895..a6aefad 100644 --- a/model/inlineObject1.ts +++ b/model/debitFee.ts @@ -9,23 +9,24 @@ * Do not edit the class manually. */ -export class InlineObject1 { + +export class DebitFee { /** - * Whether GT fee discount is used - */ + * Whether GT fee discount is used + */ 'enabled': boolean; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'enabled', - baseName: 'enabled', - type: 'boolean', - }, - ]; + "name": "enabled", + "baseName": "enabled", + "type": "boolean" + } ]; static getAttributeTypeMap() { - return InlineObject1.attributeTypeMap; + return DebitFee.attributeTypeMap; } } + diff --git a/model/deliveryCandlestick.ts b/model/deliveryCandlestick.ts index 995e8e3..243eead 100644 --- a/model/deliveryCandlestick.ts +++ b/model/deliveryCandlestick.ts @@ -9,71 +9,72 @@ * Do not edit the class manually. */ + /** - * data point in every timestamp - */ +* data point in every timestamp +*/ export class DeliveryCandlestick { /** - * Unix timestamp in seconds - */ + * Unix timestamp in seconds + */ 't'?: number; /** - * size volume (contract size). Only returned if `contract` is not prefixed - */ + * size volume (contract size). Only returned if `contract` is not prefixed + */ 'v'?: number; /** - * Close price (quote currency) - */ + * Close price (quote currency) + */ 'c'?: string; /** - * Highest price (quote currency) - */ + * Highest price (quote currency) + */ 'h'?: string; /** - * Lowest price (quote currency) - */ + * Lowest price (quote currency) + */ 'l'?: string; /** - * Open price (quote currency) - */ + * Open price (quote currency) + */ 'o'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 't', - baseName: 't', - type: 'number', + "name": "t", + "baseName": "t", + "type": "number" }, { - name: 'v', - baseName: 'v', - type: 'number', + "name": "v", + "baseName": "v", + "type": "number" }, { - name: 'c', - baseName: 'c', - type: 'string', + "name": "c", + "baseName": "c", + "type": "string" }, { - name: 'h', - baseName: 'h', - type: 'string', + "name": "h", + "baseName": "h", + "type": "string" }, { - name: 'l', - baseName: 'l', - type: 'string', + "name": "l", + "baseName": "l", + "type": "string" }, { - name: 'o', - baseName: 'o', - type: 'string', - }, - ]; + "name": "o", + "baseName": "o", + "type": "string" + } ]; static getAttributeTypeMap() { return DeliveryCandlestick.attributeTypeMap; } } + diff --git a/model/deliveryContract.ts b/model/deliveryContract.ts index 6366b32..5244158 100644 --- a/model/deliveryContract.ts +++ b/model/deliveryContract.ts @@ -9,357 +9,357 @@ * Do not edit the class manually. */ + /** - * Futures contract details - */ +* Futures contract details +*/ export class DeliveryContract { /** - * Futures contract - */ + * Futures contract + */ 'name'?: string; /** - * Underlying - */ + * Underlying + */ 'underlying'?: string; /** - * Cycle type, e.g. WEEKLY, QUARTERLY - */ + * Cycle type, e.g. WEEKLY, QUARTERLY + */ 'cycle'?: DeliveryContract.Cycle; /** - * Futures contract type - */ + * Futures contract type + */ 'type'?: DeliveryContract.Type; /** - * Multiplier used in converting from invoicing to settlement currency - */ + * Multiplier used in converting from invoicing to settlement currency + */ 'quantoMultiplier'?: string; /** - * Minimum leverage - */ + * Minimum leverage + */ 'leverageMin'?: string; /** - * Maximum leverage - */ + * Maximum leverage + */ 'leverageMax'?: string; /** - * Maintenance rate of margin - */ + * Maintenance rate of margin + */ 'maintenanceRate'?: string; /** - * Mark price type, internal - based on internal trading, index - based on external index price - */ + * Mark price type, internal - based on internal trading, index - based on external index price + */ 'markType'?: DeliveryContract.MarkType; /** - * Current mark price - */ + * Current mark price + */ 'markPrice'?: string; /** - * Current index price - */ + * Current index price + */ 'indexPrice'?: string; /** - * Last trading price - */ + * Last trading price + */ 'lastPrice'?: string; /** - * Maker fee rate, where negative means rebate - */ + * Maker fee rate, where negative means rebate + */ 'makerFeeRate'?: string; /** - * Taker fee rate - */ + * Taker fee rate + */ 'takerFeeRate'?: string; /** - * Minimum order price increment - */ + * Minimum order price increment + */ 'orderPriceRound'?: string; /** - * Minimum mark price increment - */ + * Minimum mark price increment + */ 'markPriceRound'?: string; /** - * Fair basis rate - */ + * Fair basis rate + */ 'basisRate'?: string; /** - * Fair basis value - */ + * Fair basis value + */ 'basisValue'?: string; /** - * Funding used for calculating impact bid, ask price - */ + * Funding used for calculating impact bid, ask price + */ 'basisImpactValue'?: string; /** - * Settle price - */ + * Settle price + */ 'settlePrice'?: string; /** - * Settle price update interval - */ + * Settle price update interval + */ 'settlePriceInterval'?: number; /** - * Settle price update duration in seconds - */ + * Settle price update duration in seconds + */ 'settlePriceDuration'?: number; /** - * Contract expiry timestamp - */ + * Contract expiry timestamp + */ 'expireTime'?: number; /** - * Risk limit base - */ + * Risk limit base + */ 'riskLimitBase'?: string; /** - * Step of adjusting risk limit - */ + * Step of adjusting risk limit + */ 'riskLimitStep'?: string; /** - * Maximum risk limit the contract allowed - */ + * Maximum risk limit the contract allowed + */ 'riskLimitMax'?: string; /** - * Minimum order size the contract allowed - */ + * Minimum order size the contract allowed + */ 'orderSizeMin'?: number; /** - * Maximum order size the contract allowed - */ + * Maximum order size the contract allowed + */ 'orderSizeMax'?: number; /** - * 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 - */ + * 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 + */ 'orderPriceDeviate'?: string; /** - * Referral fee rate discount - */ + * Referral fee rate discount + */ 'refDiscountRate'?: string; /** - * Referrer commission rate - */ + * Referrer commission rate + */ 'refRebateRate'?: string; /** - * Current orderbook ID - */ + * Current orderbook ID + */ 'orderbookId'?: number; /** - * Current trade ID - */ + * Current trade ID + */ 'tradeId'?: number; /** - * Historical accumulated trade size - */ + * Historical accumulated trade size + */ 'tradeSize'?: number; /** - * Current total long position size - */ + * Current total long position size + */ 'positionSize'?: number; /** - * Last changed time of configuration - */ + * Last changed time of configuration + */ 'configChangeTime'?: number; /** - * Contract is delisting - */ + * Contract is delisting + */ 'inDelisting'?: boolean; /** - * Maximum number of open orders - */ + * Maximum number of open orders + */ 'ordersLimit'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'name', - baseName: 'name', - type: 'string', + "name": "name", + "baseName": "name", + "type": "string" }, { - name: 'underlying', - baseName: 'underlying', - type: 'string', + "name": "underlying", + "baseName": "underlying", + "type": "string" }, { - name: 'cycle', - baseName: 'cycle', - type: 'DeliveryContract.Cycle', + "name": "cycle", + "baseName": "cycle", + "type": "DeliveryContract.Cycle" }, { - name: 'type', - baseName: 'type', - type: 'DeliveryContract.Type', + "name": "type", + "baseName": "type", + "type": "DeliveryContract.Type" }, { - name: 'quantoMultiplier', - baseName: 'quanto_multiplier', - type: 'string', + "name": "quantoMultiplier", + "baseName": "quanto_multiplier", + "type": "string" }, { - name: 'leverageMin', - baseName: 'leverage_min', - type: 'string', + "name": "leverageMin", + "baseName": "leverage_min", + "type": "string" }, { - name: 'leverageMax', - baseName: 'leverage_max', - type: 'string', + "name": "leverageMax", + "baseName": "leverage_max", + "type": "string" }, { - name: 'maintenanceRate', - baseName: 'maintenance_rate', - type: 'string', + "name": "maintenanceRate", + "baseName": "maintenance_rate", + "type": "string" }, { - name: 'markType', - baseName: 'mark_type', - type: 'DeliveryContract.MarkType', + "name": "markType", + "baseName": "mark_type", + "type": "DeliveryContract.MarkType" }, { - name: 'markPrice', - baseName: 'mark_price', - type: 'string', + "name": "markPrice", + "baseName": "mark_price", + "type": "string" }, { - name: 'indexPrice', - baseName: 'index_price', - type: 'string', + "name": "indexPrice", + "baseName": "index_price", + "type": "string" }, { - name: 'lastPrice', - baseName: 'last_price', - type: 'string', + "name": "lastPrice", + "baseName": "last_price", + "type": "string" }, { - name: 'makerFeeRate', - baseName: 'maker_fee_rate', - type: 'string', + "name": "makerFeeRate", + "baseName": "maker_fee_rate", + "type": "string" }, { - name: 'takerFeeRate', - baseName: 'taker_fee_rate', - type: 'string', + "name": "takerFeeRate", + "baseName": "taker_fee_rate", + "type": "string" }, { - name: 'orderPriceRound', - baseName: 'order_price_round', - type: 'string', + "name": "orderPriceRound", + "baseName": "order_price_round", + "type": "string" }, { - name: 'markPriceRound', - baseName: 'mark_price_round', - type: 'string', + "name": "markPriceRound", + "baseName": "mark_price_round", + "type": "string" }, { - name: 'basisRate', - baseName: 'basis_rate', - type: 'string', + "name": "basisRate", + "baseName": "basis_rate", + "type": "string" }, { - name: 'basisValue', - baseName: 'basis_value', - type: 'string', + "name": "basisValue", + "baseName": "basis_value", + "type": "string" }, { - name: 'basisImpactValue', - baseName: 'basis_impact_value', - type: 'string', + "name": "basisImpactValue", + "baseName": "basis_impact_value", + "type": "string" }, { - name: 'settlePrice', - baseName: 'settle_price', - type: 'string', + "name": "settlePrice", + "baseName": "settle_price", + "type": "string" }, { - name: 'settlePriceInterval', - baseName: 'settle_price_interval', - type: 'number', + "name": "settlePriceInterval", + "baseName": "settle_price_interval", + "type": "number" }, { - name: 'settlePriceDuration', - baseName: 'settle_price_duration', - type: 'number', + "name": "settlePriceDuration", + "baseName": "settle_price_duration", + "type": "number" }, { - name: 'expireTime', - baseName: 'expire_time', - type: 'number', + "name": "expireTime", + "baseName": "expire_time", + "type": "number" }, { - name: 'riskLimitBase', - baseName: 'risk_limit_base', - type: 'string', + "name": "riskLimitBase", + "baseName": "risk_limit_base", + "type": "string" }, { - name: 'riskLimitStep', - baseName: 'risk_limit_step', - type: 'string', + "name": "riskLimitStep", + "baseName": "risk_limit_step", + "type": "string" }, { - name: 'riskLimitMax', - baseName: 'risk_limit_max', - type: 'string', + "name": "riskLimitMax", + "baseName": "risk_limit_max", + "type": "string" }, { - name: 'orderSizeMin', - baseName: 'order_size_min', - type: 'number', + "name": "orderSizeMin", + "baseName": "order_size_min", + "type": "number" }, { - name: 'orderSizeMax', - baseName: 'order_size_max', - type: 'number', + "name": "orderSizeMax", + "baseName": "order_size_max", + "type": "number" }, { - name: 'orderPriceDeviate', - baseName: 'order_price_deviate', - type: 'string', + "name": "orderPriceDeviate", + "baseName": "order_price_deviate", + "type": "string" }, { - name: 'refDiscountRate', - baseName: 'ref_discount_rate', - type: 'string', + "name": "refDiscountRate", + "baseName": "ref_discount_rate", + "type": "string" }, { - name: 'refRebateRate', - baseName: 'ref_rebate_rate', - type: 'string', + "name": "refRebateRate", + "baseName": "ref_rebate_rate", + "type": "string" }, { - name: 'orderbookId', - baseName: 'orderbook_id', - type: 'number', + "name": "orderbookId", + "baseName": "orderbook_id", + "type": "number" }, { - name: 'tradeId', - baseName: 'trade_id', - type: 'number', + "name": "tradeId", + "baseName": "trade_id", + "type": "number" }, { - name: 'tradeSize', - baseName: 'trade_size', - type: 'number', + "name": "tradeSize", + "baseName": "trade_size", + "type": "number" }, { - name: 'positionSize', - baseName: 'position_size', - type: 'number', + "name": "positionSize", + "baseName": "position_size", + "type": "number" }, { - name: 'configChangeTime', - baseName: 'config_change_time', - type: 'number', + "name": "configChangeTime", + "baseName": "config_change_time", + "type": "number" }, { - name: 'inDelisting', - baseName: 'in_delisting', - type: 'boolean', + "name": "inDelisting", + "baseName": "in_delisting", + "type": "boolean" }, { - name: 'ordersLimit', - baseName: 'orders_limit', - type: 'number', - }, - ]; + "name": "ordersLimit", + "baseName": "orders_limit", + "type": "number" + } ]; static getAttributeTypeMap() { return DeliveryContract.attributeTypeMap; @@ -368,17 +368,17 @@ export class DeliveryContract { export namespace DeliveryContract { export enum Cycle { - WEEKLY = 'WEEKLY', - BIWEEKLY = 'BI-WEEKLY', - QUARTERLY = 'QUARTERLY', - BIQUARTERLY = 'BI-QUARTERLY', + WEEKLY = 'WEEKLY', + BIWEEKLY = 'BI-WEEKLY', + QUARTERLY = 'QUARTERLY', + BIQUARTERLY = 'BI-QUARTERLY' } export enum Type { - Inverse = 'inverse', - Direct = 'direct', + Inverse = 'inverse', + Direct = 'direct' } export enum MarkType { - Internal = 'internal', - Index = 'index', + Internal = 'internal', + Index = 'index' } } diff --git a/model/deliverySettlement.ts b/model/deliverySettlement.ts index 824e74f..44077dd 100644 --- a/model/deliverySettlement.ts +++ b/model/deliverySettlement.ts @@ -9,95 +9,96 @@ * Do not edit the class manually. */ + export class DeliverySettlement { /** - * Liquidation time - */ + * Liquidation time + */ 'time'?: number; /** - * Futures contract - */ + * Futures contract + */ 'contract'?: string; /** - * Position leverage - */ + * Position leverage + */ 'leverage'?: string; /** - * Position size - */ + * Position size + */ 'size'?: number; /** - * Position margin - */ + * Position margin + */ 'margin'?: string; /** - * Average entry price - */ + * Average entry price + */ 'entryPrice'?: string; /** - * Settled price - */ + * Settled price + */ 'settlePrice'?: string; /** - * Profit - */ + * Profit + */ 'profit'?: string; /** - * Fee deducted - */ + * Fee deducted + */ 'fee'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'time', - baseName: 'time', - type: 'number', + "name": "time", + "baseName": "time", + "type": "number" }, { - name: 'contract', - baseName: 'contract', - type: 'string', + "name": "contract", + "baseName": "contract", + "type": "string" }, { - name: 'leverage', - baseName: 'leverage', - type: 'string', + "name": "leverage", + "baseName": "leverage", + "type": "string" }, { - name: 'size', - baseName: 'size', - type: 'number', + "name": "size", + "baseName": "size", + "type": "number" }, { - name: 'margin', - baseName: 'margin', - type: 'string', + "name": "margin", + "baseName": "margin", + "type": "string" }, { - name: 'entryPrice', - baseName: 'entry_price', - type: 'string', + "name": "entryPrice", + "baseName": "entry_price", + "type": "string" }, { - name: 'settlePrice', - baseName: 'settle_price', - type: 'string', + "name": "settlePrice", + "baseName": "settle_price", + "type": "string" }, { - name: 'profit', - baseName: 'profit', - type: 'string', + "name": "profit", + "baseName": "profit", + "type": "string" }, { - name: 'fee', - baseName: 'fee', - type: 'string', - }, - ]; + "name": "fee", + "baseName": "fee", + "type": "string" + } ]; static getAttributeTypeMap() { return DeliverySettlement.attributeTypeMap; } } + diff --git a/model/depositAddress.ts b/model/depositAddress.ts index 239915a..2666c16 100644 --- a/model/depositAddress.ts +++ b/model/depositAddress.ts @@ -13,36 +13,36 @@ import { MultiChainAddressItem } from './multiChainAddressItem'; export class DepositAddress { /** - * Currency detail - */ + * Currency detail + */ 'currency': string; /** - * Deposit address - */ + * Deposit address + */ 'address': string; 'multichainAddresses'?: Array; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'address', - baseName: 'address', - type: 'string', + "name": "address", + "baseName": "address", + "type": "string" }, { - name: 'multichainAddresses', - baseName: 'multichain_addresses', - type: 'Array', - }, - ]; + "name": "multichainAddresses", + "baseName": "multichain_addresses", + "type": "Array" + } ]; static getAttributeTypeMap() { return DepositAddress.attributeTypeMap; } } + diff --git a/model/dualGetOrders.ts b/model/dualGetOrders.ts index 6b627f5..71ea981 100644 --- a/model/dualGetOrders.ts +++ b/model/dualGetOrders.ts @@ -9,158 +9,159 @@ * Do not edit the class manually. */ + export class DualGetOrders { /** - * Order ID - */ + * Order ID + */ 'id'?: number; /** - * Plan ID - */ + * Plan ID + */ 'planId'?: number; /** - * Copies - */ + * Copies + */ 'copies'?: string; /** - * Investment Amount - */ + * Investment Amount + */ 'investAmount'?: string; /** - * Settlement Amount - */ + * Settlement Amount + */ 'settlementAmount'?: string; /** - * Creation time - */ + * Creation time + */ 'createTime'?: number; /** - * Completion Time - */ + * Completion Time + */ 'completeTime'?: number; /** - * Status: `INIT`-INIT `SETTLEMENT_SUCCESS`-Settlement Success `SETTLEMENT_PROCESSING`-SEttlement Processing `CANCELED`-Canceled `FAILED`-Failed - */ + * Status: `INIT`-INIT `SETTLEMENT_SUCCESS`-Settlement Success `SETTLEMENT_PROCESSING`-SEttlement Processing `CANCELED`-Canceled `FAILED`-Failed + */ 'status'?: string; /** - * Investment Currency - */ + * Investment Currency + */ 'investCurrency'?: string; /** - * Strike Currency - */ + * Strike Currency + */ 'exerciseCurrency'?: string; /** - * Strike price - */ + * Strike price + */ 'exercisePrice'?: string; /** - * settlement price - */ + * settlement price + */ 'settlementPrice'?: string; /** - * Settle currency - */ + * Settle currency + */ 'settlementCurrency'?: string; /** - * APY - */ + * APY + */ 'apyDisplay'?: string; /** - * Settlement APY - */ + * Settlement APY + */ 'apySettlement'?: string; /** - * Settlement time - */ + * Settlement time + */ 'deliveryTime'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'number', + "name": "id", + "baseName": "id", + "type": "number" }, { - name: 'planId', - baseName: 'plan_id', - type: 'number', + "name": "planId", + "baseName": "plan_id", + "type": "number" }, { - name: 'copies', - baseName: 'copies', - type: 'string', + "name": "copies", + "baseName": "copies", + "type": "string" }, { - name: 'investAmount', - baseName: 'invest_amount', - type: 'string', + "name": "investAmount", + "baseName": "invest_amount", + "type": "string" }, { - name: 'settlementAmount', - baseName: 'settlement_amount', - type: 'string', + "name": "settlementAmount", + "baseName": "settlement_amount", + "type": "string" }, { - name: 'createTime', - baseName: 'create_time', - type: 'number', + "name": "createTime", + "baseName": "create_time", + "type": "number" }, { - name: 'completeTime', - baseName: 'complete_time', - type: 'number', + "name": "completeTime", + "baseName": "complete_time", + "type": "number" }, { - name: 'status', - baseName: 'status', - type: 'string', + "name": "status", + "baseName": "status", + "type": "string" }, { - name: 'investCurrency', - baseName: 'invest_currency', - type: 'string', + "name": "investCurrency", + "baseName": "invest_currency", + "type": "string" }, { - name: 'exerciseCurrency', - baseName: 'exercise_currency', - type: 'string', + "name": "exerciseCurrency", + "baseName": "exercise_currency", + "type": "string" }, { - name: 'exercisePrice', - baseName: 'exercise_price', - type: 'string', + "name": "exercisePrice", + "baseName": "exercise_price", + "type": "string" }, { - name: 'settlementPrice', - baseName: 'settlement_price', - type: 'string', + "name": "settlementPrice", + "baseName": "settlement_price", + "type": "string" }, { - name: 'settlementCurrency', - baseName: 'settlement_currency', - type: 'string', + "name": "settlementCurrency", + "baseName": "settlement_currency", + "type": "string" }, { - name: 'apyDisplay', - baseName: 'apy_display', - type: 'string', + "name": "apyDisplay", + "baseName": "apy_display", + "type": "string" }, { - name: 'apySettlement', - baseName: 'apy_settlement', - type: 'string', + "name": "apySettlement", + "baseName": "apy_settlement", + "type": "string" }, { - name: 'deliveryTime', - baseName: 'delivery_time', - type: 'number', - }, - ]; + "name": "deliveryTime", + "baseName": "delivery_time", + "type": "number" + } ]; static getAttributeTypeMap() { return DualGetOrders.attributeTypeMap; } } + diff --git a/model/dualGetPlans.ts b/model/dualGetPlans.ts index 0a07dfa..5198917 100644 --- a/model/dualGetPlans.ts +++ b/model/dualGetPlans.ts @@ -9,131 +9,132 @@ * Do not edit the class manually. */ + export class DualGetPlans { /** - * Plan ID - */ + * Plan ID + */ 'id'?: number; /** - * Instrument Name - */ + * Instrument Name + */ 'instrumentName'?: string; /** - * Investment Currency - */ + * Investment Currency + */ 'investCurrency'?: string; /** - * Strike Currency - */ + * Strike Currency + */ 'exerciseCurrency'?: string; /** - * Strike price - */ + * Strike price + */ 'exercisePrice'?: number; /** - * Settlement time - */ + * Settlement time + */ 'deliveryTime'?: number; /** - * Minimum Copies - */ + * Minimum Copies + */ 'minCopies'?: number; /** - * Maximum Copies - */ + * Maximum Copies + */ 'maxCopies'?: number; /** - * Per Unit Value - */ + * Per Unit Value + */ 'perValue'?: string; /** - * APY - */ + * APY + */ 'apyDisplay'?: string; /** - * start time - */ + * start time + */ 'startTime'?: number; /** - * Finished time - */ + * Finished time + */ 'endTime'?: number; /** - * Status: `NOTSTARTED`-not started `ONGOING`-ongoing `ENDED`-ended - */ + * Status: `NOTSTARTED`-not started `ONGOING`-ongoing `ENDED`-ended + */ 'status'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'number', + "name": "id", + "baseName": "id", + "type": "number" }, { - name: 'instrumentName', - baseName: 'instrument_name', - type: 'string', + "name": "instrumentName", + "baseName": "instrument_name", + "type": "string" }, { - name: 'investCurrency', - baseName: 'invest_currency', - type: 'string', + "name": "investCurrency", + "baseName": "invest_currency", + "type": "string" }, { - name: 'exerciseCurrency', - baseName: 'exercise_currency', - type: 'string', + "name": "exerciseCurrency", + "baseName": "exercise_currency", + "type": "string" }, { - name: 'exercisePrice', - baseName: 'exercise_price', - type: 'number', + "name": "exercisePrice", + "baseName": "exercise_price", + "type": "number" }, { - name: 'deliveryTime', - baseName: 'delivery_time', - type: 'number', + "name": "deliveryTime", + "baseName": "delivery_time", + "type": "number" }, { - name: 'minCopies', - baseName: 'min_copies', - type: 'number', + "name": "minCopies", + "baseName": "min_copies", + "type": "number" }, { - name: 'maxCopies', - baseName: 'max_copies', - type: 'number', + "name": "maxCopies", + "baseName": "max_copies", + "type": "number" }, { - name: 'perValue', - baseName: 'per_value', - type: 'string', + "name": "perValue", + "baseName": "per_value", + "type": "string" }, { - name: 'apyDisplay', - baseName: 'apy_display', - type: 'string', + "name": "apyDisplay", + "baseName": "apy_display", + "type": "string" }, { - name: 'startTime', - baseName: 'start_time', - type: 'number', + "name": "startTime", + "baseName": "start_time", + "type": "number" }, { - name: 'endTime', - baseName: 'end_time', - type: 'number', + "name": "endTime", + "baseName": "end_time", + "type": "number" }, { - name: 'status', - baseName: 'status', - type: 'string', - }, - ]; + "name": "status", + "baseName": "status", + "type": "string" + } ]; static getAttributeTypeMap() { return DualGetPlans.attributeTypeMap; } } + diff --git a/model/eth2Swap.ts b/model/eth2Swap.ts index f2485e5..580e289 100644 --- a/model/eth2Swap.ts +++ b/model/eth2Swap.ts @@ -9,35 +9,36 @@ * Do not edit the class manually. */ + /** - * ETH2 Staking - */ +* ETH2 Staking +*/ export class Eth2Swap { /** - * 1-Forward Swap(ETH -> ETH2), 2-Reverse Swap(ETH2 -> ETH) - */ + * 1-Forward Swap(ETH -> ETH2), 2-Reverse Swap(ETH2 -> ETH) + */ 'side': string; /** - * amount - */ + * amount + */ 'amount': string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'side', - baseName: 'side', - type: 'string', + "name": "side", + "baseName": "side", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', - }, - ]; + "name": "amount", + "baseName": "amount", + "type": "string" + } ]; static getAttributeTypeMap() { return Eth2Swap.attributeTypeMap; } } + diff --git a/model/flashSwapCurrency.ts b/model/flashSwapCurrency.ts deleted file mode 100644 index cd3d54c..0000000 --- a/model/flashSwapCurrency.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Gate API v4 - * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. - * - * Contact: support@mail.gate.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Currencies supported in flash swap - */ -export class FlashSwapCurrency { - /** - * Currency name - */ - 'currency'?: string; - /** - * Minimum amount required in flash swap - */ - 'minAmount'?: string; - /** - * Maximum amount allowed in flash swap - */ - 'maxAmount'?: string; - /** - * Currencies which can be swapped to from this currency - */ - 'swappable'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ - { - name: 'currency', - baseName: 'currency', - type: 'string', - }, - { - name: 'minAmount', - baseName: 'min_amount', - type: 'string', - }, - { - name: 'maxAmount', - baseName: 'max_amount', - type: 'string', - }, - { - name: 'swappable', - baseName: 'swappable', - type: 'Array', - }, - ]; - - static getAttributeTypeMap() { - return FlashSwapCurrency.attributeTypeMap; - } -} diff --git a/model/flashSwapCurrencyPair.ts b/model/flashSwapCurrencyPair.ts index 84c44c5..1cc7173 100644 --- a/model/flashSwapCurrencyPair.ts +++ b/model/flashSwapCurrencyPair.ts @@ -9,80 +9,81 @@ * Do not edit the class manually. */ + /** - * List all supported currencies in flash swap - */ +* List all supported currencies in flash swap +*/ export class FlashSwapCurrencyPair { /** - * The currency pair, BTC_USDT represents selling Bitcoin (BTC) and buying Tether (USDT). - */ + * The currency pair, BTC_USDT represents selling Bitcoin (BTC) and buying Tether (USDT). + */ 'currencyPair'?: string; /** - * The currency to be sold - */ + * The currency to be sold + */ 'sellCurrency'?: string; /** - * The currency to be bought - */ + * The currency to be bought + */ 'buyCurrency'?: string; /** - * The minimum quantity required for selling - */ + * The minimum quantity required for selling + */ 'sellMinAmount'?: string; /** - * The maximum quantity allowed for selling - */ + * The maximum quantity allowed for selling + */ 'sellMaxAmount'?: string; /** - * The minimum quantity required for buying - */ + * The minimum quantity required for buying + */ 'buyMinAmount'?: string; /** - * The maximum quantity allowed for buying - */ + * The maximum quantity allowed for buying + */ 'buyMaxAmount'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" }, { - name: 'sellCurrency', - baseName: 'sell_currency', - type: 'string', + "name": "sellCurrency", + "baseName": "sell_currency", + "type": "string" }, { - name: 'buyCurrency', - baseName: 'buy_currency', - type: 'string', + "name": "buyCurrency", + "baseName": "buy_currency", + "type": "string" }, { - name: 'sellMinAmount', - baseName: 'sell_min_amount', - type: 'string', + "name": "sellMinAmount", + "baseName": "sell_min_amount", + "type": "string" }, { - name: 'sellMaxAmount', - baseName: 'sell_max_amount', - type: 'string', + "name": "sellMaxAmount", + "baseName": "sell_max_amount", + "type": "string" }, { - name: 'buyMinAmount', - baseName: 'buy_min_amount', - type: 'string', + "name": "buyMinAmount", + "baseName": "buy_min_amount", + "type": "string" }, { - name: 'buyMaxAmount', - baseName: 'buy_max_amount', - type: 'string', - }, - ]; + "name": "buyMaxAmount", + "baseName": "buy_max_amount", + "type": "string" + } ]; static getAttributeTypeMap() { return FlashSwapCurrencyPair.attributeTypeMap; } } + diff --git a/model/flashSwapOrder.ts b/model/flashSwapOrder.ts index 04daa9f..ce97af8 100644 --- a/model/flashSwapOrder.ts +++ b/model/flashSwapOrder.ts @@ -9,98 +9,99 @@ * Do not edit the class manually. */ + /** - * Flash swap order - */ +* Flash swap order +*/ export class FlashSwapOrder { /** - * Flash swap order ID - */ + * Flash swap order ID + */ 'id'?: number; /** - * Creation time of order (in milliseconds) - */ + * Creation time of order (in milliseconds) + */ 'createTime'?: number; /** - * User ID - */ + * User ID + */ 'userId'?: number; /** - * Currency to sell - */ + * Currency to sell + */ 'sellCurrency'?: string; /** - * Amount to sell - */ + * Amount to sell + */ 'sellAmount'?: string; /** - * Currency to buy - */ + * Currency to buy + */ 'buyCurrency'?: string; /** - * Amount to buy - */ + * Amount to buy + */ 'buyAmount'?: string; /** - * Price - */ + * Price + */ 'price'?: string; /** - * Flash swap order status `1` - success `2` - failure - */ + * Flash swap order status `1` - success `2` - failure + */ 'status'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'number', + "name": "id", + "baseName": "id", + "type": "number" }, { - name: 'createTime', - baseName: 'create_time', - type: 'number', + "name": "createTime", + "baseName": "create_time", + "type": "number" }, { - name: 'userId', - baseName: 'user_id', - type: 'number', + "name": "userId", + "baseName": "user_id", + "type": "number" }, { - name: 'sellCurrency', - baseName: 'sell_currency', - type: 'string', + "name": "sellCurrency", + "baseName": "sell_currency", + "type": "string" }, { - name: 'sellAmount', - baseName: 'sell_amount', - type: 'string', + "name": "sellAmount", + "baseName": "sell_amount", + "type": "string" }, { - name: 'buyCurrency', - baseName: 'buy_currency', - type: 'string', + "name": "buyCurrency", + "baseName": "buy_currency", + "type": "string" }, { - name: 'buyAmount', - baseName: 'buy_amount', - type: 'string', + "name": "buyAmount", + "baseName": "buy_amount", + "type": "string" }, { - name: 'price', - baseName: 'price', - type: 'string', + "name": "price", + "baseName": "price", + "type": "string" }, { - name: 'status', - baseName: 'status', - type: 'number', - }, - ]; + "name": "status", + "baseName": "status", + "type": "number" + } ]; static getAttributeTypeMap() { return FlashSwapOrder.attributeTypeMap; } } + diff --git a/model/flashSwapOrderPreview.ts b/model/flashSwapOrderPreview.ts index 4258783..3ac0cb0 100644 --- a/model/flashSwapOrderPreview.ts +++ b/model/flashSwapOrderPreview.ts @@ -9,71 +9,72 @@ * Do not edit the class manually. */ + /** - * Initiate a flash swap order preview - */ +* Initiate a flash swap order preview +*/ export class FlashSwapOrderPreview { /** - * Preview result ID - */ + * Preview result ID + */ 'previewId'?: string; /** - * Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` - */ + * Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` + */ 'sellCurrency'?: string; /** - * Amount to sell - */ + * Amount to sell + */ 'sellAmount'?: string; /** - * Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` - */ + * Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` + */ 'buyCurrency'?: string; /** - * Amount to buy - */ + * Amount to buy + */ 'buyAmount'?: string; /** - * Price - */ + * Price + */ 'price'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'previewId', - baseName: 'preview_id', - type: 'string', + "name": "previewId", + "baseName": "preview_id", + "type": "string" }, { - name: 'sellCurrency', - baseName: 'sell_currency', - type: 'string', + "name": "sellCurrency", + "baseName": "sell_currency", + "type": "string" }, { - name: 'sellAmount', - baseName: 'sell_amount', - type: 'string', + "name": "sellAmount", + "baseName": "sell_amount", + "type": "string" }, { - name: 'buyCurrency', - baseName: 'buy_currency', - type: 'string', + "name": "buyCurrency", + "baseName": "buy_currency", + "type": "string" }, { - name: 'buyAmount', - baseName: 'buy_amount', - type: 'string', + "name": "buyAmount", + "baseName": "buy_amount", + "type": "string" }, { - name: 'price', - baseName: 'price', - type: 'string', - }, - ]; + "name": "price", + "baseName": "price", + "type": "string" + } ]; static getAttributeTypeMap() { return FlashSwapOrderPreview.attributeTypeMap; } } + diff --git a/model/flashSwapOrderRequest.ts b/model/flashSwapOrderRequest.ts index 4fdd11d..1c0985d 100644 --- a/model/flashSwapOrderRequest.ts +++ b/model/flashSwapOrderRequest.ts @@ -9,62 +9,63 @@ * Do not edit the class manually. */ + /** - * Parameters of flash swap order creation - */ +* Parameters of flash swap order creation +*/ export class FlashSwapOrderRequest { /** - * Preview result ID - */ + * Preview result ID + */ 'previewId': string; /** - * 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. - */ + * 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. + */ 'sellCurrency': string; /** - * Amount to sell (based on the preview result) - */ + * Amount to sell (based on the preview result) + */ 'sellAmount': string; /** - * 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. - */ + * 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. + */ 'buyCurrency': string; /** - * Amount to buy (based on the preview result) - */ + * Amount to buy (based on the preview result) + */ 'buyAmount': string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'previewId', - baseName: 'preview_id', - type: 'string', + "name": "previewId", + "baseName": "preview_id", + "type": "string" }, { - name: 'sellCurrency', - baseName: 'sell_currency', - type: 'string', + "name": "sellCurrency", + "baseName": "sell_currency", + "type": "string" }, { - name: 'sellAmount', - baseName: 'sell_amount', - type: 'string', + "name": "sellAmount", + "baseName": "sell_amount", + "type": "string" }, { - name: 'buyCurrency', - baseName: 'buy_currency', - type: 'string', + "name": "buyCurrency", + "baseName": "buy_currency", + "type": "string" }, { - name: 'buyAmount', - baseName: 'buy_amount', - type: 'string', - }, - ]; + "name": "buyAmount", + "baseName": "buy_amount", + "type": "string" + } ]; static getAttributeTypeMap() { return FlashSwapOrderRequest.attributeTypeMap; } } + diff --git a/model/flashSwapPreviewRequest.ts b/model/flashSwapPreviewRequest.ts index f7ed54e..2f55dec 100644 --- a/model/flashSwapPreviewRequest.ts +++ b/model/flashSwapPreviewRequest.ts @@ -9,53 +9,54 @@ * Do not edit the class manually. */ + /** - * Parameters of flash swap order creation - */ +* Parameters of flash swap order creation +*/ export class 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. - */ + * 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. + */ 'sellCurrency': string; /** - * Amount to sell. It is required to choose one parameter between `sell_amount` and `buy_amount` - */ + * Amount to sell. It is required to choose one parameter between `sell_amount` and `buy_amount` + */ 'sellAmount'?: string; /** - * 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. - */ + * 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. + */ 'buyCurrency': string; /** - * Amount to buy. It is required to choose one parameter between `sell_amount` and `buy_amount` - */ + * Amount to buy. It is required to choose one parameter between `sell_amount` and `buy_amount` + */ 'buyAmount'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'sellCurrency', - baseName: 'sell_currency', - type: 'string', + "name": "sellCurrency", + "baseName": "sell_currency", + "type": "string" }, { - name: 'sellAmount', - baseName: 'sell_amount', - type: 'string', + "name": "sellAmount", + "baseName": "sell_amount", + "type": "string" }, { - name: 'buyCurrency', - baseName: 'buy_currency', - type: 'string', + "name": "buyCurrency", + "baseName": "buy_currency", + "type": "string" }, { - name: 'buyAmount', - baseName: 'buy_amount', - type: 'string', - }, - ]; + "name": "buyAmount", + "baseName": "buy_amount", + "type": "string" + } ]; static getAttributeTypeMap() { return FlashSwapPreviewRequest.attributeTypeMap; } } + diff --git a/model/fundingAccount.ts b/model/fundingAccount.ts index 9c3aac1..948bb68 100644 --- a/model/fundingAccount.ts +++ b/model/fundingAccount.ts @@ -9,59 +9,60 @@ * Do not edit the class manually. */ + export class FundingAccount { /** - * Currency name - */ + * Currency name + */ 'currency'?: string; /** - * Available assets to lend, which is identical to spot account `available` - */ + * Available assets to lend, which is identical to spot account `available` + */ 'available'?: string; /** - * Locked amount. i.e. amount in `open` loans - */ + * Locked amount. i.e. amount in `open` loans + */ 'locked'?: string; /** - * Outstanding loan amount yet to be repaid - */ + * Outstanding loan amount yet to be repaid + */ 'lent'?: string; /** - * Amount used for lending. total_lent = lent + locked - */ + * Amount used for lending. total_lent = lent + locked + */ 'totalLent'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'available', - baseName: 'available', - type: 'string', + "name": "available", + "baseName": "available", + "type": "string" }, { - name: 'locked', - baseName: 'locked', - type: 'string', + "name": "locked", + "baseName": "locked", + "type": "string" }, { - name: 'lent', - baseName: 'lent', - type: 'string', + "name": "lent", + "baseName": "lent", + "type": "string" }, { - name: 'totalLent', - baseName: 'total_lent', - type: 'string', - }, - ]; + "name": "totalLent", + "baseName": "total_lent", + "type": "string" + } ]; static getAttributeTypeMap() { return FundingAccount.attributeTypeMap; } } + diff --git a/model/fundingBookItem.ts b/model/fundingBookItem.ts deleted file mode 100644 index a940f29..0000000 --- a/model/fundingBookItem.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Gate API v4 - * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. - * - * Contact: support@mail.gate.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export class FundingBookItem { - /** - * Loan rate (daily rate) - */ - 'rate'?: string; - /** - * Borrowable amount - */ - 'amount'?: string; - /** - * The number of days till the loan repayment\'s dateline - */ - 'days'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ - { - name: 'rate', - baseName: 'rate', - type: 'string', - }, - { - name: 'amount', - baseName: 'amount', - type: 'string', - }, - { - name: 'days', - baseName: 'days', - type: 'number', - }, - ]; - - static getAttributeTypeMap() { - return FundingBookItem.attributeTypeMap; - } -} diff --git a/model/fundingRateRecord.ts b/model/fundingRateRecord.ts index fdb56f4..ddf61eb 100644 --- a/model/fundingRateRecord.ts +++ b/model/fundingRateRecord.ts @@ -9,32 +9,33 @@ * Do not edit the class manually. */ + export class FundingRateRecord { /** - * Unix timestamp in seconds - */ + * Unix timestamp in seconds + */ 't'?: number; /** - * Funding rate - */ + * Funding rate + */ 'r'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 't', - baseName: 't', - type: 'number', + "name": "t", + "baseName": "t", + "type": "number" }, { - name: 'r', - baseName: 'r', - type: 'string', - }, - ]; + "name": "r", + "baseName": "r", + "type": "string" + } ]; static getAttributeTypeMap() { return FundingRateRecord.attributeTypeMap; } } + diff --git a/model/futureCancelOrderResult.ts b/model/futureCancelOrderResult.ts index aa50df3..8242f35 100644 --- a/model/futureCancelOrderResult.ts +++ b/model/futureCancelOrderResult.ts @@ -9,53 +9,54 @@ * Do not edit the class manually. */ + /** - * Order cancellation result - */ +* Order cancellation result +*/ export class FutureCancelOrderResult { /** - * Order ID - */ + * Order ID + */ 'id'?: string; /** - * User ID - */ + * User ID + */ 'userId'?: number; /** - * Whether cancellation succeeded - */ + * Whether cancellation succeeded + */ 'succeeded'?: boolean; /** - * Error message when failed to cancel the order; empty if succeeded - */ + * Error message when failed to cancel the order; empty if succeeded + */ 'message'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'string', + "name": "id", + "baseName": "id", + "type": "string" }, { - name: 'userId', - baseName: 'user_id', - type: 'number', + "name": "userId", + "baseName": "user_id", + "type": "number" }, { - name: 'succeeded', - baseName: 'succeeded', - type: 'boolean', + "name": "succeeded", + "baseName": "succeeded", + "type": "boolean" }, { - name: 'message', - baseName: 'message', - type: 'string', - }, - ]; + "name": "message", + "baseName": "message", + "type": "string" + } ]; static getAttributeTypeMap() { return FutureCancelOrderResult.attributeTypeMap; } } + diff --git a/model/futuresAccount.ts b/model/futuresAccount.ts index b774109..e95fcd7 100644 --- a/model/futuresAccount.ts +++ b/model/futuresAccount.ts @@ -13,207 +13,207 @@ import { FuturesAccountHistory } from './futuresAccountHistory'; export class 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) - */ + * 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) + */ 'total'?: string; /** - * Unrealized PNL - */ + * Unrealized PNL + */ 'unrealisedPnl'?: string; /** - * Position margin - */ + * Position margin + */ 'positionMargin'?: string; /** - * Order margin of unfinished orders - */ + * Order margin of unfinished orders + */ 'orderMargin'?: string; /** - * The available balance for transferring or trading(including bonus. Bonus can\'t be be withdrawn. The transfer amount needs to deduct the bonus) - */ + * The available balance for transferring or trading(including bonus. Bonus can\'t be be withdrawn. The transfer amount needs to deduct the bonus) + */ 'available'?: string; /** - * POINT amount - */ + * POINT amount + */ 'point'?: string; /** - * Settle currency - */ + * Settle currency + */ 'currency'?: string; /** - * Whether dual mode is enabled - */ + * Whether dual mode is enabled + */ 'inDualMode'?: boolean; /** - * Whether portfolio margin account mode is enabled - */ + * Whether portfolio margin account mode is enabled + */ 'enableCredit'?: boolean; /** - * Initial margin position, applicable to the portfolio margin account model - */ + * Initial margin position, applicable to the portfolio margin account model + */ 'positionInitialMargin'?: string; /** - * 头寸占用的维持保证金,适用于新经典账户保证金模式和统一账户模式 - */ + * The maintenance deposit occupied by the position is suitable for the new classic account margin model and unified account model + */ 'maintenanceMargin'?: string; /** - * Perpetual Contract Bonus - */ + * Perpetual Contract Bonus + */ 'bonus'?: string; /** - * 经典账户保证金模式,true-新模式,false-老模式 - */ + * Classic account margin mode, true-new mode, false-old mode + */ 'enableEvolvedClassic'?: boolean; /** - * 全仓挂单保证金,适用于新经典账户保证金模式 - */ + * Full -warehouse hanging order deposit, suitable for the new classic account margin model + */ 'crossOrderMargin'?: string; /** - * 全仓初始保证金,适用于新经典账户保证金模式 - */ + * The initial security deposit of the full warehouse is suitable for the new classic account margin model + */ 'crossInitialMargin'?: string; /** - * 全仓维持保证金,适用于新经典账户保证金模式 - */ + * Maintain deposit in full warehouse, suitable for new classic account margin models + */ 'crossMaintenanceMargin'?: string; /** - * 全仓未实现盈亏,适用于新经典账户保证金模式 - */ + * The full warehouse does not achieve profit and loss, suitable for the new classic account margin model + */ 'crossUnrealisedPnl'?: string; /** - * 全仓可用额度,适用于新经典账户保证金模式 - */ + * Full warehouse available amount, suitable for the new classic account margin model + */ 'crossAvailable'?: string; /** - * 逐仓仓位保证金,适用于新经典账户保证金模式 - */ + * Ware -position margin, suitable for the new classic account margin model + */ 'isolatedPositionMargin'?: string; /** - * 是否开启新的双向持仓模式 - */ + * Whether to open a new two-way position mode + */ 'enableNewDualMode'?: boolean; /** - * 保证金模式,0-经典保证金模式,1-跨币种保证金模式,2-组合保证金模式 - */ + * Margin mode, 0-classic margin mode, 1-cross-currency margin mode, 2-combined margin mode + */ 'marginMode'?: number; 'history'?: FuturesAccountHistory; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'total', - baseName: 'total', - type: 'string', + "name": "total", + "baseName": "total", + "type": "string" }, { - name: 'unrealisedPnl', - baseName: 'unrealised_pnl', - type: 'string', + "name": "unrealisedPnl", + "baseName": "unrealised_pnl", + "type": "string" }, { - name: 'positionMargin', - baseName: 'position_margin', - type: 'string', + "name": "positionMargin", + "baseName": "position_margin", + "type": "string" }, { - name: 'orderMargin', - baseName: 'order_margin', - type: 'string', + "name": "orderMargin", + "baseName": "order_margin", + "type": "string" }, { - name: 'available', - baseName: 'available', - type: 'string', + "name": "available", + "baseName": "available", + "type": "string" }, { - name: 'point', - baseName: 'point', - type: 'string', + "name": "point", + "baseName": "point", + "type": "string" }, { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'inDualMode', - baseName: 'in_dual_mode', - type: 'boolean', + "name": "inDualMode", + "baseName": "in_dual_mode", + "type": "boolean" }, { - name: 'enableCredit', - baseName: 'enable_credit', - type: 'boolean', + "name": "enableCredit", + "baseName": "enable_credit", + "type": "boolean" }, { - name: 'positionInitialMargin', - baseName: 'position_initial_margin', - type: 'string', + "name": "positionInitialMargin", + "baseName": "position_initial_margin", + "type": "string" }, { - name: 'maintenanceMargin', - baseName: 'maintenance_margin', - type: 'string', + "name": "maintenanceMargin", + "baseName": "maintenance_margin", + "type": "string" }, { - name: 'bonus', - baseName: 'bonus', - type: 'string', + "name": "bonus", + "baseName": "bonus", + "type": "string" }, { - name: 'enableEvolvedClassic', - baseName: 'enable_evolved_classic', - type: 'boolean', + "name": "enableEvolvedClassic", + "baseName": "enable_evolved_classic", + "type": "boolean" }, { - name: 'crossOrderMargin', - baseName: 'cross_order_margin', - type: 'string', + "name": "crossOrderMargin", + "baseName": "cross_order_margin", + "type": "string" }, { - name: 'crossInitialMargin', - baseName: 'cross_initial_margin', - type: 'string', + "name": "crossInitialMargin", + "baseName": "cross_initial_margin", + "type": "string" }, { - name: 'crossMaintenanceMargin', - baseName: 'cross_maintenance_margin', - type: 'string', + "name": "crossMaintenanceMargin", + "baseName": "cross_maintenance_margin", + "type": "string" }, { - name: 'crossUnrealisedPnl', - baseName: 'cross_unrealised_pnl', - type: 'string', + "name": "crossUnrealisedPnl", + "baseName": "cross_unrealised_pnl", + "type": "string" }, { - name: 'crossAvailable', - baseName: 'cross_available', - type: 'string', + "name": "crossAvailable", + "baseName": "cross_available", + "type": "string" }, { - name: 'isolatedPositionMargin', - baseName: 'isolated_position_margin', - type: 'string', + "name": "isolatedPositionMargin", + "baseName": "isolated_position_margin", + "type": "string" }, { - name: 'enableNewDualMode', - baseName: 'enable_new_dual_mode', - type: 'boolean', + "name": "enableNewDualMode", + "baseName": "enable_new_dual_mode", + "type": "boolean" }, { - name: 'marginMode', - baseName: 'margin_mode', - type: 'number', + "name": "marginMode", + "baseName": "margin_mode", + "type": "number" }, { - name: 'history', - baseName: 'history', - type: 'FuturesAccountHistory', - }, - ]; + "name": "history", + "baseName": "history", + "type": "FuturesAccountHistory" + } ]; static getAttributeTypeMap() { return FuturesAccount.attributeTypeMap; } } + diff --git a/model/futuresAccountBook.ts b/model/futuresAccountBook.ts index 9017031..34ac3bc 100644 --- a/model/futuresAccountBook.ts +++ b/model/futuresAccountBook.ts @@ -9,84 +9,84 @@ * Do not edit the class manually. */ + export class FuturesAccountBook { /** - * Change time - */ + * Change time + */ 'time'?: number; /** - * Change amount - */ + * Change amount + */ 'change'?: string; /** - * Balance after change - */ + * Balance after change + */ 'balance'?: string; /** - * 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 - */ + * 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 + */ 'type'?: FuturesAccountBook.Type; /** - * Comment - */ + * Comment + */ 'text'?: string; /** - * Futures contract, the field is only available for data after 2023-10-30. - */ + * Futures contract, the field is only available for data after 2023-10-30. + */ 'contract'?: string; /** - * trade id - */ + * trade id + */ 'tradeId'?: string; /** - * 账户变更记录 id - */ + * 账户变更记录 id + */ 'id'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'time', - baseName: 'time', - type: 'number', + "name": "time", + "baseName": "time", + "type": "number" }, { - name: 'change', - baseName: 'change', - type: 'string', + "name": "change", + "baseName": "change", + "type": "string" }, { - name: 'balance', - baseName: 'balance', - type: 'string', + "name": "balance", + "baseName": "balance", + "type": "string" }, { - name: 'type', - baseName: 'type', - type: 'FuturesAccountBook.Type', + "name": "type", + "baseName": "type", + "type": "FuturesAccountBook.Type" }, { - name: 'text', - baseName: 'text', - type: 'string', + "name": "text", + "baseName": "text", + "type": "string" }, { - name: 'contract', - baseName: 'contract', - type: 'string', + "name": "contract", + "baseName": "contract", + "type": "string" }, { - name: 'tradeId', - baseName: 'trade_id', - type: 'string', + "name": "tradeId", + "baseName": "trade_id", + "type": "string" }, { - name: 'id', - baseName: 'id', - type: 'string', - }, - ]; + "name": "id", + "baseName": "id", + "type": "string" + } ]; static getAttributeTypeMap() { return FuturesAccountBook.attributeTypeMap; @@ -95,14 +95,14 @@ export class FuturesAccountBook { export namespace FuturesAccountBook { export enum Type { - Dnw = 'dnw', - Pnl = 'pnl', - Fee = 'fee', - Refr = 'refr', - Fund = 'fund', - PointDnw = 'point_dnw', - PointFee = 'point_fee', - PointRefr = 'point_refr', - BonusOffset = 'bonus_offset', + Dnw = 'dnw', + Pnl = 'pnl', + Fee = 'fee', + Refr = 'refr', + Fund = 'fund', + PointDnw = 'point_dnw', + PointFee = 'point_fee', + PointRefr = 'point_refr', + BonusOffset = 'bonus_offset' } } diff --git a/model/futuresAccountHistory.ts b/model/futuresAccountHistory.ts index 8422bef..364b1ef 100644 --- a/model/futuresAccountHistory.ts +++ b/model/futuresAccountHistory.ts @@ -9,107 +9,108 @@ * Do not edit the class manually. */ + /** - * Statistical data - */ +* Statistical data +*/ export class FuturesAccountHistory { /** - * total amount of deposit and withdraw - */ + * total amount of deposit and withdraw + */ 'dnw'?: string; /** - * total amount of trading profit and loss - */ + * total amount of trading profit and loss + */ 'pnl'?: string; /** - * total amount of fee - */ + * total amount of fee + */ 'fee'?: string; /** - * total amount of referrer rebates - */ + * total amount of referrer rebates + */ 'refr'?: string; /** - * total amount of funding costs - */ + * total amount of funding costs + */ 'fund'?: string; /** - * total amount of point deposit and withdraw - */ + * total amount of point deposit and withdraw + */ 'pointDnw'?: string; /** - * total amount of point fee - */ + * total amount of point fee + */ 'pointFee'?: string; /** - * total amount of referrer rebates of point fee - */ + * total amount of referrer rebates of point fee + */ 'pointRefr'?: string; /** - * total amount of perpetual contract bonus transfer - */ + * total amount of perpetual contract bonus transfer + */ 'bonusDnw'?: string; /** - * total amount of perpetual contract bonus deduction - */ + * total amount of perpetual contract bonus deduction + */ 'bonusOffset'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'dnw', - baseName: 'dnw', - type: 'string', + "name": "dnw", + "baseName": "dnw", + "type": "string" }, { - name: 'pnl', - baseName: 'pnl', - type: 'string', + "name": "pnl", + "baseName": "pnl", + "type": "string" }, { - name: 'fee', - baseName: 'fee', - type: 'string', + "name": "fee", + "baseName": "fee", + "type": "string" }, { - name: 'refr', - baseName: 'refr', - type: 'string', + "name": "refr", + "baseName": "refr", + "type": "string" }, { - name: 'fund', - baseName: 'fund', - type: 'string', + "name": "fund", + "baseName": "fund", + "type": "string" }, { - name: 'pointDnw', - baseName: 'point_dnw', - type: 'string', + "name": "pointDnw", + "baseName": "point_dnw", + "type": "string" }, { - name: 'pointFee', - baseName: 'point_fee', - type: 'string', + "name": "pointFee", + "baseName": "point_fee", + "type": "string" }, { - name: 'pointRefr', - baseName: 'point_refr', - type: 'string', + "name": "pointRefr", + "baseName": "point_refr", + "type": "string" }, { - name: 'bonusDnw', - baseName: 'bonus_dnw', - type: 'string', + "name": "bonusDnw", + "baseName": "bonus_dnw", + "type": "string" }, { - name: 'bonusOffset', - baseName: 'bonus_offset', - type: 'string', - }, - ]; + "name": "bonusOffset", + "baseName": "bonus_offset", + "type": "string" + } ]; static getAttributeTypeMap() { return FuturesAccountHistory.attributeTypeMap; } } + diff --git a/model/futuresAutoDeleverage.ts b/model/futuresAutoDeleverage.ts index 543d77f..c17713f 100644 --- a/model/futuresAutoDeleverage.ts +++ b/model/futuresAutoDeleverage.ts @@ -9,104 +9,105 @@ * Do not edit the class manually. */ + export class FuturesAutoDeleverage { /** - * Automatic deleveraging time - */ + * Automatic deleveraging time + */ 'time'?: number; /** - * User ID - */ + * User ID + */ 'user'?: number; /** - * Order ID. Order IDs before 2023-02-20 are null - */ + * Order ID. Order IDs before 2023-02-20 are null + */ 'orderId'?: number; /** - * Futures contract - */ + * Futures contract + */ 'contract'?: string; /** - * Position leverage - */ + * Position leverage + */ 'leverage'?: string; /** - * Cross margin leverage(valid only when `leverage` is 0) - */ + * Cross margin leverage(valid only when `leverage` is 0) + */ 'crossLeverageLimit'?: string; /** - * Average entry price - */ + * Average entry price + */ 'entryPrice'?: string; /** - * Average fill price - */ + * Average fill price + */ 'fillPrice'?: string; /** - * Trading size - */ + * Trading size + */ 'tradeSize'?: number; /** - * Positions after auto-deleveraging - */ + * Positions after auto-deleveraging + */ 'positionSize'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'time', - baseName: 'time', - type: 'number', + "name": "time", + "baseName": "time", + "type": "number" }, { - name: 'user', - baseName: 'user', - type: 'number', + "name": "user", + "baseName": "user", + "type": "number" }, { - name: 'orderId', - baseName: 'order_id', - type: 'number', + "name": "orderId", + "baseName": "order_id", + "type": "number" }, { - name: 'contract', - baseName: 'contract', - type: 'string', + "name": "contract", + "baseName": "contract", + "type": "string" }, { - name: 'leverage', - baseName: 'leverage', - type: 'string', + "name": "leverage", + "baseName": "leverage", + "type": "string" }, { - name: 'crossLeverageLimit', - baseName: 'cross_leverage_limit', - type: 'string', + "name": "crossLeverageLimit", + "baseName": "cross_leverage_limit", + "type": "string" }, { - name: 'entryPrice', - baseName: 'entry_price', - type: 'string', + "name": "entryPrice", + "baseName": "entry_price", + "type": "string" }, { - name: 'fillPrice', - baseName: 'fill_price', - type: 'string', + "name": "fillPrice", + "baseName": "fill_price", + "type": "string" }, { - name: 'tradeSize', - baseName: 'trade_size', - type: 'number', + "name": "tradeSize", + "baseName": "trade_size", + "type": "number" }, { - name: 'positionSize', - baseName: 'position_size', - type: 'number', - }, - ]; + "name": "positionSize", + "baseName": "position_size", + "type": "number" + } ]; static getAttributeTypeMap() { return FuturesAutoDeleverage.attributeTypeMap; } } + diff --git a/model/futuresBatchAmendOrderRequest.ts b/model/futuresBatchAmendOrderRequest.ts index 596c1a8..0732f19 100644 --- a/model/futuresBatchAmendOrderRequest.ts +++ b/model/futuresBatchAmendOrderRequest.ts @@ -9,62 +9,63 @@ * Do not edit the class manually. */ + /** - * 修改合约订单参数 - */ +* Modify contract order parameters +*/ export class FuturesBatchAmendOrderRequest { /** - * 订单id,order_id和text至少传一个 - */ + * Order id, order_id and text must contain at least one + */ 'orderId'?: number; /** - * 用户自定义订单text,order_id和text至少传一个 - */ + * User-defined order text, at least one of order_id and text must be passed + */ 'text'?: string; /** - * 新的委托大小。包括已成交委托的部分。 - 如果小于等于已成交数量,则撤销委托。 - 新的委托买卖方向必须跟原有的一致。 - 不能修改平仓单的size。 - 对于只减仓委托,如果调大size,则可能踢出其他只减仓委托。 - 如果不修改价格,则调小size不会影响深度排队,调大size会排到当前价位最后。 - */ + * 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. + */ 'size'?: number; /** - * New order price. - */ + * New order price. + */ 'price'?: string; /** - * Custom info during amending order - */ + * Custom info during amending order + */ 'amendText'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'orderId', - baseName: 'order_id', - type: 'number', + "name": "orderId", + "baseName": "order_id", + "type": "number" }, { - name: 'text', - baseName: 'text', - type: 'string', + "name": "text", + "baseName": "text", + "type": "string" }, { - name: 'size', - baseName: 'size', - type: 'number', + "name": "size", + "baseName": "size", + "type": "number" }, { - name: 'price', - baseName: 'price', - type: 'string', + "name": "price", + "baseName": "price", + "type": "string" }, { - name: 'amendText', - baseName: 'amend_text', - type: 'string', - }, - ]; + "name": "amendText", + "baseName": "amend_text", + "type": "string" + } ]; static getAttributeTypeMap() { return FuturesBatchAmendOrderRequest.attributeTypeMap; } } + diff --git a/model/futuresCandlestick.ts b/model/futuresCandlestick.ts index e797cec..354feaa 100644 --- a/model/futuresCandlestick.ts +++ b/model/futuresCandlestick.ts @@ -9,80 +9,81 @@ * Do not edit the class manually. */ + /** - * data point in every timestamp - */ +* data point in every timestamp +*/ export class FuturesCandlestick { /** - * Unix timestamp in seconds - */ + * Unix timestamp in seconds + */ 't'?: number; /** - * size volume (contract size). Only returned if `contract` is not prefixed - */ + * size volume (contract size). Only returned if `contract` is not prefixed + */ 'v'?: number; /** - * Close price (quote currency) - */ + * Close price (quote currency) + */ 'c'?: string; /** - * Highest price (quote currency) - */ + * Highest price (quote currency) + */ 'h'?: string; /** - * Lowest price (quote currency) - */ + * Lowest price (quote currency) + */ 'l'?: string; /** - * Open price (quote currency) - */ + * Open price (quote currency) + */ 'o'?: string; /** - * Trading volume (unit: Quote currency) - */ + * Trading volume (unit: Quote currency) + */ 'sum'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 't', - baseName: 't', - type: 'number', + "name": "t", + "baseName": "t", + "type": "number" }, { - name: 'v', - baseName: 'v', - type: 'number', + "name": "v", + "baseName": "v", + "type": "number" }, { - name: 'c', - baseName: 'c', - type: 'string', + "name": "c", + "baseName": "c", + "type": "string" }, { - name: 'h', - baseName: 'h', - type: 'string', + "name": "h", + "baseName": "h", + "type": "string" }, { - name: 'l', - baseName: 'l', - type: 'string', + "name": "l", + "baseName": "l", + "type": "string" }, { - name: 'o', - baseName: 'o', - type: 'string', + "name": "o", + "baseName": "o", + "type": "string" }, { - name: 'sum', - baseName: 'sum', - type: 'string', - }, - ]; + "name": "sum", + "baseName": "sum", + "type": "string" + } ]; static getAttributeTypeMap() { return FuturesCandlestick.attributeTypeMap; } } + diff --git a/model/futuresFee.ts b/model/futuresFee.ts index 3d93346..bf5f885 100644 --- a/model/futuresFee.ts +++ b/model/futuresFee.ts @@ -9,35 +9,36 @@ * Do not edit the class manually. */ + /** - * 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 the value represents the taker and maker fee rates. +*/ export class FuturesFee { /** - * Taker fee - */ + * Taker fee + */ 'takerFee'?: string; /** - * maker fee - */ + * maker fee + */ 'makerFee'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'takerFee', - baseName: 'taker_fee', - type: 'string', + "name": "takerFee", + "baseName": "taker_fee", + "type": "string" }, { - name: 'makerFee', - baseName: 'maker_fee', - type: 'string', - }, - ]; + "name": "makerFee", + "baseName": "maker_fee", + "type": "string" + } ]; static getAttributeTypeMap() { return FuturesFee.attributeTypeMap; } } + diff --git a/model/futuresIndexConstituents.ts b/model/futuresIndexConstituents.ts index 8029127..2d76124 100644 --- a/model/futuresIndexConstituents.ts +++ b/model/futuresIndexConstituents.ts @@ -13,30 +13,30 @@ import { IndexConstituent } from './indexConstituent'; export class FuturesIndexConstituents { /** - * Index name - */ + * Index name + */ 'index'?: string; /** - * Constituents - */ + * Constituents + */ 'constituents'?: Array; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'index', - baseName: 'index', - type: 'string', + "name": "index", + "baseName": "index", + "type": "string" }, { - name: 'constituents', - baseName: 'constituents', - type: 'Array', - }, - ]; + "name": "constituents", + "baseName": "constituents", + "type": "Array" + } ]; static getAttributeTypeMap() { return FuturesIndexConstituents.attributeTypeMap; } } + diff --git a/model/futuresInitialOrder.ts b/model/futuresInitialOrder.ts index 010821d..3ca7cf5 100644 --- a/model/futuresInitialOrder.ts +++ b/model/futuresInitialOrder.ts @@ -9,102 +9,102 @@ * Do not edit the class manually. */ + export class FuturesInitialOrder { /** - * Futures contract - */ + * Futures contract + */ 'contract': string; /** - * Order size. Positive size means to buy, while negative one means to sell. Set to 0 to close the position - */ + * Order size. Positive size means to buy, while negative one means to sell. Set to 0 to close the position + */ 'size'?: number; /** - * Order price. Set to 0 to use market price - */ + * Order price. Set to 0 to use market price + */ 'price': string; /** - * Set to true if trying to close the position - */ + * Set to true if trying to close the position + */ 'close'?: boolean; /** - * Time in force. If using market price, only `ioc` is supported. - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled - */ + * Time in force. If using market price, only `ioc` is supported. - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled + */ 'tif'?: FuturesInitialOrder.Tif; /** - * The source of the order, including: - web: web - api: api - app: app - */ + * The source of the order, including: - web: web - api: api - app: app + */ 'text'?: string; /** - * Set to true to create a reduce-only order - */ + * Set to true to create a reduce-only order + */ 'reduceOnly'?: boolean; /** - * 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 - */ + * 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 + */ 'autoSize'?: string; /** - * Is the order reduce-only - */ + * Is the order reduce-only + */ 'isReduceOnly'?: boolean; /** - * Is the order to close position - */ + * Is the order to close position + */ 'isClose'?: boolean; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'contract', - baseName: 'contract', - type: 'string', + "name": "contract", + "baseName": "contract", + "type": "string" }, { - name: 'size', - baseName: 'size', - type: 'number', + "name": "size", + "baseName": "size", + "type": "number" }, { - name: 'price', - baseName: 'price', - type: 'string', + "name": "price", + "baseName": "price", + "type": "string" }, { - name: 'close', - baseName: 'close', - type: 'boolean', + "name": "close", + "baseName": "close", + "type": "boolean" }, { - name: 'tif', - baseName: 'tif', - type: 'FuturesInitialOrder.Tif', + "name": "tif", + "baseName": "tif", + "type": "FuturesInitialOrder.Tif" }, { - name: 'text', - baseName: 'text', - type: 'string', + "name": "text", + "baseName": "text", + "type": "string" }, { - name: 'reduceOnly', - baseName: 'reduce_only', - type: 'boolean', + "name": "reduceOnly", + "baseName": "reduce_only", + "type": "boolean" }, { - name: 'autoSize', - baseName: 'auto_size', - type: 'string', + "name": "autoSize", + "baseName": "auto_size", + "type": "string" }, { - name: 'isReduceOnly', - baseName: 'is_reduce_only', - type: 'boolean', + "name": "isReduceOnly", + "baseName": "is_reduce_only", + "type": "boolean" }, { - name: 'isClose', - baseName: 'is_close', - type: 'boolean', - }, - ]; + "name": "isClose", + "baseName": "is_close", + "type": "boolean" + } ]; static getAttributeTypeMap() { return FuturesInitialOrder.attributeTypeMap; @@ -113,7 +113,7 @@ export class FuturesInitialOrder { export namespace FuturesInitialOrder { export enum Tif { - Gtc = 'gtc', - Ioc = 'ioc', + Gtc = 'gtc', + Ioc = 'ioc' } } diff --git a/model/futuresLimitRiskTiers.ts b/model/futuresLimitRiskTiers.ts index 2684279..d84702d 100644 --- a/model/futuresLimitRiskTiers.ts +++ b/model/futuresLimitRiskTiers.ts @@ -9,71 +9,72 @@ * Do not edit the class manually. */ + /** - * Retrieve risk limit configurations for different tiers under a specified contract. - */ +* Retrieve risk limit configurations for different tiers under a specified contract. +*/ export class FuturesLimitRiskTiers { /** - * Tier - */ + * Tier + */ 'tier'?: number; /** - * Position risk limit - */ + * Position risk limit + */ 'riskLimit'?: string; /** - * Initial margin rate - */ + * Initial margin rate + */ 'initialRate'?: string; /** - * Maintenance margin rate - */ + * Maintenance margin rate + */ 'maintenanceRate'?: string; /** - * Maximum leverage - */ + * Maximum leverage + */ 'leverageMax'?: string; /** - * 市场,仅当市场分页请求时可见 - */ + * Markets, visible only during market pagination requests + */ 'contract'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'tier', - baseName: 'tier', - type: 'number', + "name": "tier", + "baseName": "tier", + "type": "number" }, { - name: 'riskLimit', - baseName: 'risk_limit', - type: 'string', + "name": "riskLimit", + "baseName": "risk_limit", + "type": "string" }, { - name: 'initialRate', - baseName: 'initial_rate', - type: 'string', + "name": "initialRate", + "baseName": "initial_rate", + "type": "string" }, { - name: 'maintenanceRate', - baseName: 'maintenance_rate', - type: 'string', + "name": "maintenanceRate", + "baseName": "maintenance_rate", + "type": "string" }, { - name: 'leverageMax', - baseName: 'leverage_max', - type: 'string', + "name": "leverageMax", + "baseName": "leverage_max", + "type": "string" }, { - name: 'contract', - baseName: 'contract', - type: 'string', - }, - ]; + "name": "contract", + "baseName": "contract", + "type": "string" + } ]; static getAttributeTypeMap() { return FuturesLimitRiskTiers.attributeTypeMap; } } + diff --git a/model/futuresLiqOrder.ts b/model/futuresLiqOrder.ts index f8024ed..f5c82be 100644 --- a/model/futuresLiqOrder.ts +++ b/model/futuresLiqOrder.ts @@ -9,77 +9,78 @@ * Do not edit the class manually. */ + export class FuturesLiqOrder { /** - * Liquidation time - */ + * Liquidation time + */ 'time'?: number; /** - * Futures contract - */ + * Futures contract + */ 'contract'?: string; /** - * User position size - */ + * User position size + */ 'size'?: number; /** - * 强平委托数量 - */ + * Number of forced liquidation orders + */ 'orderSize'?: number; /** - * Liquidation order price - */ + * Liquidation order price + */ 'orderPrice'?: string; /** - * Liquidation order average taker price - */ + * Liquidation order average taker price + */ 'fillPrice'?: string; /** - * System liquidation order maker size - */ + * System liquidation order maker size + */ 'left'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'time', - baseName: 'time', - type: 'number', + "name": "time", + "baseName": "time", + "type": "number" }, { - name: 'contract', - baseName: 'contract', - type: 'string', + "name": "contract", + "baseName": "contract", + "type": "string" }, { - name: 'size', - baseName: 'size', - type: 'number', + "name": "size", + "baseName": "size", + "type": "number" }, { - name: 'orderSize', - baseName: 'order_size', - type: 'number', + "name": "orderSize", + "baseName": "order_size", + "type": "number" }, { - name: 'orderPrice', - baseName: 'order_price', - type: 'string', + "name": "orderPrice", + "baseName": "order_price", + "type": "string" }, { - name: 'fillPrice', - baseName: 'fill_price', - type: 'string', + "name": "fillPrice", + "baseName": "fill_price", + "type": "string" }, { - name: 'left', - baseName: 'left', - type: 'number', - }, - ]; + "name": "left", + "baseName": "left", + "type": "number" + } ]; static getAttributeTypeMap() { return FuturesLiqOrder.attributeTypeMap; } } + diff --git a/model/futuresLiquidate.ts b/model/futuresLiquidate.ts index ca4e4c5..3504e05 100644 --- a/model/futuresLiquidate.ts +++ b/model/futuresLiquidate.ts @@ -9,122 +9,123 @@ * Do not edit the class manually. */ + export class FuturesLiquidate { /** - * Liquidation time - */ + * Liquidation time + */ 'time'?: number; /** - * Futures contract - */ + * Futures contract + */ 'contract'?: string; /** - * Position leverage. Not returned in public endpoints. - */ + * Position leverage. Not returned in public endpoints. + */ 'leverage'?: string; /** - * Position size - */ + * Position size + */ 'size'?: number; /** - * Position margin. Not returned in public endpoints. - */ + * Position margin. Not returned in public endpoints. + */ 'margin'?: string; /** - * Average entry price. Not returned in public endpoints. - */ + * Average entry price. Not returned in public endpoints. + */ 'entryPrice'?: string; /** - * Liquidation price. Not returned in public endpoints. - */ + * Liquidation price. Not returned in public endpoints. + */ 'liqPrice'?: string; /** - * Mark price. Not returned in public endpoints. - */ + * Mark price. Not returned in public endpoints. + */ 'markPrice'?: string; /** - * Liquidation order ID. Not returned in public endpoints. - */ + * Liquidation order ID. Not returned in public endpoints. + */ 'orderId'?: number; /** - * Liquidation order price - */ + * Liquidation order price + */ 'orderPrice'?: string; /** - * Liquidation order average taker price - */ + * Liquidation order average taker price + */ 'fillPrice'?: string; /** - * Liquidation order maker size - */ + * Liquidation order maker size + */ 'left'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'time', - baseName: 'time', - type: 'number', + "name": "time", + "baseName": "time", + "type": "number" }, { - name: 'contract', - baseName: 'contract', - type: 'string', + "name": "contract", + "baseName": "contract", + "type": "string" }, { - name: 'leverage', - baseName: 'leverage', - type: 'string', + "name": "leverage", + "baseName": "leverage", + "type": "string" }, { - name: 'size', - baseName: 'size', - type: 'number', + "name": "size", + "baseName": "size", + "type": "number" }, { - name: 'margin', - baseName: 'margin', - type: 'string', + "name": "margin", + "baseName": "margin", + "type": "string" }, { - name: 'entryPrice', - baseName: 'entry_price', - type: 'string', + "name": "entryPrice", + "baseName": "entry_price", + "type": "string" }, { - name: 'liqPrice', - baseName: 'liq_price', - type: 'string', + "name": "liqPrice", + "baseName": "liq_price", + "type": "string" }, { - name: 'markPrice', - baseName: 'mark_price', - type: 'string', + "name": "markPrice", + "baseName": "mark_price", + "type": "string" }, { - name: 'orderId', - baseName: 'order_id', - type: 'number', + "name": "orderId", + "baseName": "order_id", + "type": "number" }, { - name: 'orderPrice', - baseName: 'order_price', - type: 'string', + "name": "orderPrice", + "baseName": "order_price", + "type": "string" }, { - name: 'fillPrice', - baseName: 'fill_price', - type: 'string', + "name": "fillPrice", + "baseName": "fill_price", + "type": "string" }, { - name: 'left', - baseName: 'left', - type: 'number', - }, - ]; + "name": "left", + "baseName": "left", + "type": "number" + } ]; static getAttributeTypeMap() { return FuturesLiquidate.attributeTypeMap; } } + diff --git a/model/futuresOrder.ts b/model/futuresOrder.ts index 28bac3a..f0eed19 100644 --- a/model/futuresOrder.ts +++ b/model/futuresOrder.ts @@ -9,258 +9,258 @@ * Do not edit the class manually. */ + /** - * Futures order details - */ +* Futures order details +*/ export class FuturesOrder { /** - * Futures order ID - */ + * Futures order ID + */ 'id'?: bigint; /** - * User ID - */ + * User ID + */ 'user'?: number; /** - * Creation time of order - */ + * Creation time of order + */ 'createTime'?: number; /** - * Order finished time. Not returned if order is open - */ + * Order finished time. Not returned if order is open + */ 'finishTime'?: number; /** - * How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close - stp: cancelled because self trade prevention - */ + * 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 + */ 'finishAs'?: FuturesOrder.FinishAs; /** - * Order status - `open`: waiting to be traded - `finished`: finished - */ + * Order status - `open`: waiting to be traded - `finished`: finished + */ 'status'?: FuturesOrder.Status; /** - * Futures contract - */ + * Futures contract + */ 'contract': string; /** - * Order size. Specify positive number to make a bid, and negative number to ask - */ + * Order size. Specify positive number to make a bid, and negative number to ask + */ 'size': number; /** - * Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size - */ + * Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size + */ 'iceberg'?: number; /** - * Order price. 0 for market order with `tif` set as `ioc` - */ + * Order price. 0 for market order with `tif` set as `ioc` + */ 'price'?: string; /** - * Set as `true` to close the position, with `size` set to 0 - */ + * Set as `true` to close the position, with `size` set to 0 + */ 'close'?: boolean; /** - * Is the order to close position - */ + * Is the order to close position + */ 'isClose'?: boolean; /** - * Set as `true` to be reduce-only order - */ + * Set as `true` to be reduce-only order + */ 'reduceOnly'?: boolean; /** - * Is the order reduce-only - */ + * Is the order reduce-only + */ 'isReduceOnly'?: boolean; /** - * Is the order for liquidation - */ + * Is the order for liquidation + */ 'isLiq'?: boolean; /** - * 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 - */ + * 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 + */ 'tif'?: FuturesOrder.Tif; /** - * Size left to be traded - */ + * Size left to be traded + */ 'left'?: number; /** - * Fill price of the order - */ + * Fill price of the order + */ 'fillPrice'?: string; /** - * 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 - */ + * 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 + */ 'text'?: string; /** - * Taker fee - */ + * Taker fee + */ 'tkfr'?: string; /** - * Maker fee - */ + * Maker fee + */ 'mkfr'?: string; /** - * Reference user ID - */ + * Reference user ID + */ 'refu'?: number; /** - * 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 - */ + * 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 + */ 'autoSize'?: FuturesOrder.AutoSize; /** - * 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` - */ + * 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` + */ 'stpId'?: number; /** - * 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 - */ + * 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 + */ 'stpAct'?: FuturesOrder.StpAct; /** - * The custom data that the user remarked when amending the order - */ + * The custom data that the user remarked when amending the order + */ 'amendText'?: string; /** - * Additional information - */ + * Additional information + */ 'bizInfo'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'bigint', + "name": "id", + "baseName": "id", + "type": "bigint" }, { - name: 'user', - baseName: 'user', - type: 'number', + "name": "user", + "baseName": "user", + "type": "number" }, { - name: 'createTime', - baseName: 'create_time', - type: 'number', + "name": "createTime", + "baseName": "create_time", + "type": "number" }, { - name: 'finishTime', - baseName: 'finish_time', - type: 'number', + "name": "finishTime", + "baseName": "finish_time", + "type": "number" }, { - name: 'finishAs', - baseName: 'finish_as', - type: 'FuturesOrder.FinishAs', + "name": "finishAs", + "baseName": "finish_as", + "type": "FuturesOrder.FinishAs" }, { - name: 'status', - baseName: 'status', - type: 'FuturesOrder.Status', + "name": "status", + "baseName": "status", + "type": "FuturesOrder.Status" }, { - name: 'contract', - baseName: 'contract', - type: 'string', + "name": "contract", + "baseName": "contract", + "type": "string" }, { - name: 'size', - baseName: 'size', - type: 'number', + "name": "size", + "baseName": "size", + "type": "number" }, { - name: 'iceberg', - baseName: 'iceberg', - type: 'number', + "name": "iceberg", + "baseName": "iceberg", + "type": "number" }, { - name: 'price', - baseName: 'price', - type: 'string', + "name": "price", + "baseName": "price", + "type": "string" }, { - name: 'close', - baseName: 'close', - type: 'boolean', + "name": "close", + "baseName": "close", + "type": "boolean" }, { - name: 'isClose', - baseName: 'is_close', - type: 'boolean', + "name": "isClose", + "baseName": "is_close", + "type": "boolean" }, { - name: 'reduceOnly', - baseName: 'reduce_only', - type: 'boolean', + "name": "reduceOnly", + "baseName": "reduce_only", + "type": "boolean" }, { - name: 'isReduceOnly', - baseName: 'is_reduce_only', - type: 'boolean', + "name": "isReduceOnly", + "baseName": "is_reduce_only", + "type": "boolean" }, { - name: 'isLiq', - baseName: 'is_liq', - type: 'boolean', + "name": "isLiq", + "baseName": "is_liq", + "type": "boolean" }, { - name: 'tif', - baseName: 'tif', - type: 'FuturesOrder.Tif', + "name": "tif", + "baseName": "tif", + "type": "FuturesOrder.Tif" }, { - name: 'left', - baseName: 'left', - type: 'number', + "name": "left", + "baseName": "left", + "type": "number" }, { - name: 'fillPrice', - baseName: 'fill_price', - type: 'string', + "name": "fillPrice", + "baseName": "fill_price", + "type": "string" }, { - name: 'text', - baseName: 'text', - type: 'string', + "name": "text", + "baseName": "text", + "type": "string" }, { - name: 'tkfr', - baseName: 'tkfr', - type: 'string', + "name": "tkfr", + "baseName": "tkfr", + "type": "string" }, { - name: 'mkfr', - baseName: 'mkfr', - type: 'string', + "name": "mkfr", + "baseName": "mkfr", + "type": "string" }, { - name: 'refu', - baseName: 'refu', - type: 'number', + "name": "refu", + "baseName": "refu", + "type": "number" }, { - name: 'autoSize', - baseName: 'auto_size', - type: 'FuturesOrder.AutoSize', + "name": "autoSize", + "baseName": "auto_size", + "type": "FuturesOrder.AutoSize" }, { - name: 'stpId', - baseName: 'stp_id', - type: 'number', + "name": "stpId", + "baseName": "stp_id", + "type": "number" }, { - name: 'stpAct', - baseName: 'stp_act', - type: 'FuturesOrder.StpAct', + "name": "stpAct", + "baseName": "stp_act", + "type": "FuturesOrder.StpAct" }, { - name: 'amendText', - baseName: 'amend_text', - type: 'string', + "name": "amendText", + "baseName": "amend_text", + "type": "string" }, { - name: 'bizInfo', - baseName: 'biz_info', - type: 'string', - }, - ]; + "name": "bizInfo", + "baseName": "biz_info", + "type": "string" + } ]; static getAttributeTypeMap() { return FuturesOrder.attributeTypeMap; @@ -269,34 +269,34 @@ export class FuturesOrder { export namespace FuturesOrder { export enum FinishAs { - Filled = 'filled', - Cancelled = 'cancelled', - Liquidated = 'liquidated', - Ioc = 'ioc', - AutoDeleveraged = 'auto_deleveraged', - ReduceOnly = 'reduce_only', - PositionClosed = 'position_closed', - ReduceOut = 'reduce_out', - Stp = 'stp', + Filled = 'filled', + Cancelled = 'cancelled', + Liquidated = 'liquidated', + Ioc = 'ioc', + AutoDeleveraged = 'auto_deleveraged', + ReduceOnly = 'reduce_only', + PositionClosed = 'position_closed', + ReduceOut = 'reduce_out', + Stp = 'stp' } export enum Status { - Open = 'open', - Finished = 'finished', + Open = 'open', + Finished = 'finished' } export enum Tif { - Gtc = 'gtc', - Ioc = 'ioc', - Poc = 'poc', - Fok = 'fok', + Gtc = 'gtc', + Ioc = 'ioc', + Poc = 'poc', + Fok = 'fok' } export enum AutoSize { - Long = 'close_long', - Short = 'close_short', + Long = 'close_long', + Short = 'close_short' } export enum StpAct { - Co = 'co', - Cn = 'cn', - Cb = 'cb', - Minus = '-', + Co = 'co', + Cn = 'cn', + Cb = 'cb', + Minus = '-' } } diff --git a/model/futuresOrderAmendment.ts b/model/futuresOrderAmendment.ts index 84189c1..88eb520 100644 --- a/model/futuresOrderAmendment.ts +++ b/model/futuresOrderAmendment.ts @@ -9,59 +9,60 @@ * Do not edit the class manually. */ + export class 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. - */ + * 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. + */ 'size'?: number; /** - * New order price. - */ + * New order price. + */ 'price'?: string; /** - * Custom info during amending order - */ + * Custom info during amending order + */ 'amendText'?: string; /** - * 用户可以备注这次修改的信息,比如ao。 - */ + * Users can annotate this modification with information. + */ 'bizInfo'?: string; /** - * 用户可以对手价进行修改。 - */ + * Users are able to modify the offer price manually. + */ 'bbo'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'size', - baseName: 'size', - type: 'number', + "name": "size", + "baseName": "size", + "type": "number" }, { - name: 'price', - baseName: 'price', - type: 'string', + "name": "price", + "baseName": "price", + "type": "string" }, { - name: 'amendText', - baseName: 'amend_text', - type: 'string', + "name": "amendText", + "baseName": "amend_text", + "type": "string" }, { - name: 'bizInfo', - baseName: 'biz_info', - type: 'string', + "name": "bizInfo", + "baseName": "biz_info", + "type": "string" }, { - name: 'bbo', - baseName: 'bbo', - type: 'string', - }, - ]; + "name": "bbo", + "baseName": "bbo", + "type": "string" + } ]; static getAttributeTypeMap() { return FuturesOrderAmendment.attributeTypeMap; } } + diff --git a/model/futuresOrderBook.ts b/model/futuresOrderBook.ts index 44d7235..afd34d0 100644 --- a/model/futuresOrderBook.ts +++ b/model/futuresOrderBook.ts @@ -13,57 +13,57 @@ import { FuturesOrderBookItem } from './futuresOrderBookItem'; export class FuturesOrderBook { /** - * Order Book ID. Increases by 1 on every order book change. Set `with_id=true` to include this field in response - */ + * Order Book ID. Increases by 1 on every order book change. Set `with_id=true` to include this field in response + */ 'id'?: number; /** - * Response data generation timestamp - */ + * Response data generation timestamp + */ 'current'?: number; /** - * Order book changed timestamp - */ + * Order book changed timestamp + */ 'update'?: number; /** - * Asks order depth - */ + * Asks order depth + */ 'asks': Array; /** - * Bids order depth - */ + * Bids order depth + */ 'bids': Array; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'number', + "name": "id", + "baseName": "id", + "type": "number" }, { - name: 'current', - baseName: 'current', - type: 'number', + "name": "current", + "baseName": "current", + "type": "number" }, { - name: 'update', - baseName: 'update', - type: 'number', + "name": "update", + "baseName": "update", + "type": "number" }, { - name: 'asks', - baseName: 'asks', - type: 'Array', + "name": "asks", + "baseName": "asks", + "type": "Array" }, { - name: 'bids', - baseName: 'bids', - type: 'Array', - }, - ]; + "name": "bids", + "baseName": "bids", + "type": "Array" + } ]; static getAttributeTypeMap() { return FuturesOrderBook.attributeTypeMap; } } + diff --git a/model/futuresOrderBookItem.ts b/model/futuresOrderBookItem.ts index 9ef742b..cf913ea 100644 --- a/model/futuresOrderBookItem.ts +++ b/model/futuresOrderBookItem.ts @@ -9,32 +9,33 @@ * Do not edit the class manually. */ + export class FuturesOrderBookItem { /** - * Price (quote currency) - */ + * Price (quote currency) + */ 'p'?: string; /** - * Size - */ + * Size + */ 's'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'p', - baseName: 'p', - type: 'string', + "name": "p", + "baseName": "p", + "type": "string" }, { - name: 's', - baseName: 's', - type: 'number', - }, - ]; + "name": "s", + "baseName": "s", + "type": "number" + } ]; static getAttributeTypeMap() { return FuturesOrderBookItem.attributeTypeMap; } } + diff --git a/model/futuresPremiumIndex.ts b/model/futuresPremiumIndex.ts index aef8f60..2c257ab 100644 --- a/model/futuresPremiumIndex.ts +++ b/model/futuresPremiumIndex.ts @@ -9,62 +9,63 @@ * Do not edit the class manually. */ + /** - * data point in every timestamp - */ +* data point in every timestamp +*/ export class FuturesPremiumIndex { /** - * Unix timestamp in seconds - */ + * Unix timestamp in seconds + */ 't'?: number; /** - * Close price - */ + * Close price + */ 'c'?: string; /** - * Highest price - */ + * Highest price + */ 'h'?: string; /** - * Lowest price` - */ + * Lowest price` + */ 'l'?: string; /** - * Open price - */ + * Open price + */ 'o'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 't', - baseName: 't', - type: 'number', + "name": "t", + "baseName": "t", + "type": "number" }, { - name: 'c', - baseName: 'c', - type: 'string', + "name": "c", + "baseName": "c", + "type": "string" }, { - name: 'h', - baseName: 'h', - type: 'string', + "name": "h", + "baseName": "h", + "type": "string" }, { - name: 'l', - baseName: 'l', - type: 'string', + "name": "l", + "baseName": "l", + "type": "string" }, { - name: 'o', - baseName: 'o', - type: 'string', - }, - ]; + "name": "o", + "baseName": "o", + "type": "string" + } ]; static getAttributeTypeMap() { return FuturesPremiumIndex.attributeTypeMap; } } + diff --git a/model/futuresPriceTrigger.ts b/model/futuresPriceTrigger.ts index c824306..0b0321d 100644 --- a/model/futuresPriceTrigger.ts +++ b/model/futuresPriceTrigger.ts @@ -9,57 +9,57 @@ * Do not edit the class manually. */ + export class FuturesPriceTrigger { /** - * How the order will be triggered - `0`: by price, which means the order will be triggered if price condition is satisfied - `1`: by price gap, which means the order will be triggered if gap of recent two prices of specified `price_type` are satisfied. Only `0` is supported currently - */ + * How the order will be triggered - `0`: by price, which means the order will be triggered if price condition is satisfied - `1`: by price gap, which means the order will be triggered if gap of recent two prices of specified `price_type` are satisfied. Only `0` is supported currently + */ 'strategyType'?: FuturesPriceTrigger.StrategyType; /** - * Price type. 0 - latest deal price, 1 - mark price, 2 - index price - */ + * Price type. 0 - latest deal price, 1 - mark price, 2 - index price + */ 'priceType'?: FuturesPriceTrigger.PriceType; /** - * Value of price on price triggered, or price gap on price gap triggered - */ + * Value of price on price triggered, or price gap on price gap triggered + */ 'price'?: string; /** - * Trigger condition type - `1`: calculated price based on `strategy_type` and `price_type` >= `price` - `2`: calculated price based on `strategy_type` and `price_type` <= `price` - */ + * Trigger condition type - `1`: calculated price based on `strategy_type` and `price_type` >= `price` - `2`: calculated price based on `strategy_type` and `price_type` <= `price` + */ 'rule'?: FuturesPriceTrigger.Rule; /** - * How long (in seconds) to wait for the condition to be triggered before cancelling the order. - */ + * How long (in seconds) to wait for the condition to be triggered before cancelling the order. + */ 'expiration'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'strategyType', - baseName: 'strategy_type', - type: 'FuturesPriceTrigger.StrategyType', + "name": "strategyType", + "baseName": "strategy_type", + "type": "FuturesPriceTrigger.StrategyType" }, { - name: 'priceType', - baseName: 'price_type', - type: 'FuturesPriceTrigger.PriceType', + "name": "priceType", + "baseName": "price_type", + "type": "FuturesPriceTrigger.PriceType" }, { - name: 'price', - baseName: 'price', - type: 'string', + "name": "price", + "baseName": "price", + "type": "string" }, { - name: 'rule', - baseName: 'rule', - type: 'FuturesPriceTrigger.Rule', + "name": "rule", + "baseName": "rule", + "type": "FuturesPriceTrigger.Rule" }, { - name: 'expiration', - baseName: 'expiration', - type: 'number', - }, - ]; + "name": "expiration", + "baseName": "expiration", + "type": "number" + } ]; static getAttributeTypeMap() { return FuturesPriceTrigger.attributeTypeMap; @@ -68,16 +68,16 @@ export class FuturesPriceTrigger { export namespace FuturesPriceTrigger { export enum StrategyType { - NUMBER_0 = 0, - NUMBER_1 = 1, + NUMBER_0 = 0, + NUMBER_1 = 1 } export enum PriceType { - NUMBER_0 = 0, - NUMBER_1 = 1, - NUMBER_2 = 2, + NUMBER_0 = 0, + NUMBER_1 = 1, + NUMBER_2 = 2 } export enum Rule { - NUMBER_1 = 1, - NUMBER_2 = 2, + NUMBER_1 = 1, + NUMBER_2 = 2 } } diff --git a/model/futuresPriceTriggeredOrder.ts b/model/futuresPriceTriggeredOrder.ts index d620229..6d880ac 100644 --- a/model/futuresPriceTriggeredOrder.ts +++ b/model/futuresPriceTriggeredOrder.ts @@ -13,116 +13,115 @@ import { FuturesInitialOrder } from './futuresInitialOrder'; import { FuturesPriceTrigger } from './futuresPriceTrigger'; /** - * Futures order details - */ +* Futures order details +*/ export class FuturesPriceTriggeredOrder { 'initial': FuturesInitialOrder; 'trigger': FuturesPriceTrigger; /** - * Auto order ID - */ + * Auto order ID + */ 'id'?: number; /** - * User ID - */ + * User ID + */ 'user'?: number; /** - * Creation time - */ + * Creation time + */ 'createTime'?: number; /** - * Finished time - */ + * Finished time + */ 'finishTime'?: number; /** - * ID of the newly created order on condition triggered - */ + * ID of the newly created order on condition triggered + */ 'tradeId'?: number; /** - * 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 - */ + * 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 + */ 'status'?: FuturesPriceTriggeredOrder.Status; /** - * How order is finished - */ + * How order is finished + */ 'finishAs'?: FuturesPriceTriggeredOrder.FinishAs; /** - * Additional remarks on how the order was finished - */ + * Additional remarks on how the order was finished + */ 'reason'?: string; /** - * Take-profit/stop-loss types, which include: - `close-long-order`: order take-profit/stop-loss, close long position - `close-short-order`: order take-profit/stop-loss, close short position - `close-long-position`: position take-profit/stop-loss, close long position - `close-short-position`: position take-profit/stop-loss, close short position - `plan-close-long-position`: position planned take-profit/stop-loss, close long position - `plan-close-short-position`: position planned take-profit/stop-loss, close short position The order take-profit/stop-loss can not be passed by request. These two types are read only. - */ + * Take-profit/stop-loss types, which include: - `close-long-order`: order take-profit/stop-loss, close long position - `close-short-order`: order take-profit/stop-loss, close short position - `close-long-position`: position take-profit/stop-loss, close long position - `close-short-position`: position take-profit/stop-loss, close short position - `plan-close-long-position`: position planned take-profit/stop-loss, close long position - `plan-close-short-position`: position planned take-profit/stop-loss, close short position The order take-profit/stop-loss can not be passed by request. These two types are read only. + */ 'orderType'?: string; /** - * Corresponding order ID of order take-profit/stop-loss. - */ + * Corresponding order ID of order take-profit/stop-loss. + */ 'meOrderId'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'initial', - baseName: 'initial', - type: 'FuturesInitialOrder', + "name": "initial", + "baseName": "initial", + "type": "FuturesInitialOrder" }, { - name: 'trigger', - baseName: 'trigger', - type: 'FuturesPriceTrigger', + "name": "trigger", + "baseName": "trigger", + "type": "FuturesPriceTrigger" }, { - name: 'id', - baseName: 'id', - type: 'number', + "name": "id", + "baseName": "id", + "type": "number" }, { - name: 'user', - baseName: 'user', - type: 'number', + "name": "user", + "baseName": "user", + "type": "number" }, { - name: 'createTime', - baseName: 'create_time', - type: 'number', + "name": "createTime", + "baseName": "create_time", + "type": "number" }, { - name: 'finishTime', - baseName: 'finish_time', - type: 'number', + "name": "finishTime", + "baseName": "finish_time", + "type": "number" }, { - name: 'tradeId', - baseName: 'trade_id', - type: 'number', + "name": "tradeId", + "baseName": "trade_id", + "type": "number" }, { - name: 'status', - baseName: 'status', - type: 'FuturesPriceTriggeredOrder.Status', + "name": "status", + "baseName": "status", + "type": "FuturesPriceTriggeredOrder.Status" }, { - name: 'finishAs', - baseName: 'finish_as', - type: 'FuturesPriceTriggeredOrder.FinishAs', + "name": "finishAs", + "baseName": "finish_as", + "type": "FuturesPriceTriggeredOrder.FinishAs" }, { - name: 'reason', - baseName: 'reason', - type: 'string', + "name": "reason", + "baseName": "reason", + "type": "string" }, { - name: 'orderType', - baseName: 'order_type', - type: 'string', + "name": "orderType", + "baseName": "order_type", + "type": "string" }, { - name: 'meOrderId', - baseName: 'me_order_id', - type: 'number', - }, - ]; + "name": "meOrderId", + "baseName": "me_order_id", + "type": "number" + } ]; static getAttributeTypeMap() { return FuturesPriceTriggeredOrder.attributeTypeMap; @@ -131,15 +130,15 @@ export class FuturesPriceTriggeredOrder { export namespace FuturesPriceTriggeredOrder { export enum Status { - Open = 'open', - Finished = 'finished', - Inactive = 'inactive', - Invalid = 'invalid', + Open = 'open', + Finished = 'finished', + Inactive = 'inactive', + Invalid = 'invalid' } export enum FinishAs { - Cancelled = 'cancelled', - Succeeded = 'succeeded', - Failed = 'failed', - Expired = 'expired', + Cancelled = 'cancelled', + Succeeded = 'succeeded', + Failed = 'failed', + Expired = 'expired' } } diff --git a/model/futuresTicker.ts b/model/futuresTicker.ts index f6c9325..6862dda 100644 --- a/model/futuresTicker.ts +++ b/model/futuresTicker.ts @@ -9,221 +9,222 @@ * Do not edit the class manually. */ + export class FuturesTicker { /** - * Futures contract - */ + * Futures contract + */ 'contract'?: string; /** - * Last trading price - */ + * Last trading price + */ 'last'?: string; /** - * Change percentage. - */ + * Change percentage. + */ 'changePercentage'?: string; /** - * Contract total size - */ + * Contract total size + */ 'totalSize'?: string; /** - * Lowest trading price in recent 24h - */ + * Lowest trading price in recent 24h + */ 'low24h'?: string; /** - * Highest trading price in recent 24h - */ + * Highest trading price in recent 24h + */ 'high24h'?: string; /** - * Trade size in recent 24h - */ + * Trade size in recent 24h + */ 'volume24h'?: string; /** - * Trade volumes in recent 24h in BTC(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) - */ + * Trade volumes in recent 24h in BTC(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) + */ 'volume24hBtc'?: string; /** - * Trade volumes in recent 24h in USD(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) - */ + * Trade volumes in recent 24h in USD(deprecated, use `volume_24h_base`, `volume_24h_quote`, `volume_24h_settle` instead) + */ 'volume24hUsd'?: string; /** - * Trade volume in recent 24h, in base currency - */ + * Trade volume in recent 24h, in base currency + */ 'volume24hBase'?: string; /** - * Trade volume in recent 24h, in quote currency - */ + * Trade volume in recent 24h, in quote currency + */ 'volume24hQuote'?: string; /** - * Trade volume in recent 24h, in settle currency - */ + * Trade volume in recent 24h, in settle currency + */ 'volume24hSettle'?: string; /** - * Recent mark price - */ + * Recent mark price + */ 'markPrice'?: string; /** - * Funding rate - */ + * Funding rate + */ 'fundingRate'?: string; /** - * Indicative Funding rate in next period - */ + * Indicative Funding rate in next period. (deprecated. use `funding_rate`) + */ 'fundingRateIndicative'?: string; /** - * Index price - */ + * Index price + */ 'indexPrice'?: string; /** - * Exchange rate of base currency and settlement currency in Quanto contract. Does not exists in contracts of other types - */ + * Exchange rate of base currency and settlement currency in Quanto contract. Does not exists in contracts of other types + */ 'quantoBaseRate'?: string; /** - * Basis rate - */ + * Basis rate + */ 'basisRate'?: string; /** - * Basis value - */ + * Basis value + */ 'basisValue'?: string; /** - * Recent lowest ask - */ + * Recent lowest ask + */ 'lowestAsk'?: string; /** - * 最新卖方最低价的挂单量 - */ + * The latest seller\'s lowest price order quantity + */ 'lowestSize'?: string; /** - * Recent highest bid - */ + * Recent highest bid + */ 'highestBid'?: string; /** - * 最新买方最高价的挂单量 - */ + * The latest buyer\'s highest price order volume + */ 'highestSize'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'contract', - baseName: 'contract', - type: 'string', + "name": "contract", + "baseName": "contract", + "type": "string" }, { - name: 'last', - baseName: 'last', - type: 'string', + "name": "last", + "baseName": "last", + "type": "string" }, { - name: 'changePercentage', - baseName: 'change_percentage', - type: 'string', + "name": "changePercentage", + "baseName": "change_percentage", + "type": "string" }, { - name: 'totalSize', - baseName: 'total_size', - type: 'string', + "name": "totalSize", + "baseName": "total_size", + "type": "string" }, { - name: 'low24h', - baseName: 'low_24h', - type: 'string', + "name": "low24h", + "baseName": "low_24h", + "type": "string" }, { - name: 'high24h', - baseName: 'high_24h', - type: 'string', + "name": "high24h", + "baseName": "high_24h", + "type": "string" }, { - name: 'volume24h', - baseName: 'volume_24h', - type: 'string', + "name": "volume24h", + "baseName": "volume_24h", + "type": "string" }, { - name: 'volume24hBtc', - baseName: 'volume_24h_btc', - type: 'string', + "name": "volume24hBtc", + "baseName": "volume_24h_btc", + "type": "string" }, { - name: 'volume24hUsd', - baseName: 'volume_24h_usd', - type: 'string', + "name": "volume24hUsd", + "baseName": "volume_24h_usd", + "type": "string" }, { - name: 'volume24hBase', - baseName: 'volume_24h_base', - type: 'string', + "name": "volume24hBase", + "baseName": "volume_24h_base", + "type": "string" }, { - name: 'volume24hQuote', - baseName: 'volume_24h_quote', - type: 'string', + "name": "volume24hQuote", + "baseName": "volume_24h_quote", + "type": "string" }, { - name: 'volume24hSettle', - baseName: 'volume_24h_settle', - type: 'string', + "name": "volume24hSettle", + "baseName": "volume_24h_settle", + "type": "string" }, { - name: 'markPrice', - baseName: 'mark_price', - type: 'string', + "name": "markPrice", + "baseName": "mark_price", + "type": "string" }, { - name: 'fundingRate', - baseName: 'funding_rate', - type: 'string', + "name": "fundingRate", + "baseName": "funding_rate", + "type": "string" }, { - name: 'fundingRateIndicative', - baseName: 'funding_rate_indicative', - type: 'string', + "name": "fundingRateIndicative", + "baseName": "funding_rate_indicative", + "type": "string" }, { - name: 'indexPrice', - baseName: 'index_price', - type: 'string', + "name": "indexPrice", + "baseName": "index_price", + "type": "string" }, { - name: 'quantoBaseRate', - baseName: 'quanto_base_rate', - type: 'string', + "name": "quantoBaseRate", + "baseName": "quanto_base_rate", + "type": "string" }, { - name: 'basisRate', - baseName: 'basis_rate', - type: 'string', + "name": "basisRate", + "baseName": "basis_rate", + "type": "string" }, { - name: 'basisValue', - baseName: 'basis_value', - type: 'string', + "name": "basisValue", + "baseName": "basis_value", + "type": "string" }, { - name: 'lowestAsk', - baseName: 'lowest_ask', - type: 'string', + "name": "lowestAsk", + "baseName": "lowest_ask", + "type": "string" }, { - name: 'lowestSize', - baseName: 'lowest_size', - type: 'string', + "name": "lowestSize", + "baseName": "lowest_size", + "type": "string" }, { - name: 'highestBid', - baseName: 'highest_bid', - type: 'string', + "name": "highestBid", + "baseName": "highest_bid", + "type": "string" }, { - name: 'highestSize', - baseName: 'highest_size', - type: 'string', - }, - ]; + "name": "highestSize", + "baseName": "highest_size", + "type": "string" + } ]; static getAttributeTypeMap() { return FuturesTicker.attributeTypeMap; } } + diff --git a/model/futuresTrade.ts b/model/futuresTrade.ts index d415256..63e6eab 100644 --- a/model/futuresTrade.ts +++ b/model/futuresTrade.ts @@ -9,77 +9,78 @@ * Do not edit the class manually. */ + export class FuturesTrade { /** - * Trade ID - */ + * Trade ID + */ 'id'?: number; /** - * Trading time - */ + * Trading time + */ 'createTime'?: number; /** - * Trading time, with milliseconds set to 3 decimal places. - */ + * Trading time, with milliseconds set to 3 decimal places. + */ 'createTimeMs'?: number; /** - * Futures contract - */ + * Futures contract + */ 'contract'?: string; /** - * Trading size - */ + * Trading size + */ 'size'?: number; /** - * Trading price (quote currency) - */ + * Trading price (quote currency) + */ 'price'?: string; /** - * 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. - */ + * 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. + */ 'isInternal'?: boolean; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'number', + "name": "id", + "baseName": "id", + "type": "number" }, { - name: 'createTime', - baseName: 'create_time', - type: 'number', + "name": "createTime", + "baseName": "create_time", + "type": "number" }, { - name: 'createTimeMs', - baseName: 'create_time_ms', - type: 'number', + "name": "createTimeMs", + "baseName": "create_time_ms", + "type": "number" }, { - name: 'contract', - baseName: 'contract', - type: 'string', + "name": "contract", + "baseName": "contract", + "type": "string" }, { - name: 'size', - baseName: 'size', - type: 'number', + "name": "size", + "baseName": "size", + "type": "number" }, { - name: 'price', - baseName: 'price', - type: 'string', + "name": "price", + "baseName": "price", + "type": "string" }, { - name: 'isInternal', - baseName: 'is_internal', - type: 'boolean', - }, - ]; + "name": "isInternal", + "baseName": "is_internal", + "type": "boolean" + } ]; static getAttributeTypeMap() { return FuturesTrade.attributeTypeMap; } } + diff --git a/model/indexConstituent.ts b/model/indexConstituent.ts index 498e27a..09b61dd 100644 --- a/model/indexConstituent.ts +++ b/model/indexConstituent.ts @@ -9,32 +9,33 @@ * Do not edit the class manually. */ + export class IndexConstituent { /** - * Exchange - */ + * Exchange + */ 'exchange'?: string; /** - * Symbol list - */ + * Symbol list + */ 'symbols'?: Array; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'exchange', - baseName: 'exchange', - type: 'string', + "name": "exchange", + "baseName": "exchange", + "type": "string" }, { - name: 'symbols', - baseName: 'symbols', - type: 'Array', - }, - ]; + "name": "symbols", + "baseName": "symbols", + "type": "Array" + } ]; static getAttributeTypeMap() { return IndexConstituent.attributeTypeMap; } } + diff --git a/model/inlineObject.ts b/model/inlineObject.ts deleted file mode 100644 index a3567a1..0000000 --- a/model/inlineObject.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Gate API v4 - * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. - * - * Contact: support@mail.gate.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export class InlineObject { - /** - * Currency name - */ - 'currency': string; - /** - * 倍数 - */ - 'leverage': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ - { - name: 'currency', - baseName: 'currency', - type: 'string', - }, - { - name: 'leverage', - baseName: 'leverage', - type: 'string', - }, - ]; - - static getAttributeTypeMap() { - return InlineObject.attributeTypeMap; - } -} diff --git a/model/inlineResponse2001.ts b/model/inlineResponse2001.ts deleted file mode 100644 index fa29072..0000000 --- a/model/inlineResponse2001.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Gate API v4 - * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. - * - * Contact: support@mail.gate.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export class InlineResponse2001 { - /** - * Whether GT fee discount is used - */ - 'enabled'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ - { - name: 'enabled', - baseName: 'enabled', - type: 'boolean', - }, - ]; - - static getAttributeTypeMap() { - return InlineResponse2001.attributeTypeMap; - } -} diff --git a/model/insuranceRecord.ts b/model/insuranceRecord.ts index d389ad2..bf8d1a6 100644 --- a/model/insuranceRecord.ts +++ b/model/insuranceRecord.ts @@ -9,32 +9,33 @@ * Do not edit the class manually. */ + export class InsuranceRecord { /** - * Unix timestamp in seconds - */ + * Unix timestamp in seconds + */ 't'?: number; /** - * Insurance balance - */ + * Insurance balance + */ 'b'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 't', - baseName: 't', - type: 'number', + "name": "t", + "baseName": "t", + "type": "number" }, { - name: 'b', - baseName: 'b', - type: 'string', - }, - ]; + "name": "b", + "baseName": "b", + "type": "string" + } ]; static getAttributeTypeMap() { return InsuranceRecord.attributeTypeMap; } } + diff --git a/model/ledgerRecord.ts b/model/ledgerRecord.ts index 9d369ac..bef1eca 100644 --- a/model/ledgerRecord.ts +++ b/model/ledgerRecord.ts @@ -9,102 +9,102 @@ * Do not edit the class manually. */ + export class LedgerRecord { /** - * Record ID - */ + * Record ID + */ 'id'?: string; /** - * Hash record of the withdrawal - */ + * Hash record of the withdrawal + */ 'txid'?: string; /** - * Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) - */ + * Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) + */ 'withdrawOrderId'?: string; /** - * Operation time - */ + * Operation time + */ 'timestamp'?: string; /** - * Currency amount - */ + * Currency amount + */ 'amount': string; /** - * Currency name - */ + * Currency name + */ 'currency': string; /** - * Withdrawal address. Required for withdrawals - */ + * Withdrawal address. Required for withdrawals + */ 'address'?: string; /** - * Additional remarks with regards to the withdrawal - */ + * Additional remarks with regards to the withdrawal + */ 'memo'?: string; /** - * Record status. - DONE: done - CANCEL: cancelled - REQUEST: requesting - MANUAL: pending manual approval - BCODE: GateCode operation - EXTPEND: pending confirm after sending - FAIL: pending confirm when fail - INVALID: invalid order - VERIFY: verifying - PROCES: processing - PEND: pending - DMOVE: required manual approval - SPLITPEND: the order is automatically split due to large amount - */ + * Record status. - DONE: done - CANCEL: cancelled - REQUEST: requesting - MANUAL: pending manual approval - BCODE: GateCode operation - EXTPEND: pending confirm after sending - FAIL: pending confirm when fail - INVALID: invalid order - VERIFY: verifying - PROCES: processing - PEND: pending - DMOVE: required manual approval - SPLITPEND: the order is automatically split due to large amount + */ 'status'?: LedgerRecord.Status; /** - * Name of the chain used in withdrawals - */ + * Name of the chain used in withdrawals + */ 'chain': string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'string', + "name": "id", + "baseName": "id", + "type": "string" }, { - name: 'txid', - baseName: 'txid', - type: 'string', + "name": "txid", + "baseName": "txid", + "type": "string" }, { - name: 'withdrawOrderId', - baseName: 'withdraw_order_id', - type: 'string', + "name": "withdrawOrderId", + "baseName": "withdraw_order_id", + "type": "string" }, { - name: 'timestamp', - baseName: 'timestamp', - type: 'string', + "name": "timestamp", + "baseName": "timestamp", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'address', - baseName: 'address', - type: 'string', + "name": "address", + "baseName": "address", + "type": "string" }, { - name: 'memo', - baseName: 'memo', - type: 'string', + "name": "memo", + "baseName": "memo", + "type": "string" }, { - name: 'status', - baseName: 'status', - type: 'LedgerRecord.Status', + "name": "status", + "baseName": "status", + "type": "LedgerRecord.Status" }, { - name: 'chain', - baseName: 'chain', - type: 'string', - }, - ]; + "name": "chain", + "baseName": "chain", + "type": "string" + } ]; static getAttributeTypeMap() { return LedgerRecord.attributeTypeMap; @@ -113,18 +113,18 @@ export class LedgerRecord { export namespace LedgerRecord { export enum Status { - DONE = 'DONE', - CANCEL = 'CANCEL', - REQUEST = 'REQUEST', - MANUAL = 'MANUAL', - BCODE = 'BCODE', - EXTPEND = 'EXTPEND', - FAIL = 'FAIL', - INVALID = 'INVALID', - VERIFY = 'VERIFY', - PROCES = 'PROCES', - PEND = 'PEND', - DMOVE = 'DMOVE', - SPLITPEND = 'SPLITPEND', + DONE = 'DONE', + CANCEL = 'CANCEL', + REQUEST = 'REQUEST', + MANUAL = 'MANUAL', + BCODE = 'BCODE', + EXTPEND = 'EXTPEND', + FAIL = 'FAIL', + INVALID = 'INVALID', + VERIFY = 'VERIFY', + PROCES = 'PROCES', + PEND = 'PEND', + DMOVE = 'DMOVE', + SPLITPEND = 'SPLITPEND' } } diff --git a/model/liquidateOrder.ts b/model/liquidateOrder.ts index 47da26f..3bd34d6 100644 --- a/model/liquidateOrder.ts +++ b/model/liquidateOrder.ts @@ -9,62 +9,63 @@ * Do not edit the class manually. */ + /** - * Liquidate Order detail - */ +* Liquidate Order detail +*/ export class 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(.) - */ + * 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(.) + */ 'text'?: string; /** - * Currency pair - */ + * Currency pair + */ 'currencyPair': string; /** - * Trade amount - */ + * Trade amount + */ 'amount': string; /** - * Order price - */ + * Order price + */ 'price': string; /** - * 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) - */ + * 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) + */ 'actionMode'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'text', - baseName: 'text', - type: 'string', + "name": "text", + "baseName": "text", + "type": "string" }, { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'price', - baseName: 'price', - type: 'string', + "name": "price", + "baseName": "price", + "type": "string" }, { - name: 'actionMode', - baseName: 'action_mode', - type: 'string', - }, - ]; + "name": "actionMode", + "baseName": "action_mode", + "type": "string" + } ]; static getAttributeTypeMap() { return LiquidateOrder.attributeTypeMap; } } + diff --git a/model/loan.ts b/model/loan.ts deleted file mode 100644 index 9b6278e..0000000 --- a/model/loan.ts +++ /dev/null @@ -1,200 +0,0 @@ -/** - * Gate API v4 - * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. - * - * Contact: support@mail.gate.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Margin loan details - */ -export class Loan { - /** - * Loan ID - */ - 'id'?: string; - /** - * Creation time - */ - 'createTime'?: string; - /** - * Repay time of the loan. No value will be returned for lending loan - */ - 'expireTime'?: string; - /** - * Loan status open - not fully loaned loaned - all loaned out for lending loan; loaned in for borrowing side finished - loan is finished, either being all repaid or cancelled by the lender auto_repaid - automatically repaid by the system - */ - 'status'?: Loan.Status; - /** - * Loan side - */ - 'side': Loan.Side; - /** - * Loan currency - */ - 'currency': string; - /** - * Loan rate. Only rates in [0.0001, 0.01] are supported. Not required in lending. Market rate calculated from recent rates will be used if not set - */ - 'rate'?: string; - /** - * Loan amount - */ - 'amount': string; - /** - * Loan days. Only 10 is supported for now - */ - 'days'?: number; - /** - * Whether to auto renew the loan upon expiration - */ - 'autoRenew'?: boolean; - /** - * Currency pair. Required if borrowing - */ - 'currencyPair'?: string; - /** - * Amount not lent out yet - */ - 'left'?: string; - /** - * Repaid amount - */ - 'repaid'?: string; - /** - * Repaid interest - */ - 'paidInterest'?: string; - /** - * Outstanding interest yet to be paid - */ - 'unpaidInterest'?: string; - /** - * Loan fee rate - */ - 'feeRate'?: string; - /** - * Original loan ID of the loan if auto-renewed, otherwise equals to id - */ - 'origId'?: string; - /** - * User defined custom ID - */ - 'text'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ - { - name: 'id', - baseName: 'id', - type: 'string', - }, - { - name: 'createTime', - baseName: 'create_time', - type: 'string', - }, - { - name: 'expireTime', - baseName: 'expire_time', - type: 'string', - }, - { - name: 'status', - baseName: 'status', - type: 'Loan.Status', - }, - { - name: 'side', - baseName: 'side', - type: 'Loan.Side', - }, - { - name: 'currency', - baseName: 'currency', - type: 'string', - }, - { - name: 'rate', - baseName: 'rate', - type: 'string', - }, - { - name: 'amount', - baseName: 'amount', - type: 'string', - }, - { - name: 'days', - baseName: 'days', - type: 'number', - }, - { - name: 'autoRenew', - baseName: 'auto_renew', - type: 'boolean', - }, - { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', - }, - { - name: 'left', - baseName: 'left', - type: 'string', - }, - { - name: 'repaid', - baseName: 'repaid', - type: 'string', - }, - { - name: 'paidInterest', - baseName: 'paid_interest', - type: 'string', - }, - { - name: 'unpaidInterest', - baseName: 'unpaid_interest', - type: 'string', - }, - { - name: 'feeRate', - baseName: 'fee_rate', - type: 'string', - }, - { - name: 'origId', - baseName: 'orig_id', - type: 'string', - }, - { - name: 'text', - baseName: 'text', - type: 'string', - }, - ]; - - static getAttributeTypeMap() { - return Loan.attributeTypeMap; - } -} - -export namespace Loan { - export enum Status { - Open = 'open', - Loaned = 'loaned', - Finished = 'finished', - AutoRepaid = 'auto_repaid', - } - export enum Side { - Lend = 'lend', - Borrow = 'borrow', - } -} diff --git a/model/loanPatch.ts b/model/loanPatch.ts deleted file mode 100644 index dd9a878..0000000 --- a/model/loanPatch.ts +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Gate API v4 - * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. - * - * Contact: support@mail.gate.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export class LoanPatch { - /** - * Loan currency - */ - 'currency': string; - /** - * Loan side. Possible values are `lend` and `borrow`. For `LoanRecord` patching, only `lend` is supported - */ - 'side': LoanPatch.Side; - /** - * Auto renew - */ - 'autoRenew': boolean; - /** - * Currency pair. Required if borrowing - */ - 'currencyPair'?: string; - /** - * Loan ID. Required for `LoanRecord` patching - */ - 'loanId'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ - { - name: 'currency', - baseName: 'currency', - type: 'string', - }, - { - name: 'side', - baseName: 'side', - type: 'LoanPatch.Side', - }, - { - name: 'autoRenew', - baseName: 'auto_renew', - type: 'boolean', - }, - { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', - }, - { - name: 'loanId', - baseName: 'loan_id', - type: 'string', - }, - ]; - - static getAttributeTypeMap() { - return LoanPatch.attributeTypeMap; - } -} - -export namespace LoanPatch { - export enum Side { - Lend = 'lend', - Borrow = 'borrow', - } -} diff --git a/model/loanRecord.ts b/model/loanRecord.ts deleted file mode 100644 index 5ca487b..0000000 --- a/model/loanRecord.ts +++ /dev/null @@ -1,158 +0,0 @@ -/** - * Gate API v4 - * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. - * - * Contact: support@mail.gate.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Margin loaned record details - */ -export class LoanRecord { - /** - * Loan record ID - */ - 'id'?: string; - /** - * Loan ID the record belongs to - */ - 'loanId'?: string; - /** - * Loan time - */ - 'createTime'?: string; - /** - * Expiration time - */ - 'expireTime'?: string; - /** - * Loan record status - */ - 'status'?: LoanRecord.Status; - /** - * Garbled user ID - */ - 'borrowUserId'?: string; - /** - * Loan currency - */ - 'currency'?: string; - /** - * Loan rate - */ - 'rate'?: string; - /** - * Loan amount - */ - 'amount'?: string; - /** - * Loan days - */ - 'days'?: number; - /** - * Whether the record will auto renew on expiration - */ - 'autoRenew'?: boolean; - /** - * Repaid amount - */ - 'repaid'?: string; - /** - * Repaid interest - */ - 'paidInterest'?: string; - /** - * Outstanding interest yet to be paid - */ - 'unpaidInterest'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ - { - name: 'id', - baseName: 'id', - type: 'string', - }, - { - name: 'loanId', - baseName: 'loan_id', - type: 'string', - }, - { - name: 'createTime', - baseName: 'create_time', - type: 'string', - }, - { - name: 'expireTime', - baseName: 'expire_time', - type: 'string', - }, - { - name: 'status', - baseName: 'status', - type: 'LoanRecord.Status', - }, - { - name: 'borrowUserId', - baseName: 'borrow_user_id', - type: 'string', - }, - { - name: 'currency', - baseName: 'currency', - type: 'string', - }, - { - name: 'rate', - baseName: 'rate', - type: 'string', - }, - { - name: 'amount', - baseName: 'amount', - type: 'string', - }, - { - name: 'days', - baseName: 'days', - type: 'number', - }, - { - name: 'autoRenew', - baseName: 'auto_renew', - type: 'boolean', - }, - { - name: 'repaid', - baseName: 'repaid', - type: 'string', - }, - { - name: 'paidInterest', - baseName: 'paid_interest', - type: 'string', - }, - { - name: 'unpaidInterest', - baseName: 'unpaid_interest', - type: 'string', - }, - ]; - - static getAttributeTypeMap() { - return LoanRecord.attributeTypeMap; - } -} - -export namespace LoanRecord { - export enum Status { - Loaned = 'loaned', - Finished = 'finished', - } -} diff --git a/model/marginAccount.ts b/model/marginAccount.ts index 69e657b..0ccb92d 100644 --- a/model/marginAccount.ts +++ b/model/marginAccount.ts @@ -12,55 +12,55 @@ import { MarginAccountCurrency } from './marginAccountCurrency'; /** - * Margin account detail. `base` refers to base currency, while `quotes to quote currency - */ +* Margin account detail. `base` refers to base currency, while `quotes to quote currency +*/ export class MarginAccount { /** - * Currency pair - */ + * Currency pair + */ 'currencyPair'?: string; /** - * Whether account is locked - */ + * Whether account is locked + */ 'locked'?: boolean; /** - * Current risk rate of margin account - */ + * Current risk rate of margin account + */ 'risk'?: string; 'base'?: MarginAccountCurrency; 'quote'?: MarginAccountCurrency; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" }, { - name: 'locked', - baseName: 'locked', - type: 'boolean', + "name": "locked", + "baseName": "locked", + "type": "boolean" }, { - name: 'risk', - baseName: 'risk', - type: 'string', + "name": "risk", + "baseName": "risk", + "type": "string" }, { - name: 'base', - baseName: 'base', - type: 'MarginAccountCurrency', + "name": "base", + "baseName": "base", + "type": "MarginAccountCurrency" }, { - name: 'quote', - baseName: 'quote', - type: 'MarginAccountCurrency', - }, - ]; + "name": "quote", + "baseName": "quote", + "type": "MarginAccountCurrency" + } ]; static getAttributeTypeMap() { return MarginAccount.attributeTypeMap; } } + diff --git a/model/marginAccountBook.ts b/model/marginAccountBook.ts index 76ef76e..690e86a 100644 --- a/model/marginAccountBook.ts +++ b/model/marginAccountBook.ts @@ -9,86 +9,87 @@ * Do not edit the class manually. */ + export class MarginAccountBook { /** - * Balance change record ID - */ + * Balance change record ID + */ 'id'?: string; /** - * Balance changed timestamp - */ + * Balance changed timestamp + */ 'time'?: string; /** - * The timestamp of the change (in milliseconds) - */ + * The timestamp of the change (in milliseconds) + */ 'timeMs'?: number; /** - * Currency changed - */ + * Currency changed + */ 'currency'?: string; /** - * Account currency pair - */ + * Account currency pair + */ 'currencyPair'?: string; /** - * Amount changed. Positive value means transferring in, while negative out - */ + * Amount changed. Positive value means transferring in, while negative out + */ 'change'?: string; /** - * Balance after change - */ + * Balance after change + */ 'balance'?: string; /** - * Account book type. Please refer to [account book type](#accountbook-type) for more detail - */ + * Account book type. Please refer to [account book type](#accountbook-type) for more detail + */ 'type'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'string', + "name": "id", + "baseName": "id", + "type": "string" }, { - name: 'time', - baseName: 'time', - type: 'string', + "name": "time", + "baseName": "time", + "type": "string" }, { - name: 'timeMs', - baseName: 'time_ms', - type: 'number', + "name": "timeMs", + "baseName": "time_ms", + "type": "number" }, { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" }, { - name: 'change', - baseName: 'change', - type: 'string', + "name": "change", + "baseName": "change", + "type": "string" }, { - name: 'balance', - baseName: 'balance', - type: 'string', + "name": "balance", + "baseName": "balance", + "type": "string" }, { - name: 'type', - baseName: 'type', - type: 'string', - }, - ]; + "name": "type", + "baseName": "type", + "type": "string" + } ]; static getAttributeTypeMap() { return MarginAccountBook.attributeTypeMap; } } + diff --git a/model/marginAccountCurrency.ts b/model/marginAccountCurrency.ts index 6be968a..2d00d4b 100644 --- a/model/marginAccountCurrency.ts +++ b/model/marginAccountCurrency.ts @@ -9,62 +9,63 @@ * Do not edit the class manually. */ + /** - * Account currency details - */ +* Account currency details +*/ export class MarginAccountCurrency { /** - * Currency name - */ + * Currency name + */ 'currency'?: string; /** - * Amount suitable for margin trading. - */ + * Amount suitable for margin trading. + */ 'available'?: string; /** - * Locked amount, used in margin trading - */ + * Locked amount, used in margin trading + */ 'locked'?: string; /** - * Borrowed amount - */ + * Borrowed amount + */ 'borrowed'?: string; /** - * Unpaid interests - */ + * Unpaid interests + */ 'interest'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'available', - baseName: 'available', - type: 'string', + "name": "available", + "baseName": "available", + "type": "string" }, { - name: 'locked', - baseName: 'locked', - type: 'string', + "name": "locked", + "baseName": "locked", + "type": "string" }, { - name: 'borrowed', - baseName: 'borrowed', - type: 'string', + "name": "borrowed", + "baseName": "borrowed", + "type": "string" }, { - name: 'interest', - baseName: 'interest', - type: 'string', - }, - ]; + "name": "interest", + "baseName": "interest", + "type": "string" + } ]; static getAttributeTypeMap() { return MarginAccountCurrency.attributeTypeMap; } } + diff --git a/model/marginBorrowable.ts b/model/marginBorrowable.ts deleted file mode 100644 index 7285948..0000000 --- a/model/marginBorrowable.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Gate API v4 - * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. - * - * Contact: support@mail.gate.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export class MarginBorrowable { - /** - * Currency detail - */ - 'currency'?: string; - /** - * Currency pair - */ - 'currencyPair'?: string; - /** - * Max borrowable amount - */ - 'amount'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ - { - name: 'currency', - baseName: 'currency', - type: 'string', - }, - { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', - }, - { - name: 'amount', - baseName: 'amount', - type: 'string', - }, - ]; - - static getAttributeTypeMap() { - return MarginBorrowable.attributeTypeMap; - } -} diff --git a/model/marginCurrencyPair.ts b/model/marginCurrencyPair.ts deleted file mode 100644 index 29ac000..0000000 --- a/model/marginCurrencyPair.ts +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Gate API v4 - * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. - * - * Contact: support@mail.gate.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export class MarginCurrencyPair { - /** - * Currency pair - */ - 'id'?: string; - /** - * Base currency - */ - 'base'?: string; - /** - * Quote currency - */ - 'quote'?: string; - /** - * Leverage - */ - 'leverage'?: number; - /** - * Minimum base currency to loan, `null` means no limit - */ - 'minBaseAmount'?: string; - /** - * Minimum quote currency to loan, `null` means no limit - */ - 'minQuoteAmount'?: string; - /** - * Maximum borrowable amount for quote currency. Base currency limit is calculated by quote maximum and market price. `null` means no limit - */ - 'maxQuoteAmount'?: string; - /** - * Currency pair status - `0`: disabled - `1`: enabled - */ - 'status'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ - { - name: 'id', - baseName: 'id', - type: 'string', - }, - { - name: 'base', - baseName: 'base', - type: 'string', - }, - { - name: 'quote', - baseName: 'quote', - type: 'string', - }, - { - name: 'leverage', - baseName: 'leverage', - type: 'number', - }, - { - name: 'minBaseAmount', - baseName: 'min_base_amount', - type: 'string', - }, - { - name: 'minQuoteAmount', - baseName: 'min_quote_amount', - type: 'string', - }, - { - name: 'maxQuoteAmount', - baseName: 'max_quote_amount', - type: 'string', - }, - { - name: 'status', - baseName: 'status', - type: 'number', - }, - ]; - - static getAttributeTypeMap() { - return MarginCurrencyPair.attributeTypeMap; - } -} diff --git a/model/marginTiers.ts b/model/marginTiers.ts index 31c3909..112ed21 100644 --- a/model/marginTiers.ts +++ b/model/marginTiers.ts @@ -9,59 +9,60 @@ * Do not edit the class manually. */ + export class MarginTiers { /** - * Tier - */ + * Tier + */ 'tier'?: string; /** - * Discount - */ + * Discount + */ 'marginRate'?: string; /** - * Lower limit - */ + * Lower limit + */ 'lowerLimit'?: string; /** - * 上限, \"\"表示大于(最后一个档位) - */ + * Upper limit, \"\" indicates greater than (the last tier) + */ 'upperLimit'?: string; /** - * Position leverage - */ + * Position leverage + */ 'leverage'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'tier', - baseName: 'tier', - type: 'string', + "name": "tier", + "baseName": "tier", + "type": "string" }, { - name: 'marginRate', - baseName: 'margin_rate', - type: 'string', + "name": "marginRate", + "baseName": "margin_rate", + "type": "string" }, { - name: 'lowerLimit', - baseName: 'lower_limit', - type: 'string', + "name": "lowerLimit", + "baseName": "lower_limit", + "type": "string" }, { - name: 'upperLimit', - baseName: 'upper_limit', - type: 'string', + "name": "upperLimit", + "baseName": "upper_limit", + "type": "string" }, { - name: 'leverage', - baseName: 'leverage', - type: 'string', - }, - ]; + "name": "leverage", + "baseName": "leverage", + "type": "string" + } ]; static getAttributeTypeMap() { return MarginTiers.attributeTypeMap; } } + diff --git a/model/marginTransferable.ts b/model/marginTransferable.ts index ed2462f..4a29d7d 100644 --- a/model/marginTransferable.ts +++ b/model/marginTransferable.ts @@ -9,41 +9,42 @@ * Do not edit the class manually. */ + export class MarginTransferable { /** - * Currency detail - */ + * Currency detail + */ 'currency'?: string; /** - * Currency pair - */ + * Currency pair + */ 'currencyPair'?: string; /** - * Max transferable amount - */ + * Max transferable amount + */ 'amount'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', - }, - ]; + "name": "amount", + "baseName": "amount", + "type": "string" + } ]; static getAttributeTypeMap() { return MarginTransferable.attributeTypeMap; } } + diff --git a/model/maxUniBorrowable.ts b/model/maxUniBorrowable.ts index dba6a8c..45a5490 100644 --- a/model/maxUniBorrowable.ts +++ b/model/maxUniBorrowable.ts @@ -9,41 +9,42 @@ * Do not edit the class manually. */ + export class MaxUniBorrowable { /** - * Currency - */ + * Currency + */ 'currency': string; /** - * Currency pair - */ + * Currency pair + */ 'currencyPair'?: string; /** - * Maximum borrowable - */ + * Maximum borrowable + */ 'borrowable': string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" }, { - name: 'borrowable', - baseName: 'borrowable', - type: 'string', - }, - ]; + "name": "borrowable", + "baseName": "borrowable", + "type": "string" + } ]; static getAttributeTypeMap() { return MaxUniBorrowable.attributeTypeMap; } } + diff --git a/model/mockFuturesOrder.ts b/model/mockFuturesOrder.ts index 6f51588..df12311 100644 --- a/model/mockFuturesOrder.ts +++ b/model/mockFuturesOrder.ts @@ -9,44 +9,45 @@ * Do not edit the class manually. */ + /** - * 合约订单 - */ +* Futures order +*/ export class MockFuturesOrder { /** - * 合约名,目前仅支持BTC、ETH的USDT永续合约 - */ + * Futures name, currently only supports perpetual futures for BTC and ETH with USDT. + */ 'contract': string; /** - * 合约张数,为初始挂单数量,不参与实际结算 - */ + * Futures quantity, representing the initial order quantity, not involved in actual settlement. + */ 'size': string; /** - * 未成交张数,参与实际计算 - */ + * Unfilled contract quantity, involved in actual calculation + */ 'left': string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'contract', - baseName: 'contract', - type: 'string', + "name": "contract", + "baseName": "contract", + "type": "string" }, { - name: 'size', - baseName: 'size', - type: 'string', + "name": "size", + "baseName": "size", + "type": "string" }, { - name: 'left', - baseName: 'left', - type: 'string', - }, - ]; + "name": "left", + "baseName": "left", + "type": "string" + } ]; static getAttributeTypeMap() { return MockFuturesOrder.attributeTypeMap; } } + diff --git a/model/mockFuturesPosition.ts b/model/mockFuturesPosition.ts index 8be7f3f..8daf0d9 100644 --- a/model/mockFuturesPosition.ts +++ b/model/mockFuturesPosition.ts @@ -9,35 +9,36 @@ * Do not edit the class manually. */ + /** - * 合约仓位 - */ +* Futures positions +*/ export class MockFuturesPosition { /** - * 合约名,目前仅支持BTC、ETH的USDT永续合约 - */ + * Futures name, currently only supports perpetual futures for BTC and ETH with USDT. + */ 'contract': string; /** - * 仓位大小,单位是张数 - */ + * Position size, measured in contract units. + */ 'size': string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'contract', - baseName: 'contract', - type: 'string', + "name": "contract", + "baseName": "contract", + "type": "string" }, { - name: 'size', - baseName: 'size', - type: 'string', - }, - ]; + "name": "size", + "baseName": "size", + "type": "string" + } ]; static getAttributeTypeMap() { return MockFuturesPosition.attributeTypeMap; } } + diff --git a/model/mockMarginResult.ts b/model/mockMarginResult.ts index 352fb86..8ef3ed6 100644 --- a/model/mockMarginResult.ts +++ b/model/mockMarginResult.ts @@ -12,79 +12,79 @@ import { ProfitLossRange } from './profitLossRange'; /** - * 保证金结果 - */ +* Margin result +*/ export class MockMarginResult { /** - * 仓位组合类型 `original_position` - 原始仓位 `long_delta_original_position` - 正向delta+原始仓位 `short_delta_original_position` - 负向delta+原始仓位 - */ + * Position combination type `original_position` - Original position `long_delta_original_position` - Positive delta + Original position `short_delta_original_position` - Negative delta + Original position + */ 'type'?: string; /** - * mr1的33个压力场景测试结果 - */ + * The results of 33 pressure scenarios for MR1 + */ 'profitLossRanges'?: Array; /** - * 最大损失 - */ + * 最大损失 + */ 'maxLoss'?: ProfitLossRange; /** - * 压力测试 - */ + * Stress testing + */ 'mr1'?: string; /** - * 基差跨期风险 - */ + * Basis spread risk + */ 'mr2'?: string; /** - * 波动率跨期风险 - */ + * Volatility spread risk + */ 'mr3'?: string; /** - * 期权空头风险 - */ + * Option short risk + */ 'mr4'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'type', - baseName: 'type', - type: 'string', + "name": "type", + "baseName": "type", + "type": "string" }, { - name: 'profitLossRanges', - baseName: 'profit_loss_ranges', - type: 'Array', + "name": "profitLossRanges", + "baseName": "profit_loss_ranges", + "type": "Array" }, { - name: 'maxLoss', - baseName: 'max_loss', - type: 'ProfitLossRange', + "name": "maxLoss", + "baseName": "max_loss", + "type": "ProfitLossRange" }, { - name: 'mr1', - baseName: 'mr1', - type: 'string', + "name": "mr1", + "baseName": "mr1", + "type": "string" }, { - name: 'mr2', - baseName: 'mr2', - type: 'string', + "name": "mr2", + "baseName": "mr2", + "type": "string" }, { - name: 'mr3', - baseName: 'mr3', - type: 'string', + "name": "mr3", + "baseName": "mr3", + "type": "string" }, { - name: 'mr4', - baseName: 'mr4', - type: 'string', - }, - ]; + "name": "mr4", + "baseName": "mr4", + "type": "string" + } ]; static getAttributeTypeMap() { return MockMarginResult.attributeTypeMap; } } + diff --git a/model/mockOptionsOrder.ts b/model/mockOptionsOrder.ts index fa9ee97..49ee387 100644 --- a/model/mockOptionsOrder.ts +++ b/model/mockOptionsOrder.ts @@ -9,44 +9,45 @@ * Do not edit the class manually. */ + /** - * 期权订单 - */ +* Option orders +*/ export class MockOptionsOrder { /** - * 期权名称,目前只支持BTC、ETH的USDT期权 - */ + * Option name, currently only supports options for BTC and ETH with USDT. + */ 'optionsName': string; /** - * 初始挂单张数,不参与实际计算 - */ + * Initial order quantity, not involved in actual calculation + */ 'size': string; /** - * 未成交张数,参与实际计算 - */ + * Unfilled contract quantity, involved in actual calculation + */ 'left': string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'optionsName', - baseName: 'options_name', - type: 'string', + "name": "optionsName", + "baseName": "options_name", + "type": "string" }, { - name: 'size', - baseName: 'size', - type: 'string', + "name": "size", + "baseName": "size", + "type": "string" }, { - name: 'left', - baseName: 'left', - type: 'string', - }, - ]; + "name": "left", + "baseName": "left", + "type": "string" + } ]; static getAttributeTypeMap() { return MockOptionsOrder.attributeTypeMap; } } + diff --git a/model/mockOptionsPosition.ts b/model/mockOptionsPosition.ts index 0700e50..e611c21 100644 --- a/model/mockOptionsPosition.ts +++ b/model/mockOptionsPosition.ts @@ -9,35 +9,36 @@ * Do not edit the class manually. */ + /** - * 期权仓位 - */ +* Options positions +*/ export class MockOptionsPosition { /** - * 期权名称,目前只支持BTC、ETH的USDT期权 - */ + * Option name, currently only supports options for BTC and ETH with USDT. + */ 'optionsName': string; /** - * 仓位大小,单位是张数 - */ + * Position size, measured in contract units. + */ 'size': string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'optionsName', - baseName: 'options_name', - type: 'string', + "name": "optionsName", + "baseName": "options_name", + "type": "string" }, { - name: 'size', - baseName: 'size', - type: 'string', - }, - ]; + "name": "size", + "baseName": "size", + "type": "string" + } ]; static getAttributeTypeMap() { return MockOptionsPosition.attributeTypeMap; } } + diff --git a/model/mockRiskUnit.ts b/model/mockRiskUnit.ts index 77f9e2c..2d4897d 100644 --- a/model/mockRiskUnit.ts +++ b/model/mockRiskUnit.ts @@ -12,97 +12,97 @@ import { MockMarginResult } from './mockMarginResult'; /** - * 风险单元 - */ +* Risk unit +*/ export class MockRiskUnit { /** - * 风险单元名称 - */ + * Risk unit name + */ 'symbol'?: string; /** - * 现货对冲使用量 - */ + * Spot usage + */ 'spotInUse'?: string; /** - * 维持保证金 - */ + * Maintenance margin + */ 'maintainMargin'?: string; /** - * 起始保证金 - */ + * Initial margin + */ 'initialMargin'?: string; /** - * 保证金结果 - */ + * Margin result + */ 'marginResult'?: Array; /** - * 风险单元的 总 delta - */ + * Total Delta of risk unit + */ 'delta'?: string; /** - * 风险单元的 总 gamma - */ + * Total Gamma of risk unit + */ 'gamma'?: string; /** - * 风险单元的 总 theta - */ + * Total Theta of risk unit + */ 'theta'?: string; /** - * 风险单元的 总 vega - */ + * Total Vega of risk unit + */ 'vega'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'symbol', - baseName: 'symbol', - type: 'string', + "name": "symbol", + "baseName": "symbol", + "type": "string" }, { - name: 'spotInUse', - baseName: 'spot_in_use', - type: 'string', + "name": "spotInUse", + "baseName": "spot_in_use", + "type": "string" }, { - name: 'maintainMargin', - baseName: 'maintain_margin', - type: 'string', + "name": "maintainMargin", + "baseName": "maintain_margin", + "type": "string" }, { - name: 'initialMargin', - baseName: 'initial_margin', - type: 'string', + "name": "initialMargin", + "baseName": "initial_margin", + "type": "string" }, { - name: 'marginResult', - baseName: 'margin_result', - type: 'Array', + "name": "marginResult", + "baseName": "margin_result", + "type": "Array" }, { - name: 'delta', - baseName: 'delta', - type: 'string', + "name": "delta", + "baseName": "delta", + "type": "string" }, { - name: 'gamma', - baseName: 'gamma', - type: 'string', + "name": "gamma", + "baseName": "gamma", + "type": "string" }, { - name: 'theta', - baseName: 'theta', - type: 'string', + "name": "theta", + "baseName": "theta", + "type": "string" }, { - name: 'vega', - baseName: 'vega', - type: 'string', - }, - ]; + "name": "vega", + "baseName": "vega", + "type": "string" + } ]; static getAttributeTypeMap() { return MockRiskUnit.attributeTypeMap; } } + diff --git a/model/mockSpotBalance.ts b/model/mockSpotBalance.ts index 91db391..d03ca25 100644 --- a/model/mockSpotBalance.ts +++ b/model/mockSpotBalance.ts @@ -9,35 +9,36 @@ * Do not edit the class manually. */ + /** - * 现货 - */ +* Spot +*/ export class MockSpotBalance { /** - * Currency name - */ + * Currency name + */ 'currency': string; /** - * 币种权益,权益 = 余额 - 已借,表示您在现货部位的净delta敞口,可以为负数。目前仅支持BTC、ETH三个币种 - */ + * 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. + */ 'equity': string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'equity', - baseName: 'equity', - type: 'string', - }, - ]; + "name": "equity", + "baseName": "equity", + "type": "string" + } ]; static getAttributeTypeMap() { return MockSpotBalance.attributeTypeMap; } } + diff --git a/model/mockSpotOrder.ts b/model/mockSpotOrder.ts index 2b629a7..def2192 100644 --- a/model/mockSpotOrder.ts +++ b/model/mockSpotOrder.ts @@ -9,62 +9,63 @@ * Do not edit the class manually. */ + /** - * 现货订单 - */ +* Spot orders +*/ export class MockSpotOrder { /** - * Currency pair - */ + * Currency pair + */ 'currencyPairs': string; /** - * Price - */ + * Price + */ 'orderPrice': string; /** - * 现货交易对初始挂单数量,不参与实际计算。目前仅支持BTC、ETH三个币种 - */ + * Initial order quantity for spot trading pairs, not involved in actual calculation. Currently only supports three currencies: BTC, ETH. + */ 'count'?: string; /** - * 未成交数量,参与实际计算 - */ + * Unfilled quantity, involved in actual calculation. + */ 'left': string; /** - * 订单类型,sell - 卖出单,buy - 买入单 - */ + * Order type, sell - sell order, buy - buy order. + */ 'type': string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currencyPairs', - baseName: 'currency_pairs', - type: 'string', + "name": "currencyPairs", + "baseName": "currency_pairs", + "type": "string" }, { - name: 'orderPrice', - baseName: 'order_price', - type: 'string', + "name": "orderPrice", + "baseName": "order_price", + "type": "string" }, { - name: 'count', - baseName: 'count', - type: 'string', + "name": "count", + "baseName": "count", + "type": "string" }, { - name: 'left', - baseName: 'left', - type: 'string', + "name": "left", + "baseName": "left", + "type": "string" }, { - name: 'type', - baseName: 'type', - type: 'string', - }, - ]; + "name": "type", + "baseName": "type", + "type": "string" + } ]; static getAttributeTypeMap() { return MockSpotOrder.attributeTypeMap; } } + diff --git a/model/models.ts b/model/models.ts index 8cfb811..6d73c70 100644 --- a/model/models.ts +++ b/model/models.ts @@ -53,6 +53,7 @@ export * from './currency'; export * from './currencyChain'; export * from './currencyPair'; export * from './currencyQuota'; +export * from './debitFee'; export * from './deliveryCandlestick'; export * from './deliveryContract'; export * from './deliverySettlement'; @@ -90,10 +91,6 @@ export * from './futuresPriceTriggeredOrder'; export * from './futuresTicker'; export * from './futuresTrade'; export * from './indexConstituent'; -export * from './inlineObject'; -export * from './inlineObject1'; -export * from './inlineResponse200'; -export * from './inlineResponse2001'; export * from './insuranceRecord'; export * from './ledgerRecord'; export * from './liquidateOrder'; @@ -199,6 +196,7 @@ export * from './trade'; export * from './tradeFee'; export * from './transactionID'; export * from './transfer'; +export * from './transferOrderStatus'; export * from './triggerOrderResponse'; export * from './triggerTime'; export * from './uidPushOrder'; @@ -241,9 +239,9 @@ export * from './withdrawStatus'; export * from './withdrawalRecord'; import { AxiosRequestConfig } from 'axios'; -import querystring = require('querystring'); -import crypto = require('crypto'); -import { URL } from 'url'; +import querystring = require("querystring"); +import crypto = require("crypto"); +import { URL } from "url"; import { AccountBalance } from './accountBalance'; import { AccountDetail } from './accountDetail'; @@ -300,6 +298,7 @@ import { Currency } from './currency'; import { CurrencyChain } from './currencyChain'; import { CurrencyPair } from './currencyPair'; import { CurrencyQuota } from './currencyQuota'; +import { DebitFee } from './debitFee'; import { DeliveryCandlestick } from './deliveryCandlestick'; import { DeliveryContract } from './deliveryContract'; import { DeliverySettlement } from './deliverySettlement'; @@ -337,10 +336,6 @@ import { FuturesPriceTriggeredOrder } from './futuresPriceTriggeredOrder'; import { FuturesTicker } from './futuresTicker'; import { FuturesTrade } from './futuresTrade'; import { IndexConstituent } from './indexConstituent'; -import { InlineObject } from './inlineObject'; -import { InlineObject1 } from './inlineObject1'; -import { InlineResponse200 } from './inlineResponse200'; -import { InlineResponse2001 } from './inlineResponse2001'; import { InsuranceRecord } from './insuranceRecord'; import { LedgerRecord } from './ledgerRecord'; import { LiquidateOrder } from './liquidateOrder'; @@ -446,6 +441,7 @@ import { Trade } from './trade'; import { TradeFee } from './tradeFee'; import { TransactionID } from './transactionID'; import { Transfer } from './transfer'; +import { TransferOrderStatus } from './transferOrderStatus'; import { TriggerOrderResponse } from './triggerOrderResponse'; import { TriggerTime } from './triggerTime'; import { UidPushOrder } from './uidPushOrder'; @@ -488,323 +484,331 @@ import { WithdrawStatus } from './withdrawStatus'; import { WithdrawalRecord } from './withdrawalRecord'; /* tslint:disable:no-unused-variable */ -const primitives = ['string', 'boolean', 'double', 'integer', 'long', 'float', 'number', 'any', 'bigint']; +let primitives = [ + "string", + "boolean", + "double", + "integer", + "long", + "float", + "number", + "any", + "bigint" + ]; -const enumsMap: { [index: string]: any } = { - 'AccountBalance.Currency': AccountBalance.Currency, - 'AutoRepaySetting.Status': AutoRepaySetting.Status, - 'BatchFuturesOrder.FinishAs': BatchFuturesOrder.FinishAs, - 'BatchFuturesOrder.Status': BatchFuturesOrder.Status, - 'BatchFuturesOrder.Tif': BatchFuturesOrder.Tif, - 'BatchFuturesOrder.AutoSize': BatchFuturesOrder.AutoSize, - 'BatchFuturesOrder.StpAct': BatchFuturesOrder.StpAct, - 'BatchOrder.Status': BatchOrder.Status, - 'BatchOrder.Type': BatchOrder.Type, - 'BatchOrder.Account': BatchOrder.Account, - 'BatchOrder.Side': BatchOrder.Side, - 'BatchOrder.TimeInForce': BatchOrder.TimeInForce, - 'BatchOrder.StpAct': BatchOrder.StpAct, - 'BatchOrder.FinishAs': BatchOrder.FinishAs, - 'Contract.Type': Contract.Type, - 'Contract.MarkType': Contract.MarkType, - 'CreateUniLend.Type': CreateUniLend.Type, - 'CreateUniLoan.Type': CreateUniLoan.Type, - 'CrossMarginLoan.Status': CrossMarginLoan.Status, - 'CurrencyPair.TradeStatus': CurrencyPair.TradeStatus, - 'DeliveryContract.Cycle': DeliveryContract.Cycle, - 'DeliveryContract.Type': DeliveryContract.Type, - 'DeliveryContract.MarkType': DeliveryContract.MarkType, - 'FuturesAccountBook.Type': FuturesAccountBook.Type, - 'FuturesInitialOrder.Tif': FuturesInitialOrder.Tif, - 'FuturesOrder.FinishAs': FuturesOrder.FinishAs, - 'FuturesOrder.Status': FuturesOrder.Status, - 'FuturesOrder.Tif': FuturesOrder.Tif, - 'FuturesOrder.AutoSize': FuturesOrder.AutoSize, - 'FuturesOrder.StpAct': FuturesOrder.StpAct, - 'FuturesPriceTrigger.StrategyType': FuturesPriceTrigger.StrategyType, - 'FuturesPriceTrigger.PriceType': FuturesPriceTrigger.PriceType, - 'FuturesPriceTrigger.Rule': FuturesPriceTrigger.Rule, - 'FuturesPriceTriggeredOrder.Status': FuturesPriceTriggeredOrder.Status, - 'FuturesPriceTriggeredOrder.FinishAs': FuturesPriceTriggeredOrder.FinishAs, - 'LedgerRecord.Status': LedgerRecord.Status, - 'MyFuturesTrade.Role': MyFuturesTrade.Role, - 'MyFuturesTradeTimeRange.Role': MyFuturesTradeTimeRange.Role, - 'OptionsAccount.MarginMode': OptionsAccount.MarginMode, - 'OptionsMyTrade.Role': OptionsMyTrade.Role, - 'OptionsOrder.FinishAs': OptionsOrder.FinishAs, - 'OptionsOrder.Status': OptionsOrder.Status, - 'OptionsOrder.Tif': OptionsOrder.Tif, - 'OptionsPositionClose.Side': OptionsPositionClose.Side, - 'Order.Status': Order.Status, - 'Order.Type': Order.Type, - 'Order.Side': Order.Side, - 'Order.TimeInForce': Order.TimeInForce, - 'Order.StpAct': Order.StpAct, - 'Order.FinishAs': Order.FinishAs, - 'OrderCancel.Status': OrderCancel.Status, - 'OrderCancel.Type': OrderCancel.Type, - 'OrderCancel.Side': OrderCancel.Side, - 'OrderCancel.TimeInForce': OrderCancel.TimeInForce, - 'OrderCancel.StpAct': OrderCancel.StpAct, - 'OrderCancel.FinishAs': OrderCancel.FinishAs, - 'Position.Mode': Position.Mode, - 'PositionClose.Side': PositionClose.Side, - 'SpotPricePutOrder.Type': SpotPricePutOrder.Type, - 'SpotPricePutOrder.Side': SpotPricePutOrder.Side, - 'SpotPricePutOrder.Account': SpotPricePutOrder.Account, - 'SpotPricePutOrder.TimeInForce': SpotPricePutOrder.TimeInForce, - 'SpotPriceTrigger.Rule': SpotPriceTrigger.Rule, - 'Trade.Side': Trade.Side, - 'Trade.Role': Trade.Role, - 'Transfer.From': Transfer.From, - 'Transfer.To': Transfer.To, - 'UnifiedLoan.Type': UnifiedLoan.Type, - 'WithdrawalRecord.Status': WithdrawalRecord.Status, -}; +let enumsMap: {[index: string]: any} = { + "AccountBalance.Currency": AccountBalance.Currency, + "AutoRepaySetting.Status": AutoRepaySetting.Status, + "BatchFuturesOrder.FinishAs": BatchFuturesOrder.FinishAs, + "BatchFuturesOrder.Status": BatchFuturesOrder.Status, + "BatchFuturesOrder.Tif": BatchFuturesOrder.Tif, + "BatchFuturesOrder.AutoSize": BatchFuturesOrder.AutoSize, + "BatchFuturesOrder.StpAct": BatchFuturesOrder.StpAct, + "BatchOrder.Status": BatchOrder.Status, + "BatchOrder.Type": BatchOrder.Type, + "BatchOrder.Account": BatchOrder.Account, + "BatchOrder.Side": BatchOrder.Side, + "BatchOrder.TimeInForce": BatchOrder.TimeInForce, + "BatchOrder.StpAct": BatchOrder.StpAct, + "BatchOrder.FinishAs": BatchOrder.FinishAs, + "Contract.Type": Contract.Type, + "Contract.MarkType": Contract.MarkType, + "CreateUniLend.Type": CreateUniLend.Type, + "CreateUniLoan.Type": CreateUniLoan.Type, + "CrossMarginLoan.Status": CrossMarginLoan.Status, + "CurrencyPair.TradeStatus": CurrencyPair.TradeStatus, + "DeliveryContract.Cycle": DeliveryContract.Cycle, + "DeliveryContract.Type": DeliveryContract.Type, + "DeliveryContract.MarkType": DeliveryContract.MarkType, + "FuturesAccountBook.Type": FuturesAccountBook.Type, + "FuturesInitialOrder.Tif": FuturesInitialOrder.Tif, + "FuturesOrder.FinishAs": FuturesOrder.FinishAs, + "FuturesOrder.Status": FuturesOrder.Status, + "FuturesOrder.Tif": FuturesOrder.Tif, + "FuturesOrder.AutoSize": FuturesOrder.AutoSize, + "FuturesOrder.StpAct": FuturesOrder.StpAct, + "FuturesPriceTrigger.StrategyType": FuturesPriceTrigger.StrategyType, + "FuturesPriceTrigger.PriceType": FuturesPriceTrigger.PriceType, + "FuturesPriceTrigger.Rule": FuturesPriceTrigger.Rule, + "FuturesPriceTriggeredOrder.Status": FuturesPriceTriggeredOrder.Status, + "FuturesPriceTriggeredOrder.FinishAs": FuturesPriceTriggeredOrder.FinishAs, + "LedgerRecord.Status": LedgerRecord.Status, + "MyFuturesTrade.Role": MyFuturesTrade.Role, + "MyFuturesTradeTimeRange.Role": MyFuturesTradeTimeRange.Role, + "OptionsAccount.MarginMode": OptionsAccount.MarginMode, + "OptionsMyTrade.Role": OptionsMyTrade.Role, + "OptionsOrder.FinishAs": OptionsOrder.FinishAs, + "OptionsOrder.Status": OptionsOrder.Status, + "OptionsOrder.Tif": OptionsOrder.Tif, + "OptionsPositionClose.Side": OptionsPositionClose.Side, + "Order.Status": Order.Status, + "Order.Type": Order.Type, + "Order.Side": Order.Side, + "Order.TimeInForce": Order.TimeInForce, + "Order.StpAct": Order.StpAct, + "Order.FinishAs": Order.FinishAs, + "OrderCancel.Status": OrderCancel.Status, + "OrderCancel.Type": OrderCancel.Type, + "OrderCancel.Side": OrderCancel.Side, + "OrderCancel.TimeInForce": OrderCancel.TimeInForce, + "OrderCancel.StpAct": OrderCancel.StpAct, + "OrderCancel.FinishAs": OrderCancel.FinishAs, + "Position.Mode": Position.Mode, + "PositionClose.Side": PositionClose.Side, + "SpotPricePutOrder.Type": SpotPricePutOrder.Type, + "SpotPricePutOrder.Side": SpotPricePutOrder.Side, + "SpotPricePutOrder.Account": SpotPricePutOrder.Account, + "SpotPricePutOrder.TimeInForce": SpotPricePutOrder.TimeInForce, + "SpotPriceTrigger.Rule": SpotPriceTrigger.Rule, + "Trade.Side": Trade.Side, + "Trade.Role": Trade.Role, + "Transfer.From": Transfer.From, + "Transfer.To": Transfer.To, + "UnifiedLoan.Type": UnifiedLoan.Type, + "WithdrawalRecord.Status": WithdrawalRecord.Status, +} -const typeMap: { [index: string]: any } = { - AccountBalance: AccountBalance, - AccountDetail: AccountDetail, - AccountDetailKey: AccountDetailKey, - AccountRateLimit: AccountRateLimit, - AgencyCommission: AgencyCommission, - AgencyCommissionHistory: AgencyCommissionHistory, - AgencyTransaction: AgencyTransaction, - AgencyTransactionHistory: AgencyTransactionHistory, - AutoRepaySetting: AutoRepaySetting, - BatchAmendItem: BatchAmendItem, - BatchAmendOrderReq: BatchAmendOrderReq, - BatchFuturesOrder: BatchFuturesOrder, - BatchOrder: BatchOrder, - BorrowCurrencyInfo: BorrowCurrencyInfo, - BrokerCommission: BrokerCommission, - BrokerCommission1: BrokerCommission1, - BrokerTransaction: BrokerTransaction, - BrokerTransaction1: BrokerTransaction1, - CancelBatchOrder: CancelBatchOrder, - CancelOrderResult: CancelOrderResult, - CollateralAdjust: CollateralAdjust, - CollateralAdjustRes: CollateralAdjustRes, - CollateralAlign: CollateralAlign, - CollateralCurrency: CollateralCurrency, - CollateralCurrencyInfo: CollateralCurrencyInfo, - CollateralCurrencyRes: CollateralCurrencyRes, - CollateralCurrentRate: CollateralCurrentRate, - CollateralFixRate: CollateralFixRate, - CollateralLoanCurrency: CollateralLoanCurrency, - CollateralLtv: CollateralLtv, - CollateralOrder: CollateralOrder, - CollateralRecord: CollateralRecord, - Contract: Contract, - ContractStat: ContractStat, - ConvertSmallBalance: ConvertSmallBalance, - CountdownCancelAllFuturesTask: CountdownCancelAllFuturesTask, - CountdownCancelAllOptionsTask: CountdownCancelAllOptionsTask, - CountdownCancelAllSpotTask: CountdownCancelAllSpotTask, - CreateCollateralOrder: CreateCollateralOrder, - CreateMultiCollateralOrder: CreateMultiCollateralOrder, - CreateUniLend: CreateUniLend, - CreateUniLoan: CreateUniLoan, - CrossMarginAccount: CrossMarginAccount, - CrossMarginAccountBook: CrossMarginAccountBook, - CrossMarginBalance: CrossMarginBalance, - CrossMarginBalance1: CrossMarginBalance1, - CrossMarginCurrency: CrossMarginCurrency, - CrossMarginLoan: CrossMarginLoan, - CrossMarginRepayRequest: CrossMarginRepayRequest, - CrossMarginRepayment: CrossMarginRepayment, - CrossMarginTransferable: CrossMarginTransferable, - Currency: Currency, - CurrencyChain: CurrencyChain, - CurrencyPair: CurrencyPair, - CurrencyQuota: CurrencyQuota, - DeliveryCandlestick: DeliveryCandlestick, - DeliveryContract: DeliveryContract, - DeliverySettlement: DeliverySettlement, - DepositAddress: DepositAddress, - DualGetOrders: DualGetOrders, - DualGetPlans: DualGetPlans, - Eth2Swap: Eth2Swap, - FlashSwapCurrencyPair: FlashSwapCurrencyPair, - FlashSwapOrder: FlashSwapOrder, - FlashSwapOrderPreview: FlashSwapOrderPreview, - FlashSwapOrderRequest: FlashSwapOrderRequest, - FlashSwapPreviewRequest: FlashSwapPreviewRequest, - FundingAccount: FundingAccount, - FundingRateRecord: FundingRateRecord, - FutureCancelOrderResult: FutureCancelOrderResult, - FuturesAccount: FuturesAccount, - FuturesAccountBook: FuturesAccountBook, - FuturesAccountHistory: FuturesAccountHistory, - FuturesAutoDeleverage: FuturesAutoDeleverage, - FuturesBatchAmendOrderRequest: FuturesBatchAmendOrderRequest, - FuturesCandlestick: FuturesCandlestick, - FuturesFee: FuturesFee, - FuturesIndexConstituents: FuturesIndexConstituents, - FuturesInitialOrder: FuturesInitialOrder, - FuturesLimitRiskTiers: FuturesLimitRiskTiers, - FuturesLiqOrder: FuturesLiqOrder, - FuturesLiquidate: FuturesLiquidate, - FuturesOrder: FuturesOrder, - FuturesOrderAmendment: FuturesOrderAmendment, - FuturesOrderBook: FuturesOrderBook, - FuturesOrderBookItem: FuturesOrderBookItem, - FuturesPremiumIndex: FuturesPremiumIndex, - FuturesPriceTrigger: FuturesPriceTrigger, - FuturesPriceTriggeredOrder: FuturesPriceTriggeredOrder, - FuturesTicker: FuturesTicker, - FuturesTrade: FuturesTrade, - IndexConstituent: IndexConstituent, - InlineObject: InlineObject, - InlineObject1: InlineObject1, - InlineResponse200: InlineResponse200, - InlineResponse2001: InlineResponse2001, - InsuranceRecord: InsuranceRecord, - LedgerRecord: LedgerRecord, - LiquidateOrder: LiquidateOrder, - MarginAccount: MarginAccount, - MarginAccountBook: MarginAccountBook, - MarginAccountCurrency: MarginAccountCurrency, - MarginTiers: MarginTiers, - MarginTransferable: MarginTransferable, - MaxUniBorrowable: MaxUniBorrowable, - MockFuturesOrder: MockFuturesOrder, - MockFuturesPosition: MockFuturesPosition, - MockMarginResult: MockMarginResult, - MockOptionsOrder: MockOptionsOrder, - MockOptionsPosition: MockOptionsPosition, - MockRiskUnit: MockRiskUnit, - MockSpotBalance: MockSpotBalance, - MockSpotOrder: MockSpotOrder, - MultiChainAddressItem: MultiChainAddressItem, - MultiCollateralCurrency: MultiCollateralCurrency, - MultiCollateralItem: MultiCollateralItem, - MultiCollateralOrder: MultiCollateralOrder, - MultiCollateralRecord: MultiCollateralRecord, - MultiCollateralRecordCurrency: MultiCollateralRecordCurrency, - MultiLoanItem: MultiLoanItem, - MultiLoanRepayItem: MultiLoanRepayItem, - MultiRepayRecord: MultiRepayRecord, - MultiRepayResp: MultiRepayResp, - MyFuturesTrade: MyFuturesTrade, - MyFuturesTradeTimeRange: MyFuturesTradeTimeRange, - OpenOrders: OpenOrders, - OptionsAccount: OptionsAccount, - OptionsAccountBook: OptionsAccountBook, - OptionsCandlestick: OptionsCandlestick, - OptionsContract: OptionsContract, - OptionsMMP: OptionsMMP, - OptionsMMPReset: OptionsMMPReset, - OptionsMySettlements: OptionsMySettlements, - OptionsMyTrade: OptionsMyTrade, - OptionsOrder: OptionsOrder, - OptionsPosition: OptionsPosition, - OptionsPositionClose: OptionsPositionClose, - OptionsPositionCloseOrder: OptionsPositionCloseOrder, - OptionsSettlement: OptionsSettlement, - OptionsTicker: OptionsTicker, - OptionsUnderlying: OptionsUnderlying, - OptionsUnderlyingTicker: OptionsUnderlyingTicker, - Order: Order, - OrderBook: OrderBook, - OrderCancel: OrderCancel, - OrderPatch: OrderPatch, - OrderResp: OrderResp, - PartnerCommissionHistory: PartnerCommissionHistory, - PartnerSub: PartnerSub, - PartnerSubList: PartnerSubList, - PartnerTransactionHistory: PartnerTransactionHistory, - PatchUniLend: PatchUniLend, - PlaceDualInvestmentOrder: PlaceDualInvestmentOrder, - Position: Position, - PositionClose: PositionClose, - PositionCloseOrder: PositionCloseOrder, - ProfitLossRange: ProfitLossRange, - RebateUserInfo: RebateUserInfo, - RepayCurrencyRes: RepayCurrencyRes, - RepayLoan: RepayLoan, - RepayMultiLoan: RepayMultiLoan, - RepayRecord: RepayRecord, - RepayRecordCurrency: RepayRecordCurrency, - RepayRecordLeftInterest: RepayRecordLeftInterest, - RepayRecordRepaidCurrency: RepayRecordRepaidCurrency, - RepayRecordTotalInterest: RepayRecordTotalInterest, - RepayResp: RepayResp, - RiskUnits: RiskUnits, - SavedAddress: SavedAddress, - SmallBalance: SmallBalance, - SmallBalanceHistory: SmallBalanceHistory, - SpotAccount: SpotAccount, - SpotAccountBook: SpotAccountBook, - SpotFee: SpotFee, - SpotInsuranceHistory: SpotInsuranceHistory, - SpotPricePutOrder: SpotPricePutOrder, - SpotPriceTrigger: SpotPriceTrigger, - SpotPriceTriggeredOrder: SpotPriceTriggeredOrder, - StpGroup: StpGroup, - StpGroupUser: StpGroupUser, - StructuredBuy: StructuredBuy, - StructuredGetProjectList: StructuredGetProjectList, - StructuredOrderList: StructuredOrderList, - SubAccount: SubAccount, - SubAccountBalance: SubAccountBalance, - SubAccountCrossMarginBalance: SubAccountCrossMarginBalance, - SubAccountFuturesBalance: SubAccountFuturesBalance, - SubAccountKey: SubAccountKey, - SubAccountKeyPerms: SubAccountKeyPerms, - SubAccountMarginBalance: SubAccountMarginBalance, - SubAccountToSubAccount: SubAccountToSubAccount, - SubAccountTransfer: SubAccountTransfer, - SubCrossMarginAccount: SubCrossMarginAccount, - SubUserMode: SubUserMode, - SystemTime: SystemTime, - Ticker: Ticker, - TotalBalance: TotalBalance, - Trade: Trade, - TradeFee: TradeFee, - TransactionID: TransactionID, - Transfer: Transfer, - TriggerOrderResponse: TriggerOrderResponse, - TriggerTime: TriggerTime, - UidPushOrder: UidPushOrder, - UidPushWithdrawal: UidPushWithdrawal, - UidPushWithdrawalResp: UidPushWithdrawalResp, - UniCurrency: UniCurrency, - UniCurrencyInterest: UniCurrencyInterest, - UniCurrencyPair: UniCurrencyPair, - UniInterestMode: UniInterestMode, - UniInterestRecord: UniInterestRecord, - UniLend: UniLend, - UniLendInterest: UniLendInterest, - UniLendRecord: UniLendRecord, - UniLoan: UniLoan, - UniLoanInterestRecord: UniLoanInterestRecord, - UniLoanRecord: UniLoanRecord, - UnifiedAccount: UnifiedAccount, - UnifiedBalance: UnifiedBalance, - UnifiedBorrowable: UnifiedBorrowable, - UnifiedDiscount: UnifiedDiscount, - UnifiedDiscountTiers: UnifiedDiscountTiers, - UnifiedHistoryLoanRate: UnifiedHistoryLoanRate, - UnifiedHistoryLoanRateRates: UnifiedHistoryLoanRateRates, - UnifiedLeverageConfig: UnifiedLeverageConfig, - UnifiedLeverageSetting: UnifiedLeverageSetting, - UnifiedLoan: UnifiedLoan, - UnifiedLoanRecord: UnifiedLoanRecord, - UnifiedMarginTiers: UnifiedMarginTiers, - UnifiedModeSet: UnifiedModeSet, - UnifiedPortfolioInput: UnifiedPortfolioInput, - UnifiedPortfolioOutput: UnifiedPortfolioOutput, - UnifiedRiskUnits: UnifiedRiskUnits, - UnifiedSettings: UnifiedSettings, - UnifiedTransferable: UnifiedTransferable, - UserLtvInfo: UserLtvInfo, - UserSub: UserSub, - UserSubRelation: UserSubRelation, - UserTotalAmount: UserTotalAmount, - WithdrawStatus: WithdrawStatus, - WithdrawalRecord: WithdrawalRecord, -}; +let typeMap: {[index: string]: any} = { + "AccountBalance": AccountBalance, + "AccountDetail": AccountDetail, + "AccountDetailKey": AccountDetailKey, + "AccountRateLimit": AccountRateLimit, + "AgencyCommission": AgencyCommission, + "AgencyCommissionHistory": AgencyCommissionHistory, + "AgencyTransaction": AgencyTransaction, + "AgencyTransactionHistory": AgencyTransactionHistory, + "AutoRepaySetting": AutoRepaySetting, + "BatchAmendItem": BatchAmendItem, + "BatchAmendOrderReq": BatchAmendOrderReq, + "BatchFuturesOrder": BatchFuturesOrder, + "BatchOrder": BatchOrder, + "BorrowCurrencyInfo": BorrowCurrencyInfo, + "BrokerCommission": BrokerCommission, + "BrokerCommission1": BrokerCommission1, + "BrokerTransaction": BrokerTransaction, + "BrokerTransaction1": BrokerTransaction1, + "CancelBatchOrder": CancelBatchOrder, + "CancelOrderResult": CancelOrderResult, + "CollateralAdjust": CollateralAdjust, + "CollateralAdjustRes": CollateralAdjustRes, + "CollateralAlign": CollateralAlign, + "CollateralCurrency": CollateralCurrency, + "CollateralCurrencyInfo": CollateralCurrencyInfo, + "CollateralCurrencyRes": CollateralCurrencyRes, + "CollateralCurrentRate": CollateralCurrentRate, + "CollateralFixRate": CollateralFixRate, + "CollateralLoanCurrency": CollateralLoanCurrency, + "CollateralLtv": CollateralLtv, + "CollateralOrder": CollateralOrder, + "CollateralRecord": CollateralRecord, + "Contract": Contract, + "ContractStat": ContractStat, + "ConvertSmallBalance": ConvertSmallBalance, + "CountdownCancelAllFuturesTask": CountdownCancelAllFuturesTask, + "CountdownCancelAllOptionsTask": CountdownCancelAllOptionsTask, + "CountdownCancelAllSpotTask": CountdownCancelAllSpotTask, + "CreateCollateralOrder": CreateCollateralOrder, + "CreateMultiCollateralOrder": CreateMultiCollateralOrder, + "CreateUniLend": CreateUniLend, + "CreateUniLoan": CreateUniLoan, + "CrossMarginAccount": CrossMarginAccount, + "CrossMarginAccountBook": CrossMarginAccountBook, + "CrossMarginBalance": CrossMarginBalance, + "CrossMarginBalance1": CrossMarginBalance1, + "CrossMarginCurrency": CrossMarginCurrency, + "CrossMarginLoan": CrossMarginLoan, + "CrossMarginRepayRequest": CrossMarginRepayRequest, + "CrossMarginRepayment": CrossMarginRepayment, + "CrossMarginTransferable": CrossMarginTransferable, + "Currency": Currency, + "CurrencyChain": CurrencyChain, + "CurrencyPair": CurrencyPair, + "CurrencyQuota": CurrencyQuota, + "DebitFee": DebitFee, + "DeliveryCandlestick": DeliveryCandlestick, + "DeliveryContract": DeliveryContract, + "DeliverySettlement": DeliverySettlement, + "DepositAddress": DepositAddress, + "DualGetOrders": DualGetOrders, + "DualGetPlans": DualGetPlans, + "Eth2Swap": Eth2Swap, + "FlashSwapCurrencyPair": FlashSwapCurrencyPair, + "FlashSwapOrder": FlashSwapOrder, + "FlashSwapOrderPreview": FlashSwapOrderPreview, + "FlashSwapOrderRequest": FlashSwapOrderRequest, + "FlashSwapPreviewRequest": FlashSwapPreviewRequest, + "FundingAccount": FundingAccount, + "FundingRateRecord": FundingRateRecord, + "FutureCancelOrderResult": FutureCancelOrderResult, + "FuturesAccount": FuturesAccount, + "FuturesAccountBook": FuturesAccountBook, + "FuturesAccountHistory": FuturesAccountHistory, + "FuturesAutoDeleverage": FuturesAutoDeleverage, + "FuturesBatchAmendOrderRequest": FuturesBatchAmendOrderRequest, + "FuturesCandlestick": FuturesCandlestick, + "FuturesFee": FuturesFee, + "FuturesIndexConstituents": FuturesIndexConstituents, + "FuturesInitialOrder": FuturesInitialOrder, + "FuturesLimitRiskTiers": FuturesLimitRiskTiers, + "FuturesLiqOrder": FuturesLiqOrder, + "FuturesLiquidate": FuturesLiquidate, + "FuturesOrder": FuturesOrder, + "FuturesOrderAmendment": FuturesOrderAmendment, + "FuturesOrderBook": FuturesOrderBook, + "FuturesOrderBookItem": FuturesOrderBookItem, + "FuturesPremiumIndex": FuturesPremiumIndex, + "FuturesPriceTrigger": FuturesPriceTrigger, + "FuturesPriceTriggeredOrder": FuturesPriceTriggeredOrder, + "FuturesTicker": FuturesTicker, + "FuturesTrade": FuturesTrade, + "IndexConstituent": IndexConstituent, + "InsuranceRecord": InsuranceRecord, + "LedgerRecord": LedgerRecord, + "LiquidateOrder": LiquidateOrder, + "MarginAccount": MarginAccount, + "MarginAccountBook": MarginAccountBook, + "MarginAccountCurrency": MarginAccountCurrency, + "MarginTiers": MarginTiers, + "MarginTransferable": MarginTransferable, + "MaxUniBorrowable": MaxUniBorrowable, + "MockFuturesOrder": MockFuturesOrder, + "MockFuturesPosition": MockFuturesPosition, + "MockMarginResult": MockMarginResult, + "MockOptionsOrder": MockOptionsOrder, + "MockOptionsPosition": MockOptionsPosition, + "MockRiskUnit": MockRiskUnit, + "MockSpotBalance": MockSpotBalance, + "MockSpotOrder": MockSpotOrder, + "MultiChainAddressItem": MultiChainAddressItem, + "MultiCollateralCurrency": MultiCollateralCurrency, + "MultiCollateralItem": MultiCollateralItem, + "MultiCollateralOrder": MultiCollateralOrder, + "MultiCollateralRecord": MultiCollateralRecord, + "MultiCollateralRecordCurrency": MultiCollateralRecordCurrency, + "MultiLoanItem": MultiLoanItem, + "MultiLoanRepayItem": MultiLoanRepayItem, + "MultiRepayRecord": MultiRepayRecord, + "MultiRepayResp": MultiRepayResp, + "MyFuturesTrade": MyFuturesTrade, + "MyFuturesTradeTimeRange": MyFuturesTradeTimeRange, + "OpenOrders": OpenOrders, + "OptionsAccount": OptionsAccount, + "OptionsAccountBook": OptionsAccountBook, + "OptionsCandlestick": OptionsCandlestick, + "OptionsContract": OptionsContract, + "OptionsMMP": OptionsMMP, + "OptionsMMPReset": OptionsMMPReset, + "OptionsMySettlements": OptionsMySettlements, + "OptionsMyTrade": OptionsMyTrade, + "OptionsOrder": OptionsOrder, + "OptionsPosition": OptionsPosition, + "OptionsPositionClose": OptionsPositionClose, + "OptionsPositionCloseOrder": OptionsPositionCloseOrder, + "OptionsSettlement": OptionsSettlement, + "OptionsTicker": OptionsTicker, + "OptionsUnderlying": OptionsUnderlying, + "OptionsUnderlyingTicker": OptionsUnderlyingTicker, + "Order": Order, + "OrderBook": OrderBook, + "OrderCancel": OrderCancel, + "OrderPatch": OrderPatch, + "OrderResp": OrderResp, + "PartnerCommissionHistory": PartnerCommissionHistory, + "PartnerSub": PartnerSub, + "PartnerSubList": PartnerSubList, + "PartnerTransactionHistory": PartnerTransactionHistory, + "PatchUniLend": PatchUniLend, + "PlaceDualInvestmentOrder": PlaceDualInvestmentOrder, + "Position": Position, + "PositionClose": PositionClose, + "PositionCloseOrder": PositionCloseOrder, + "ProfitLossRange": ProfitLossRange, + "RebateUserInfo": RebateUserInfo, + "RepayCurrencyRes": RepayCurrencyRes, + "RepayLoan": RepayLoan, + "RepayMultiLoan": RepayMultiLoan, + "RepayRecord": RepayRecord, + "RepayRecordCurrency": RepayRecordCurrency, + "RepayRecordLeftInterest": RepayRecordLeftInterest, + "RepayRecordRepaidCurrency": RepayRecordRepaidCurrency, + "RepayRecordTotalInterest": RepayRecordTotalInterest, + "RepayResp": RepayResp, + "RiskUnits": RiskUnits, + "SavedAddress": SavedAddress, + "SmallBalance": SmallBalance, + "SmallBalanceHistory": SmallBalanceHistory, + "SpotAccount": SpotAccount, + "SpotAccountBook": SpotAccountBook, + "SpotFee": SpotFee, + "SpotInsuranceHistory": SpotInsuranceHistory, + "SpotPricePutOrder": SpotPricePutOrder, + "SpotPriceTrigger": SpotPriceTrigger, + "SpotPriceTriggeredOrder": SpotPriceTriggeredOrder, + "StpGroup": StpGroup, + "StpGroupUser": StpGroupUser, + "StructuredBuy": StructuredBuy, + "StructuredGetProjectList": StructuredGetProjectList, + "StructuredOrderList": StructuredOrderList, + "SubAccount": SubAccount, + "SubAccountBalance": SubAccountBalance, + "SubAccountCrossMarginBalance": SubAccountCrossMarginBalance, + "SubAccountFuturesBalance": SubAccountFuturesBalance, + "SubAccountKey": SubAccountKey, + "SubAccountKeyPerms": SubAccountKeyPerms, + "SubAccountMarginBalance": SubAccountMarginBalance, + "SubAccountToSubAccount": SubAccountToSubAccount, + "SubAccountTransfer": SubAccountTransfer, + "SubCrossMarginAccount": SubCrossMarginAccount, + "SubUserMode": SubUserMode, + "SystemTime": SystemTime, + "Ticker": Ticker, + "TotalBalance": TotalBalance, + "Trade": Trade, + "TradeFee": TradeFee, + "TransactionID": TransactionID, + "Transfer": Transfer, + "TransferOrderStatus": TransferOrderStatus, + "TriggerOrderResponse": TriggerOrderResponse, + "TriggerTime": TriggerTime, + "UidPushOrder": UidPushOrder, + "UidPushWithdrawal": UidPushWithdrawal, + "UidPushWithdrawalResp": UidPushWithdrawalResp, + "UniCurrency": UniCurrency, + "UniCurrencyInterest": UniCurrencyInterest, + "UniCurrencyPair": UniCurrencyPair, + "UniInterestMode": UniInterestMode, + "UniInterestRecord": UniInterestRecord, + "UniLend": UniLend, + "UniLendInterest": UniLendInterest, + "UniLendRecord": UniLendRecord, + "UniLoan": UniLoan, + "UniLoanInterestRecord": UniLoanInterestRecord, + "UniLoanRecord": UniLoanRecord, + "UnifiedAccount": UnifiedAccount, + "UnifiedBalance": UnifiedBalance, + "UnifiedBorrowable": UnifiedBorrowable, + "UnifiedDiscount": UnifiedDiscount, + "UnifiedDiscountTiers": UnifiedDiscountTiers, + "UnifiedHistoryLoanRate": UnifiedHistoryLoanRate, + "UnifiedHistoryLoanRateRates": UnifiedHistoryLoanRateRates, + "UnifiedLeverageConfig": UnifiedLeverageConfig, + "UnifiedLeverageSetting": UnifiedLeverageSetting, + "UnifiedLoan": UnifiedLoan, + "UnifiedLoanRecord": UnifiedLoanRecord, + "UnifiedMarginTiers": UnifiedMarginTiers, + "UnifiedModeSet": UnifiedModeSet, + "UnifiedPortfolioInput": UnifiedPortfolioInput, + "UnifiedPortfolioOutput": UnifiedPortfolioOutput, + "UnifiedRiskUnits": UnifiedRiskUnits, + "UnifiedSettings": UnifiedSettings, + "UnifiedTransferable": UnifiedTransferable, + "UserLtvInfo": UserLtvInfo, + "UserSub": UserSub, + "UserSubRelation": UserSubRelation, + "UserTotalAmount": UserTotalAmount, + "WithdrawStatus": WithdrawStatus, + "WithdrawalRecord": WithdrawalRecord, +} export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { @@ -812,7 +816,7 @@ export class ObjectSerializer { return expectedType; } else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) { return expectedType; - } else if (expectedType === 'Date') { + } else if (expectedType === "Date") { return expectedType; } else { if (enumsMap[expectedType]) { @@ -824,13 +828,13 @@ export class ObjectSerializer { } // Check the discriminator - const discriminatorProperty = typeMap[expectedType].discriminator; + let discriminatorProperty = typeMap[expectedType].discriminator; if (discriminatorProperty == null) { return expectedType; // the type does not have a discriminator. use it. } else { if (data[discriminatorProperty]) { - const discriminatorType = data[discriminatorProperty]; - if (typeMap[discriminatorType]) { + var discriminatorType = data[discriminatorProperty]; + if(typeMap[discriminatorType]){ return discriminatorType; // use the type given in the discriminator } else { return expectedType; // discriminator did not map to a type @@ -847,27 +851,25 @@ export class ObjectSerializer { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { if (type.toLowerCase() === 'bigint') { - return data.toString(); + return data.toString(); } return data; - } else if (type.lastIndexOf('Array<', 0) === 0) { - // string.startsWith pre es6 - let subType: string = type.replace('Array<', ''); // Array => Type> + } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 + let subType: string = type.replace("Array<", ""); // Array => Type> subType = subType.substring(0, subType.length - 1); // Type> => Type - const transformedData: any[] = []; - for (const index in data) { - const date = data[index]; + let transformedData: any[] = []; + for (let index in data) { + let date = data[index]; transformedData.push(ObjectSerializer.serialize(date, subType)); } return transformedData; - } else if (type === 'Date') { + } else if (type === "Date") { return data.toISOString(); } else { if (enumsMap[type]) { return data; } - if (!typeMap[type]) { - // in case we dont know the type + if (!typeMap[type]) { // in case we dont know the type return data; } @@ -875,14 +877,11 @@ export class ObjectSerializer { type = this.findCorrectType(data, type); // get the map for the correct type. - const attributeTypes = typeMap[type].getAttributeTypeMap(); - const instance: { [index: string]: any } = {}; - for (const index in attributeTypes) { - const attributeType = attributeTypes[index]; - instance[attributeType.baseName] = ObjectSerializer.serialize( - data[attributeType.name], - attributeType.type, - ); + let attributeTypes = typeMap[type].getAttributeTypeMap(); + let instance: {[index: string]: any} = {}; + for (let index in attributeTypes) { + let attributeType = attributeTypes[index]; + instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type); } return instance; } @@ -895,39 +894,33 @@ export class ObjectSerializer { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { if (type.toLowerCase() === 'bigint') { - return BigInt(data); + return BigInt(data); } return data; - } else if (type.lastIndexOf('Array<', 0) === 0) { - // string.startsWith pre es6 - let subType: string = type.replace('Array<', ''); // Array => Type> + } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 + let subType: string = type.replace("Array<", ""); // Array => Type> subType = subType.substring(0, subType.length - 1); // Type> => Type - const transformedData: any[] = []; - for (const index in data) { - const date = data[index]; + let transformedData: any[] = []; + for (let index in data) { + let date = data[index]; transformedData.push(ObjectSerializer.deserialize(date, subType)); } return transformedData; - } else if (type === 'Date') { + } else if (type === "Date") { return new Date(data); } else { - if (enumsMap[type]) { - // is Enum + if (enumsMap[type]) {// is Enum return data; } - if (!typeMap[type]) { - // dont know the type + if (!typeMap[type]) { // dont know the type return data; } - const instance = new typeMap[type](); - const attributeTypes = typeMap[type].getAttributeTypeMap(); - for (const index in attributeTypes) { - const attributeType = attributeTypes[index]; - instance[attributeType.name] = ObjectSerializer.deserialize( - data[attributeType.baseName], - attributeType.type, - ); + let instance = new typeMap[type](); + let attributeTypes = typeMap[type].getAttributeTypeMap(); + for (let index in attributeTypes) { + let attributeType = attributeTypes[index]; + instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type); } return instance; } @@ -936,14 +929,14 @@ export class ObjectSerializer { export interface Authentication { /** - * Apply authentication settings to header and query params. - */ + * Apply authentication settings to header and query params. + */ applyToRequest(config: AxiosRequestConfig): AxiosRequestConfig; } export class HttpBasicAuth implements Authentication { - public username = ''; - public password = ''; + public username: string = ''; + public password: string = ''; applyToRequest(config: AxiosRequestConfig): AxiosRequestConfig { config.auth = { @@ -967,9 +960,10 @@ export class HttpBearerAuth implements Authentication { } export class ApiKeyAuth implements Authentication { - public apiKey = ''; + public apiKey: string = ''; - constructor(private location: string, private paramName: string) {} + constructor(private location: string, private paramName: string) { + } applyToRequest(config: AxiosRequestConfig): AxiosRequestConfig { if (this.location == 'query') { @@ -988,7 +982,7 @@ export class ApiKeyAuth implements Authentication { } export class OAuth implements Authentication { - public accessToken = ''; + public accessToken: string = ''; applyToRequest(config: AxiosRequestConfig): AxiosRequestConfig { if (config && config.headers) { @@ -999,13 +993,13 @@ export class OAuth implements Authentication { } export class GateApiV4Auth implements Authentication { - public key = ''; - public secret = ''; + public key: string = ""; + public secret: string = ""; applyToRequest(config: AxiosRequestConfig): AxiosRequestConfig { - config.paramsSerializer = function (params) { + config.paramsSerializer = function(params) { return querystring.stringify(params); - }; + } const timestamp: string = (new Date().getTime() / 1000).toString(); const resourcePath: string = new URL(config.url as string).pathname; const queryString: string = unescape(querystring.stringify(config.params)); diff --git a/model/multiChainAddressItem.ts b/model/multiChainAddressItem.ts index 3cfb430..debde97 100644 --- a/model/multiChainAddressItem.ts +++ b/model/multiChainAddressItem.ts @@ -9,59 +9,60 @@ * Do not edit the class manually. */ + export class MultiChainAddressItem { /** - * Name of the chain - */ + * Name of the chain + */ 'chain'?: string; /** - * Deposit address - */ + * Deposit address + */ 'address'?: string; /** - * Notes that some currencies required(e.g., Tag, Memo) when depositing - */ + * Notes that some currencies required(e.g., Tag, Memo) when depositing + */ 'paymentId'?: string; /** - * Note type, `Tag` or `Memo` - */ + * Note type, `Tag` or `Memo` + */ 'paymentName'?: string; /** - * The obtain failed status- 0: address successfully obtained- 1: failed to obtain address - */ + * The obtain failed status- 0: address successfully obtained- 1: failed to obtain address + */ 'obtainFailed'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'chain', - baseName: 'chain', - type: 'string', + "name": "chain", + "baseName": "chain", + "type": "string" }, { - name: 'address', - baseName: 'address', - type: 'string', + "name": "address", + "baseName": "address", + "type": "string" }, { - name: 'paymentId', - baseName: 'payment_id', - type: 'string', + "name": "paymentId", + "baseName": "payment_id", + "type": "string" }, { - name: 'paymentName', - baseName: 'payment_name', - type: 'string', + "name": "paymentName", + "baseName": "payment_name", + "type": "string" }, { - name: 'obtainFailed', - baseName: 'obtain_failed', - type: 'number', - }, - ]; + "name": "obtainFailed", + "baseName": "obtain_failed", + "type": "number" + } ]; static getAttributeTypeMap() { return MultiChainAddressItem.attributeTypeMap; } } + diff --git a/model/multiCollateralCurrency.ts b/model/multiCollateralCurrency.ts index df5ccd9..1c89012 100644 --- a/model/multiCollateralCurrency.ts +++ b/model/multiCollateralCurrency.ts @@ -13,34 +13,34 @@ import { MultiCollateralItem } from './multiCollateralItem'; import { MultiLoanItem } from './multiLoanItem'; /** - * Borrowing and collateral currencies supported for Multi-Collateral. - */ +* Borrowing and collateral currencies supported for Multi-Collateral. +*/ export class MultiCollateralCurrency { /** - * List of supported borrowing currencies - */ + * List of supported borrowing currencies + */ 'loanCurrencies'?: Array; /** - * List of supported collateral currencies - */ + * List of supported collateral currencies + */ 'collateralCurrencies'?: Array; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'loanCurrencies', - baseName: 'loan_currencies', - type: 'Array', + "name": "loanCurrencies", + "baseName": "loan_currencies", + "type": "Array" }, { - name: 'collateralCurrencies', - baseName: 'collateral_currencies', - type: 'Array', - }, - ]; + "name": "collateralCurrencies", + "baseName": "collateral_currencies", + "type": "Array" + } ]; static getAttributeTypeMap() { return MultiCollateralCurrency.attributeTypeMap; } } + diff --git a/model/multiCollateralItem.ts b/model/multiCollateralItem.ts index 1953afc..69181f1 100644 --- a/model/multiCollateralItem.ts +++ b/model/multiCollateralItem.ts @@ -9,41 +9,42 @@ * Do not edit the class manually. */ + export class MultiCollateralItem { /** - * Currency - */ + * Currency + */ 'currency'?: string; /** - * Currency Index Price - */ + * Currency Index Price + */ 'indexPrice'?: string; /** - * Discount - */ + * Discount + */ 'discount'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'indexPrice', - baseName: 'index_price', - type: 'string', + "name": "indexPrice", + "baseName": "index_price", + "type": "string" }, { - name: 'discount', - baseName: 'discount', - type: 'string', - }, - ]; + "name": "discount", + "baseName": "discount", + "type": "string" + } ]; static getAttributeTypeMap() { return MultiCollateralItem.attributeTypeMap; } } + diff --git a/model/multiCollateralOrder.ts b/model/multiCollateralOrder.ts index 91a873e..4bf1598 100644 --- a/model/multiCollateralOrder.ts +++ b/model/multiCollateralOrder.ts @@ -13,142 +13,142 @@ import { BorrowCurrencyInfo } from './borrowCurrencyInfo'; import { CollateralCurrencyInfo } from './collateralCurrencyInfo'; /** - * Multi-Collateral Order - */ +* Multi-Collateral Order +*/ export class MultiCollateralOrder { /** - * Order ID - */ + * Order ID + */ 'orderId'?: string; /** - * current - current, fixed - fixed - */ + * current - current, fixed - fixed + */ 'orderType'?: string; /** - * Fixed interest rate loan periods: 7d - 7 days, 30d - 30 days. - */ + * Fixed interest rate loan periods: 7d - 7 days, 30d - 30 days. + */ 'fixedType'?: string; /** - * Fixed interest rate - */ + * Fixed interest rate + */ 'fixedRate'?: string; /** - * Expiration time, timestamp, unit in seconds. - */ + * Expiration time, timestamp, unit in seconds. + */ 'expireTime'?: number; /** - * Fixed interest rate, automatic renewal - */ + * Fixed interest rate, automatic renewal + */ 'autoRenew'?: boolean; /** - * Fixed interest rate, automatic repayment - */ + * Fixed interest rate, automatic repayment + */ 'autoRepay'?: boolean; /** - * The current collateralization rate - */ + * The current collateralization rate + */ 'currentLtv'?: string; /** - * 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 - */ + * 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 + */ 'status'?: string; /** - * Borrowing time, timestamp in seconds - */ + * Borrowing time, timestamp in seconds + */ 'borrowTime'?: number; /** - * Value of Left repay amount converted in USDT - */ + * Value of Left repay amount converted in USDT + */ 'totalLeftRepayUsdt'?: string; /** - * Value of Collateral amount in USDT - */ + * Value of Collateral amount in USDT + */ 'totalLeftCollateralUsdt'?: string; /** - * Borrowing Currency List - */ + * Borrowing Currency List + */ 'borrowCurrencies'?: Array; /** - * Collateral Currency List - */ + * Collateral Currency List + */ 'collateralCurrencies'?: Array; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'orderId', - baseName: 'order_id', - type: 'string', + "name": "orderId", + "baseName": "order_id", + "type": "string" }, { - name: 'orderType', - baseName: 'order_type', - type: 'string', + "name": "orderType", + "baseName": "order_type", + "type": "string" }, { - name: 'fixedType', - baseName: 'fixed_type', - type: 'string', + "name": "fixedType", + "baseName": "fixed_type", + "type": "string" }, { - name: 'fixedRate', - baseName: 'fixed_rate', - type: 'string', + "name": "fixedRate", + "baseName": "fixed_rate", + "type": "string" }, { - name: 'expireTime', - baseName: 'expire_time', - type: 'number', + "name": "expireTime", + "baseName": "expire_time", + "type": "number" }, { - name: 'autoRenew', - baseName: 'auto_renew', - type: 'boolean', + "name": "autoRenew", + "baseName": "auto_renew", + "type": "boolean" }, { - name: 'autoRepay', - baseName: 'auto_repay', - type: 'boolean', + "name": "autoRepay", + "baseName": "auto_repay", + "type": "boolean" }, { - name: 'currentLtv', - baseName: 'current_ltv', - type: 'string', + "name": "currentLtv", + "baseName": "current_ltv", + "type": "string" }, { - name: 'status', - baseName: 'status', - type: 'string', + "name": "status", + "baseName": "status", + "type": "string" }, { - name: 'borrowTime', - baseName: 'borrow_time', - type: 'number', + "name": "borrowTime", + "baseName": "borrow_time", + "type": "number" }, { - name: 'totalLeftRepayUsdt', - baseName: 'total_left_repay_usdt', - type: 'string', + "name": "totalLeftRepayUsdt", + "baseName": "total_left_repay_usdt", + "type": "string" }, { - name: 'totalLeftCollateralUsdt', - baseName: 'total_left_collateral_usdt', - type: 'string', + "name": "totalLeftCollateralUsdt", + "baseName": "total_left_collateral_usdt", + "type": "string" }, { - name: 'borrowCurrencies', - baseName: 'borrow_currencies', - type: 'Array', + "name": "borrowCurrencies", + "baseName": "borrow_currencies", + "type": "Array" }, { - name: 'collateralCurrencies', - baseName: 'collateral_currencies', - type: 'Array', - }, - ]; + "name": "collateralCurrencies", + "baseName": "collateral_currencies", + "type": "Array" + } ]; static getAttributeTypeMap() { return MultiCollateralOrder.attributeTypeMap; } } + diff --git a/model/multiCollateralRecord.ts b/model/multiCollateralRecord.ts index 5b327b5..b373eb2 100644 --- a/model/multiCollateralRecord.ts +++ b/model/multiCollateralRecord.ts @@ -12,79 +12,79 @@ import { MultiCollateralRecordCurrency } from './multiCollateralRecordCurrency'; /** - * Multi-Collateral adjustment record. - */ +* Multi-Collateral adjustment record. +*/ export class MultiCollateralRecord { /** - * Order ID - */ + * Order ID + */ 'orderId'?: number; /** - * Collateral record ID - */ + * Collateral record ID + */ 'recordId'?: number; /** - * The collateral ratio before adjustment - */ + * The collateral ratio before adjustment + */ 'beforeLtv'?: string; /** - * The collateral ratio before adjustment - */ + * The collateral ratio before adjustment + */ 'afterLtv'?: string; /** - * Operation time, timestamp in seconds. - */ + * Operation time, timestamp in seconds. + */ 'operateTime'?: number; /** - * Borrowing Currency List - */ + * Borrowing Currency List + */ 'borrowCurrencies'?: Array; /** - * Collateral Currency List - */ + * Collateral Currency List + */ 'collateralCurrencies'?: Array; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'orderId', - baseName: 'order_id', - type: 'number', + "name": "orderId", + "baseName": "order_id", + "type": "number" }, { - name: 'recordId', - baseName: 'record_id', - type: 'number', + "name": "recordId", + "baseName": "record_id", + "type": "number" }, { - name: 'beforeLtv', - baseName: 'before_ltv', - type: 'string', + "name": "beforeLtv", + "baseName": "before_ltv", + "type": "string" }, { - name: 'afterLtv', - baseName: 'after_ltv', - type: 'string', + "name": "afterLtv", + "baseName": "after_ltv", + "type": "string" }, { - name: 'operateTime', - baseName: 'operate_time', - type: 'number', + "name": "operateTime", + "baseName": "operate_time", + "type": "number" }, { - name: 'borrowCurrencies', - baseName: 'borrow_currencies', - type: 'Array', + "name": "borrowCurrencies", + "baseName": "borrow_currencies", + "type": "Array" }, { - name: 'collateralCurrencies', - baseName: 'collateral_currencies', - type: 'Array', - }, - ]; + "name": "collateralCurrencies", + "baseName": "collateral_currencies", + "type": "Array" + } ]; static getAttributeTypeMap() { return MultiCollateralRecord.attributeTypeMap; } } + diff --git a/model/multiCollateralRecordCurrency.ts b/model/multiCollateralRecordCurrency.ts index 609940d..faa4ed6 100644 --- a/model/multiCollateralRecordCurrency.ts +++ b/model/multiCollateralRecordCurrency.ts @@ -9,68 +9,69 @@ * Do not edit the class manually. */ + export class MultiCollateralRecordCurrency { /** - * Currency - */ + * Currency + */ 'currency'?: string; /** - * Currency Index Price - */ + * Currency Index Price + */ 'indexPrice'?: string; /** - * Amount before the operation - */ + * Amount before the operation + */ 'beforeAmount'?: string; /** - * USDT Amount before the operation. - */ + * USDT Amount before the operation. + */ 'beforeAmountUsdt'?: string; /** - * Amount after the operation. - */ + * Amount after the operation. + */ 'afterAmount'?: string; /** - * USDT Amount after the operation. - */ + * USDT Amount after the operation. + */ 'afterAmountUsdt'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'indexPrice', - baseName: 'index_price', - type: 'string', + "name": "indexPrice", + "baseName": "index_price", + "type": "string" }, { - name: 'beforeAmount', - baseName: 'before_amount', - type: 'string', + "name": "beforeAmount", + "baseName": "before_amount", + "type": "string" }, { - name: 'beforeAmountUsdt', - baseName: 'before_amount_usdt', - type: 'string', + "name": "beforeAmountUsdt", + "baseName": "before_amount_usdt", + "type": "string" }, { - name: 'afterAmount', - baseName: 'after_amount', - type: 'string', + "name": "afterAmount", + "baseName": "after_amount", + "type": "string" }, { - name: 'afterAmountUsdt', - baseName: 'after_amount_usdt', - type: 'string', - }, - ]; + "name": "afterAmountUsdt", + "baseName": "after_amount_usdt", + "type": "string" + } ]; static getAttributeTypeMap() { return MultiCollateralRecordCurrency.attributeTypeMap; } } + diff --git a/model/multiLoanItem.ts b/model/multiLoanItem.ts index 79cfe29..0f8d1ac 100644 --- a/model/multiLoanItem.ts +++ b/model/multiLoanItem.ts @@ -9,32 +9,33 @@ * Do not edit the class manually. */ + export class MultiLoanItem { /** - * Currency - */ + * Currency + */ 'currency'?: string; /** - * Latest price of the currency - */ + * Latest price of the currency + */ 'price'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'price', - baseName: 'price', - type: 'string', - }, - ]; + "name": "price", + "baseName": "price", + "type": "string" + } ]; static getAttributeTypeMap() { return MultiLoanItem.attributeTypeMap; } } + diff --git a/model/multiLoanRepayItem.ts b/model/multiLoanRepayItem.ts index b9d27fb..e4e61e8 100644 --- a/model/multiLoanRepayItem.ts +++ b/model/multiLoanRepayItem.ts @@ -9,41 +9,42 @@ * Do not edit the class manually. */ + export class MultiLoanRepayItem { /** - * Repayment currency - */ + * Repayment currency + */ 'currency'?: string; /** - * Size - */ + * Size + */ 'amount'?: string; /** - * Repayment method, set to true for full repayment, false for partial repayment. - */ + * Repayment method, set to true for full repayment, false for partial repayment. + */ 'repaidAll'?: boolean; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'repaidAll', - baseName: 'repaid_all', - type: 'boolean', - }, - ]; + "name": "repaidAll", + "baseName": "repaid_all", + "type": "boolean" + } ]; static getAttributeTypeMap() { return MultiLoanRepayItem.attributeTypeMap; } } + diff --git a/model/multiRepayRecord.ts b/model/multiRepayRecord.ts index 4306b21..9667e09 100644 --- a/model/multiRepayRecord.ts +++ b/model/multiRepayRecord.ts @@ -15,124 +15,124 @@ import { RepayRecordRepaidCurrency } from './repayRecordRepaidCurrency'; import { RepayRecordTotalInterest } from './repayRecordTotalInterest'; /** - * Mult Repay Record - */ +* Mult Repay Record +*/ export class MultiRepayRecord { /** - * Order ID - */ + * Order ID + */ 'orderId'?: number; /** - * Repayment record ID - */ + * Repayment record ID + */ 'recordId'?: number; /** - * The initial collateralization rate - */ + * The initial collateralization rate + */ 'initLtv'?: string; /** - * Ltv before the operation - */ + * Ltv before the operation + */ 'beforeLtv'?: string; /** - * Ltv after the operation - */ + * Ltv after the operation + */ 'afterLtv'?: string; /** - * Borrowing time, timestamp in seconds. - */ + * Borrowing time, timestamp in seconds. + */ 'borrowTime'?: number; /** - * Repayment time, timestamp in seconds. - */ + * Repayment time, timestamp in seconds. + */ 'repayTime'?: number; /** - * List of borrowing information - */ + * List of borrowing information + */ 'borrowCurrencies'?: Array; /** - * List of collateral information - */ + * List of collateral information + */ 'collateralCurrencies'?: Array; /** - * Repay Currency List - */ + * Repay Currency List + */ 'repaidCurrencies'?: Array; /** - * Total Interest List - */ + * Total Interest List + */ 'totalInterestList'?: Array; /** - * List of left repay interest - */ + * List of left repay interest + */ 'leftRepayInterestList'?: Array; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'orderId', - baseName: 'order_id', - type: 'number', + "name": "orderId", + "baseName": "order_id", + "type": "number" }, { - name: 'recordId', - baseName: 'record_id', - type: 'number', + "name": "recordId", + "baseName": "record_id", + "type": "number" }, { - name: 'initLtv', - baseName: 'init_ltv', - type: 'string', + "name": "initLtv", + "baseName": "init_ltv", + "type": "string" }, { - name: 'beforeLtv', - baseName: 'before_ltv', - type: 'string', + "name": "beforeLtv", + "baseName": "before_ltv", + "type": "string" }, { - name: 'afterLtv', - baseName: 'after_ltv', - type: 'string', + "name": "afterLtv", + "baseName": "after_ltv", + "type": "string" }, { - name: 'borrowTime', - baseName: 'borrow_time', - type: 'number', + "name": "borrowTime", + "baseName": "borrow_time", + "type": "number" }, { - name: 'repayTime', - baseName: 'repay_time', - type: 'number', + "name": "repayTime", + "baseName": "repay_time", + "type": "number" }, { - name: 'borrowCurrencies', - baseName: 'borrow_currencies', - type: 'Array', + "name": "borrowCurrencies", + "baseName": "borrow_currencies", + "type": "Array" }, { - name: 'collateralCurrencies', - baseName: 'collateral_currencies', - type: 'Array', + "name": "collateralCurrencies", + "baseName": "collateral_currencies", + "type": "Array" }, { - name: 'repaidCurrencies', - baseName: 'repaid_currencies', - type: 'Array', + "name": "repaidCurrencies", + "baseName": "repaid_currencies", + "type": "Array" }, { - name: 'totalInterestList', - baseName: 'total_interest_list', - type: 'Array', + "name": "totalInterestList", + "baseName": "total_interest_list", + "type": "Array" }, { - name: 'leftRepayInterestList', - baseName: 'left_repay_interest_list', - type: 'Array', - }, - ]; + "name": "leftRepayInterestList", + "baseName": "left_repay_interest_list", + "type": "Array" + } ]; static getAttributeTypeMap() { return MultiRepayRecord.attributeTypeMap; } } + diff --git a/model/multiRepayResp.ts b/model/multiRepayResp.ts index 5903c1e..f3e3dce 100644 --- a/model/multiRepayResp.ts +++ b/model/multiRepayResp.ts @@ -12,34 +12,34 @@ import { RepayCurrencyRes } from './repayCurrencyRes'; /** - * Repay Multi-Collateral Loan - */ +* Repay Multi-Collateral Loan +*/ export class MultiRepayResp { /** - * Order ID - */ + * Order ID + */ 'orderId'?: number; /** - * Repay Currency List - */ + * Repay Currency List + */ 'repaidCurrencies'?: Array; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'orderId', - baseName: 'order_id', - type: 'number', + "name": "orderId", + "baseName": "order_id", + "type": "number" }, { - name: 'repaidCurrencies', - baseName: 'repaid_currencies', - type: 'Array', - }, - ]; + "name": "repaidCurrencies", + "baseName": "repaid_currencies", + "type": "Array" + } ]; static getAttributeTypeMap() { return MultiRepayResp.attributeTypeMap; } } + diff --git a/model/myFuturesTrade.ts b/model/myFuturesTrade.ts index aa3b5bd..4dab450 100644 --- a/model/myFuturesTrade.ts +++ b/model/myFuturesTrade.ts @@ -9,111 +9,111 @@ * Do not edit the class manually. */ + export class MyFuturesTrade { /** - * Trade ID - */ + * Trade ID + */ 'id'?: number; /** - * Trading time - */ + * Trading time + */ 'createTime'?: number; /** - * Futures contract - */ + * Futures contract + */ 'contract'?: string; /** - * Order ID related - */ + * Order ID related + */ 'orderId'?: string; /** - * Trading size - */ + * Trading size + */ 'size'?: number; /** - * 平仓数量: close_size=0 && size>0 开多 close_size=0 && size<0 开空 close_size>0 && size>0 && size <= close_size 平空 close_size>0 && size>0 && size > close_size 平空且开多 close_size<0 && size<0 && size >= close_size 平多 close_size<0 && size<0 && size < close_size 平多且开空 - */ + * 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 + */ 'closeSize'?: number; /** - * Trading price - */ + * Trading price + */ 'price'?: string; /** - * Trade role. Available values are `taker` and `maker` - */ + * Trade role. Available values are `taker` and `maker` + */ 'role'?: MyFuturesTrade.Role; /** - * User defined information - */ + * User defined information + */ 'text'?: string; /** - * Fee deducted - */ + * Fee deducted + */ 'fee'?: string; /** - * Points used to deduct fee - */ + * Points used to deduct fee + */ 'pointFee'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'number', + "name": "id", + "baseName": "id", + "type": "number" }, { - name: 'createTime', - baseName: 'create_time', - type: 'number', + "name": "createTime", + "baseName": "create_time", + "type": "number" }, { - name: 'contract', - baseName: 'contract', - type: 'string', + "name": "contract", + "baseName": "contract", + "type": "string" }, { - name: 'orderId', - baseName: 'order_id', - type: 'string', + "name": "orderId", + "baseName": "order_id", + "type": "string" }, { - name: 'size', - baseName: 'size', - type: 'number', + "name": "size", + "baseName": "size", + "type": "number" }, { - name: 'closeSize', - baseName: 'close_size', - type: 'number', + "name": "closeSize", + "baseName": "close_size", + "type": "number" }, { - name: 'price', - baseName: 'price', - type: 'string', + "name": "price", + "baseName": "price", + "type": "string" }, { - name: 'role', - baseName: 'role', - type: 'MyFuturesTrade.Role', + "name": "role", + "baseName": "role", + "type": "MyFuturesTrade.Role" }, { - name: 'text', - baseName: 'text', - type: 'string', + "name": "text", + "baseName": "text", + "type": "string" }, { - name: 'fee', - baseName: 'fee', - type: 'string', + "name": "fee", + "baseName": "fee", + "type": "string" }, { - name: 'pointFee', - baseName: 'point_fee', - type: 'string', - }, - ]; + "name": "pointFee", + "baseName": "point_fee", + "type": "string" + } ]; static getAttributeTypeMap() { return MyFuturesTrade.attributeTypeMap; @@ -122,7 +122,7 @@ export class MyFuturesTrade { export namespace MyFuturesTrade { export enum Role { - Taker = 'taker', - Maker = 'maker', + Taker = 'taker', + Maker = 'maker' } } diff --git a/model/myFuturesTradeTimeRange.ts b/model/myFuturesTradeTimeRange.ts index e79d6c5..a67a1b4 100644 --- a/model/myFuturesTradeTimeRange.ts +++ b/model/myFuturesTradeTimeRange.ts @@ -9,111 +9,111 @@ * Do not edit the class manually. */ + export class MyFuturesTradeTimeRange { /** - * Trade ID - */ + * Trade ID + */ 'tradeId'?: string; /** - * Trading time - */ + * Trading time + */ 'createTime'?: number; /** - * Futures contract - */ + * Futures contract + */ 'contract'?: string; /** - * Order ID related - */ + * Order ID related + */ 'orderId'?: string; /** - * Trading size - */ + * Trading size + */ 'size'?: number; /** - * 平仓数量: close_size=0 && size>0 开多 close_size=0 && size<0 开空 close_size>0 && size>0 && size <= close_size 平空 close_size>0 && size>0 && size > close_size 平空且开多 close_size<0 && size<0 && size >= close_size 平多 close_size<0 && size<0 && size < close_size 平多且开空 - */ + * 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 + */ 'closeSize'?: number; /** - * Trading price - */ + * Trading price + */ 'price'?: string; /** - * Trade role. Available values are `taker` and `maker` - */ + * Trade role. Available values are `taker` and `maker` + */ 'role'?: MyFuturesTradeTimeRange.Role; /** - * User defined information - */ + * User defined information + */ 'text'?: string; /** - * Fee deducted - */ + * Fee deducted + */ 'fee'?: string; /** - * Points used to deduct fee - */ + * Points used to deduct fee + */ 'pointFee'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'tradeId', - baseName: 'trade_id', - type: 'string', + "name": "tradeId", + "baseName": "trade_id", + "type": "string" }, { - name: 'createTime', - baseName: 'create_time', - type: 'number', + "name": "createTime", + "baseName": "create_time", + "type": "number" }, { - name: 'contract', - baseName: 'contract', - type: 'string', + "name": "contract", + "baseName": "contract", + "type": "string" }, { - name: 'orderId', - baseName: 'order_id', - type: 'string', + "name": "orderId", + "baseName": "order_id", + "type": "string" }, { - name: 'size', - baseName: 'size', - type: 'number', + "name": "size", + "baseName": "size", + "type": "number" }, { - name: 'closeSize', - baseName: 'close_size', - type: 'number', + "name": "closeSize", + "baseName": "close_size", + "type": "number" }, { - name: 'price', - baseName: 'price', - type: 'string', + "name": "price", + "baseName": "price", + "type": "string" }, { - name: 'role', - baseName: 'role', - type: 'MyFuturesTradeTimeRange.Role', + "name": "role", + "baseName": "role", + "type": "MyFuturesTradeTimeRange.Role" }, { - name: 'text', - baseName: 'text', - type: 'string', + "name": "text", + "baseName": "text", + "type": "string" }, { - name: 'fee', - baseName: 'fee', - type: 'string', + "name": "fee", + "baseName": "fee", + "type": "string" }, { - name: 'pointFee', - baseName: 'point_fee', - type: 'string', - }, - ]; + "name": "pointFee", + "baseName": "point_fee", + "type": "string" + } ]; static getAttributeTypeMap() { return MyFuturesTradeTimeRange.attributeTypeMap; @@ -122,7 +122,7 @@ export class MyFuturesTradeTimeRange { export namespace MyFuturesTradeTimeRange { export enum Role { - Taker = 'taker', - Maker = 'maker', + Taker = 'taker', + Maker = 'maker' } } diff --git a/model/openOrders.ts b/model/openOrders.ts index 1ff5487..a8705f7 100644 --- a/model/openOrders.ts +++ b/model/openOrders.ts @@ -13,36 +13,36 @@ import { Order } from './order'; export class OpenOrders { /** - * Currency pair - */ + * Currency pair + */ 'currencyPair'?: string; /** - * The total number of pending orders for this trading pair on the current page - */ + * The total number of pending orders for this trading pair on the current page + */ 'total'?: number; 'orders'?: Array; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" }, { - name: 'total', - baseName: 'total', - type: 'number', + "name": "total", + "baseName": "total", + "type": "number" }, { - name: 'orders', - baseName: 'orders', - type: 'Array', - }, - ]; + "name": "orders", + "baseName": "orders", + "type": "Array" + } ]; static getAttributeTypeMap() { return OpenOrders.attributeTypeMap; } } + diff --git a/model/optionsAccount.ts b/model/optionsAccount.ts index 6d375d8..fd45928 100644 --- a/model/optionsAccount.ts +++ b/model/optionsAccount.ts @@ -9,183 +9,183 @@ * Do not edit the class manually. */ + export class OptionsAccount { /** - * User ID - */ + * User ID + */ 'user'?: number; /** - * 账户余额 - */ + * Account balance + */ 'total'?: string; /** - * 仓位价值,做多仓位价值为正,做空仓位价值为负 - */ + * Position value, long position value is positive, short position value is negative + */ 'positionValue'?: string; /** - * 账户权益,账户余额与仓位价值的和 - */ + * Account equity, the sum of account balance and position value + */ 'equity'?: string; /** - * If the account is allowed to short - */ + * If the account is allowed to short + */ 'shortEnabled'?: boolean; /** - * 是否启用MMP - */ + * Whether to enable MMP + */ 'mmpEnabled'?: boolean; /** - * 是否触发仓位强平 - */ + * Whether to trigger position liquidation + */ 'liqTriggered'?: boolean; /** - * | 保证金模式: - 0:经典现货保证金模式 - 1:跨币种保证金模式 - 2:组合保证金模式 - */ + * | 保证金模式: - 0:经典现货保证金模式 - 1:跨币种保证金模式 - 2:组合保证金模式 + */ 'marginMode'?: OptionsAccount.MarginMode; /** - * Unrealized PNL - */ + * Unrealized PNL + */ 'unrealisedPnl'?: string; /** - * Initial position margin - */ + * Initial position margin + */ 'initMargin'?: string; /** - * Position maintenance margin - */ + * Position maintenance margin + */ 'maintMargin'?: string; /** - * Order margin of unfinished orders - */ + * Order margin of unfinished orders + */ 'orderMargin'?: string; /** - * 未完成卖单的保证金 - */ + * Margin for outstanding sell orders + */ 'askOrderMargin'?: string; /** - * 未完成买单的保证金 - */ + * Margin for outstanding buy orders + */ 'bidOrderMargin'?: string; /** - * Available balance to transfer out or trade - */ + * Available balance to transfer out or trade + */ 'available'?: string; /** - * POINT amount - */ + * POINT amount + */ 'point'?: string; /** - * Settle currency - */ + * Settle currency + */ 'currency'?: string; /** - * 未完成订单数量上限 - */ + * Maximum number of outstanding orders + */ 'ordersLimit'?: number; /** - * 名义价值上限,包含仓位以及未完成订单的名义价值 - */ + * Notional value upper limit, including the nominal value of positions and outstanding orders + */ 'positionNotionalLimit'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'user', - baseName: 'user', - type: 'number', + "name": "user", + "baseName": "user", + "type": "number" }, { - name: 'total', - baseName: 'total', - type: 'string', + "name": "total", + "baseName": "total", + "type": "string" }, { - name: 'positionValue', - baseName: 'position_value', - type: 'string', + "name": "positionValue", + "baseName": "position_value", + "type": "string" }, { - name: 'equity', - baseName: 'equity', - type: 'string', + "name": "equity", + "baseName": "equity", + "type": "string" }, { - name: 'shortEnabled', - baseName: 'short_enabled', - type: 'boolean', + "name": "shortEnabled", + "baseName": "short_enabled", + "type": "boolean" }, { - name: 'mmpEnabled', - baseName: 'mmp_enabled', - type: 'boolean', + "name": "mmpEnabled", + "baseName": "mmp_enabled", + "type": "boolean" }, { - name: 'liqTriggered', - baseName: 'liq_triggered', - type: 'boolean', + "name": "liqTriggered", + "baseName": "liq_triggered", + "type": "boolean" }, { - name: 'marginMode', - baseName: 'margin_mode', - type: 'OptionsAccount.MarginMode', + "name": "marginMode", + "baseName": "margin_mode", + "type": "OptionsAccount.MarginMode" }, { - name: 'unrealisedPnl', - baseName: 'unrealised_pnl', - type: 'string', + "name": "unrealisedPnl", + "baseName": "unrealised_pnl", + "type": "string" }, { - name: 'initMargin', - baseName: 'init_margin', - type: 'string', + "name": "initMargin", + "baseName": "init_margin", + "type": "string" }, { - name: 'maintMargin', - baseName: 'maint_margin', - type: 'string', + "name": "maintMargin", + "baseName": "maint_margin", + "type": "string" }, { - name: 'orderMargin', - baseName: 'order_margin', - type: 'string', + "name": "orderMargin", + "baseName": "order_margin", + "type": "string" }, { - name: 'askOrderMargin', - baseName: 'ask_order_margin', - type: 'string', + "name": "askOrderMargin", + "baseName": "ask_order_margin", + "type": "string" }, { - name: 'bidOrderMargin', - baseName: 'bid_order_margin', - type: 'string', + "name": "bidOrderMargin", + "baseName": "bid_order_margin", + "type": "string" }, { - name: 'available', - baseName: 'available', - type: 'string', + "name": "available", + "baseName": "available", + "type": "string" }, { - name: 'point', - baseName: 'point', - type: 'string', + "name": "point", + "baseName": "point", + "type": "string" }, { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'ordersLimit', - baseName: 'orders_limit', - type: 'number', + "name": "ordersLimit", + "baseName": "orders_limit", + "type": "number" }, { - name: 'positionNotionalLimit', - baseName: 'position_notional_limit', - type: 'number', - }, - ]; + "name": "positionNotionalLimit", + "baseName": "position_notional_limit", + "type": "number" + } ]; static getAttributeTypeMap() { return OptionsAccount.attributeTypeMap; @@ -194,8 +194,8 @@ export class OptionsAccount { export namespace OptionsAccount { export enum MarginMode { - NUMBER_0 = 0, - NUMBER_1 = 1, - NUMBER_2 = 2, + NUMBER_0 = 0, + NUMBER_1 = 1, + NUMBER_2 = 2 } } diff --git a/model/optionsAccountBook.ts b/model/optionsAccountBook.ts index 0815f2a..6bbc5ae 100644 --- a/model/optionsAccountBook.ts +++ b/model/optionsAccountBook.ts @@ -9,59 +9,60 @@ * Do not edit the class manually. */ + export class OptionsAccountBook { /** - * Change time - */ + * Change time + */ 'time'?: number; /** - * Amount changed (USDT) - */ + * Amount changed (USDT) + */ 'change'?: string; /** - * Account total balance after change (USDT) - */ + * Account total balance after change (USDT) + */ 'balance'?: string; /** - * 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 - */ + * 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 + */ 'type'?: string; /** - * custom text - */ + * custom text + */ 'text'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'time', - baseName: 'time', - type: 'number', + "name": "time", + "baseName": "time", + "type": "number" }, { - name: 'change', - baseName: 'change', - type: 'string', + "name": "change", + "baseName": "change", + "type": "string" }, { - name: 'balance', - baseName: 'balance', - type: 'string', + "name": "balance", + "baseName": "balance", + "type": "string" }, { - name: 'type', - baseName: 'type', - type: 'string', + "name": "type", + "baseName": "type", + "type": "string" }, { - name: 'text', - baseName: 'text', - type: 'string', - }, - ]; + "name": "text", + "baseName": "text", + "type": "string" + } ]; static getAttributeTypeMap() { return OptionsAccountBook.attributeTypeMap; } } + diff --git a/model/optionsCandlestick.ts b/model/optionsCandlestick.ts index 81d5663..ef57686 100644 --- a/model/optionsCandlestick.ts +++ b/model/optionsCandlestick.ts @@ -9,71 +9,72 @@ * Do not edit the class manually. */ + /** - * data point in every timestamp - */ +* data point in every timestamp +*/ export class OptionsCandlestick { /** - * Unix timestamp in seconds - */ + * Unix timestamp in seconds + */ 't'?: number; /** - * size volume (contract size). Only returned if `contract` is not prefixed - */ + * size volume (contract size). Only returned if `contract` is not prefixed + */ 'v'?: number; /** - * Close price (quote currency, unit: underlying corresponding option price) - */ + * Close price (quote currency, unit: underlying corresponding option price) + */ 'c'?: string; /** - * Highest price (quote currency, unit: underlying corresponding option price) - */ + * Highest price (quote currency, unit: underlying corresponding option price) + */ 'h'?: string; /** - * Lowest price (quote currency, unit: underlying corresponding option price) - */ + * Lowest price (quote currency, unit: underlying corresponding option price) + */ 'l'?: string; /** - * Open price (quote currency, unit: underlying corresponding option price) - */ + * Open price (quote currency, unit: underlying corresponding option price) + */ 'o'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 't', - baseName: 't', - type: 'number', + "name": "t", + "baseName": "t", + "type": "number" }, { - name: 'v', - baseName: 'v', - type: 'number', + "name": "v", + "baseName": "v", + "type": "number" }, { - name: 'c', - baseName: 'c', - type: 'string', + "name": "c", + "baseName": "c", + "type": "string" }, { - name: 'h', - baseName: 'h', - type: 'string', + "name": "h", + "baseName": "h", + "type": "string" }, { - name: 'l', - baseName: 'l', - type: 'string', + "name": "l", + "baseName": "l", + "type": "string" }, { - name: 'o', - baseName: 'o', - type: 'string', - }, - ]; + "name": "o", + "baseName": "o", + "type": "string" + } ]; static getAttributeTypeMap() { return OptionsCandlestick.attributeTypeMap; } } + diff --git a/model/optionsContract.ts b/model/optionsContract.ts index 8e16c3b..81811c7 100644 --- a/model/optionsContract.ts +++ b/model/optionsContract.ts @@ -9,242 +9,243 @@ * Do not edit the class manually. */ + /** - * Options contract detail - */ +* Options contract detail +*/ export class OptionsContract { /** - * Options contract name - */ + * Options contract name + */ 'name'?: string; /** - * tag - */ + * tag + */ 'tag'?: string; /** - * Creation time - */ + * Creation time + */ 'createTime'?: number; /** - * Expiration time - */ + * Expiration time + */ 'expirationTime'?: number; /** - * `true` means call options, while `false` is put options - */ + * `true` means call options, while `false` is put options + */ 'isCall'?: boolean; /** - * Multiplier used in converting from invoicing to settlement currency - */ + * Multiplier used in converting from invoicing to settlement currency + */ 'multiplier'?: string; /** - * Underlying - */ + * Underlying + */ 'underlying'?: string; /** - * Underlying price (quote currency) - */ + * Underlying price (quote currency) + */ 'underlyingPrice'?: string; /** - * Last trading price - */ + * Last trading price + */ 'lastPrice'?: string; /** - * Current mark price (quote currency) - */ + * Current mark price (quote currency) + */ 'markPrice'?: string; /** - * Current index price (quote currency) - */ + * Current index price (quote currency) + */ 'indexPrice'?: string; /** - * Maker fee rate, where negative means rebate - */ + * Maker fee rate, where negative means rebate + */ 'makerFeeRate'?: string; /** - * Taker fee rate - */ + * Taker fee rate + */ 'takerFeeRate'?: string; /** - * Minimum order price increment - */ + * Minimum order price increment + */ 'orderPriceRound'?: string; /** - * Minimum mark price increment - */ + * Minimum mark price increment + */ 'markPriceRound'?: string; /** - * Minimum order size the contract allowed - */ + * Minimum order size the contract allowed + */ 'orderSizeMin'?: number; /** - * Maximum order size the contract allowed - */ + * Maximum order size the contract allowed + */ 'orderSizeMax'?: number; /** - * 下单价与当前标记价格允许的正负偏移量, 即下单价 `order_price` 需满足如下条件: order_price 在mark_price +/- order_price_deviate * underlying_price 范围内,不区分买单卖单 - */ + * 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 + */ 'orderPriceDeviate'?: string; /** - * Referral fee rate discount - */ + * Referral fee rate discount + */ 'refDiscountRate'?: string; /** - * Referrer commission rate - */ + * Referrer commission rate + */ 'refRebateRate'?: string; /** - * Current orderbook ID - */ + * Current orderbook ID + */ 'orderbookId'?: number; /** - * Current trade ID - */ + * Current trade ID + */ 'tradeId'?: number; /** - * Historical accumulated trade size - */ + * Historical accumulated trade size + */ 'tradeSize'?: number; /** - * Current total long position size - */ + * Current total long position size + */ 'positionSize'?: number; /** - * Maximum number of open orders - */ + * Maximum number of open orders + */ 'ordersLimit'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'name', - baseName: 'name', - type: 'string', + "name": "name", + "baseName": "name", + "type": "string" }, { - name: 'tag', - baseName: 'tag', - type: 'string', + "name": "tag", + "baseName": "tag", + "type": "string" }, { - name: 'createTime', - baseName: 'create_time', - type: 'number', + "name": "createTime", + "baseName": "create_time", + "type": "number" }, { - name: 'expirationTime', - baseName: 'expiration_time', - type: 'number', + "name": "expirationTime", + "baseName": "expiration_time", + "type": "number" }, { - name: 'isCall', - baseName: 'is_call', - type: 'boolean', + "name": "isCall", + "baseName": "is_call", + "type": "boolean" }, { - name: 'multiplier', - baseName: 'multiplier', - type: 'string', + "name": "multiplier", + "baseName": "multiplier", + "type": "string" }, { - name: 'underlying', - baseName: 'underlying', - type: 'string', + "name": "underlying", + "baseName": "underlying", + "type": "string" }, { - name: 'underlyingPrice', - baseName: 'underlying_price', - type: 'string', + "name": "underlyingPrice", + "baseName": "underlying_price", + "type": "string" }, { - name: 'lastPrice', - baseName: 'last_price', - type: 'string', + "name": "lastPrice", + "baseName": "last_price", + "type": "string" }, { - name: 'markPrice', - baseName: 'mark_price', - type: 'string', + "name": "markPrice", + "baseName": "mark_price", + "type": "string" }, { - name: 'indexPrice', - baseName: 'index_price', - type: 'string', + "name": "indexPrice", + "baseName": "index_price", + "type": "string" }, { - name: 'makerFeeRate', - baseName: 'maker_fee_rate', - type: 'string', + "name": "makerFeeRate", + "baseName": "maker_fee_rate", + "type": "string" }, { - name: 'takerFeeRate', - baseName: 'taker_fee_rate', - type: 'string', + "name": "takerFeeRate", + "baseName": "taker_fee_rate", + "type": "string" }, { - name: 'orderPriceRound', - baseName: 'order_price_round', - type: 'string', + "name": "orderPriceRound", + "baseName": "order_price_round", + "type": "string" }, { - name: 'markPriceRound', - baseName: 'mark_price_round', - type: 'string', + "name": "markPriceRound", + "baseName": "mark_price_round", + "type": "string" }, { - name: 'orderSizeMin', - baseName: 'order_size_min', - type: 'number', + "name": "orderSizeMin", + "baseName": "order_size_min", + "type": "number" }, { - name: 'orderSizeMax', - baseName: 'order_size_max', - type: 'number', + "name": "orderSizeMax", + "baseName": "order_size_max", + "type": "number" }, { - name: 'orderPriceDeviate', - baseName: 'order_price_deviate', - type: 'string', + "name": "orderPriceDeviate", + "baseName": "order_price_deviate", + "type": "string" }, { - name: 'refDiscountRate', - baseName: 'ref_discount_rate', - type: 'string', + "name": "refDiscountRate", + "baseName": "ref_discount_rate", + "type": "string" }, { - name: 'refRebateRate', - baseName: 'ref_rebate_rate', - type: 'string', + "name": "refRebateRate", + "baseName": "ref_rebate_rate", + "type": "string" }, { - name: 'orderbookId', - baseName: 'orderbook_id', - type: 'number', + "name": "orderbookId", + "baseName": "orderbook_id", + "type": "number" }, { - name: 'tradeId', - baseName: 'trade_id', - type: 'number', + "name": "tradeId", + "baseName": "trade_id", + "type": "number" }, { - name: 'tradeSize', - baseName: 'trade_size', - type: 'number', + "name": "tradeSize", + "baseName": "trade_size", + "type": "number" }, { - name: 'positionSize', - baseName: 'position_size', - type: 'number', + "name": "positionSize", + "baseName": "position_size", + "type": "number" }, { - name: 'ordersLimit', - baseName: 'orders_limit', - type: 'number', - }, - ]; + "name": "ordersLimit", + "baseName": "orders_limit", + "type": "number" + } ]; static getAttributeTypeMap() { return OptionsContract.attributeTypeMap; } } + diff --git a/model/optionsMMP.ts b/model/optionsMMP.ts index 69c42be..2d296ab 100644 --- a/model/optionsMMP.ts +++ b/model/optionsMMP.ts @@ -9,80 +9,81 @@ * Do not edit the class manually. */ + /** - * MMP设置 - */ +* MMP Settings +*/ export class OptionsMMP { /** - * Underlying - */ + * Underlying + */ 'underlying': string; /** - * 时间窗口(毫秒),1-5000之间,0表示停用MMP - */ + * Time window (milliseconds), between 1-5000, 0 means disabling MMP + */ 'window': number; /** - * 冻结时长(毫秒),0表示一直冻结,需要调用重置API解冻 - */ + * Freeze duration (milliseconds), 0 means always frozen, need to call reset API to unfreeze + */ 'frozenPeriod': number; /** - * 成交量上限(正数,至多2位小数) - */ + * Trading volume upper limit (positive number, up to 2 decimal places) + */ 'qtyLimit': string; /** - * 净delta值上限(正数,至多2位小数) - */ + * Upper limit of net delta value (positive number, up to 2 decimal places) + */ 'deltaLimit': string; /** - * 触发冻结时间(毫秒),0表示没有触发冻结 - */ + * Trigger freeze time (milliseconds), 0 means no freeze is triggered + */ 'triggerTimeMs'?: number; /** - * 解冻时间(毫秒),如果未配置冻结时长,触发冻结后无解冻时间 - */ + * Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered. + */ 'frozenUntilMs'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'underlying', - baseName: 'underlying', - type: 'string', + "name": "underlying", + "baseName": "underlying", + "type": "string" }, { - name: 'window', - baseName: 'window', - type: 'number', + "name": "window", + "baseName": "window", + "type": "number" }, { - name: 'frozenPeriod', - baseName: 'frozen_period', - type: 'number', + "name": "frozenPeriod", + "baseName": "frozen_period", + "type": "number" }, { - name: 'qtyLimit', - baseName: 'qty_limit', - type: 'string', + "name": "qtyLimit", + "baseName": "qty_limit", + "type": "string" }, { - name: 'deltaLimit', - baseName: 'delta_limit', - type: 'string', + "name": "deltaLimit", + "baseName": "delta_limit", + "type": "string" }, { - name: 'triggerTimeMs', - baseName: 'trigger_time_ms', - type: 'number', + "name": "triggerTimeMs", + "baseName": "trigger_time_ms", + "type": "number" }, { - name: 'frozenUntilMs', - baseName: 'frozen_until_ms', - type: 'number', - }, - ]; + "name": "frozenUntilMs", + "baseName": "frozen_until_ms", + "type": "number" + } ]; static getAttributeTypeMap() { return OptionsMMP.attributeTypeMap; } } + diff --git a/model/optionsMMPReset.ts b/model/optionsMMPReset.ts index dd72df3..3c376ab 100644 --- a/model/optionsMMPReset.ts +++ b/model/optionsMMPReset.ts @@ -9,80 +9,81 @@ * Do not edit the class manually. */ + /** - * MMP重置 - */ +* MMP Reset +*/ export class OptionsMMPReset { /** - * Underlying - */ + * Underlying + */ 'underlying': string; /** - * 时间窗口(毫秒),1-5000之间,0表示停用MMP - */ + * Time window (milliseconds), between 1-5000, 0 means disabling MMP + */ 'window'?: number; /** - * 冻结时长(毫秒),0表示一直冻结,需要调用重置API解冻 - */ + * Freeze duration (milliseconds), 0 means always frozen, need to call reset API to unfreeze + */ 'frozenPeriod'?: number; /** - * 成交量上限(正数,至多2位小数) - */ + * Trading volume upper limit (positive number, up to 2 decimal places) + */ 'qtyLimit'?: string; /** - * 净delta值上限(正数,至多2位小数) - */ + * Upper limit of net delta value (positive number, up to 2 decimal places) + */ 'deltaLimit'?: string; /** - * 触发冻结时间(毫秒),0表示没有触发冻结 - */ + * Trigger freeze time (milliseconds), 0 means no freeze is triggered + */ 'triggerTimeMs'?: number; /** - * 解冻时间(毫秒),如果未配置冻结时长,触发冻结后无解冻时间 - */ + * Unfreeze time (milliseconds). If the freeze duration is not configured, there will be no unfreeze time after the freeze is triggered. + */ 'frozenUntilMs'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'underlying', - baseName: 'underlying', - type: 'string', + "name": "underlying", + "baseName": "underlying", + "type": "string" }, { - name: 'window', - baseName: 'window', - type: 'number', + "name": "window", + "baseName": "window", + "type": "number" }, { - name: 'frozenPeriod', - baseName: 'frozen_period', - type: 'number', + "name": "frozenPeriod", + "baseName": "frozen_period", + "type": "number" }, { - name: 'qtyLimit', - baseName: 'qty_limit', - type: 'string', + "name": "qtyLimit", + "baseName": "qty_limit", + "type": "string" }, { - name: 'deltaLimit', - baseName: 'delta_limit', - type: 'string', + "name": "deltaLimit", + "baseName": "delta_limit", + "type": "string" }, { - name: 'triggerTimeMs', - baseName: 'trigger_time_ms', - type: 'number', + "name": "triggerTimeMs", + "baseName": "trigger_time_ms", + "type": "number" }, { - name: 'frozenUntilMs', - baseName: 'frozen_until_ms', - type: 'number', - }, - ]; + "name": "frozenUntilMs", + "baseName": "frozen_until_ms", + "type": "number" + } ]; static getAttributeTypeMap() { return OptionsMMPReset.attributeTypeMap; } } + diff --git a/model/optionsMySettlements.ts b/model/optionsMySettlements.ts index 8df1215..19819de 100644 --- a/model/optionsMySettlements.ts +++ b/model/optionsMySettlements.ts @@ -9,95 +9,96 @@ * Do not edit the class manually. */ + export class OptionsMySettlements { /** - * Settlement time - */ + * Settlement time + */ 'time'?: number; /** - * Underlying - */ + * Underlying + */ 'underlying'?: string; /** - * Options contract name - */ + * Options contract name + */ 'contract'?: string; /** - * Strike price (quote currency) - */ + * Strike price (quote currency) + */ 'strikePrice'?: string; /** - * Settlement price (quote currency) - */ + * Settlement price (quote currency) + */ 'settlePrice'?: string; /** - * Size - */ + * Size + */ 'size'?: number; /** - * Settlement profit (quote currency) - */ + * Settlement profit (quote currency) + */ 'settleProfit'?: string; /** - * Fee (quote currency) - */ + * Fee (quote currency) + */ 'fee'?: string; /** - * The accumulated profit and loss of opening a position, including premium, fee, settlement profit, etc. (quote currency) - */ + * The accumulated profit and loss of opening a position, including premium, fee, settlement profit, etc. (quote currency) + */ 'realisedPnl'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'time', - baseName: 'time', - type: 'number', + "name": "time", + "baseName": "time", + "type": "number" }, { - name: 'underlying', - baseName: 'underlying', - type: 'string', + "name": "underlying", + "baseName": "underlying", + "type": "string" }, { - name: 'contract', - baseName: 'contract', - type: 'string', + "name": "contract", + "baseName": "contract", + "type": "string" }, { - name: 'strikePrice', - baseName: 'strike_price', - type: 'string', + "name": "strikePrice", + "baseName": "strike_price", + "type": "string" }, { - name: 'settlePrice', - baseName: 'settle_price', - type: 'string', + "name": "settlePrice", + "baseName": "settle_price", + "type": "string" }, { - name: 'size', - baseName: 'size', - type: 'number', + "name": "size", + "baseName": "size", + "type": "number" }, { - name: 'settleProfit', - baseName: 'settle_profit', - type: 'string', + "name": "settleProfit", + "baseName": "settle_profit", + "type": "string" }, { - name: 'fee', - baseName: 'fee', - type: 'string', + "name": "fee", + "baseName": "fee", + "type": "string" }, { - name: 'realisedPnl', - baseName: 'realised_pnl', - type: 'string', - }, - ]; + "name": "realisedPnl", + "baseName": "realised_pnl", + "type": "string" + } ]; static getAttributeTypeMap() { return OptionsMySettlements.attributeTypeMap; } } + diff --git a/model/optionsMyTrade.ts b/model/optionsMyTrade.ts index f7461af..c129a27 100644 --- a/model/optionsMyTrade.ts +++ b/model/optionsMyTrade.ts @@ -9,84 +9,84 @@ * Do not edit the class manually. */ + export class OptionsMyTrade { /** - * Trade ID - */ + * Trade ID + */ 'id'?: number; /** - * Trading time - */ + * Trading time + */ 'createTime'?: number; /** - * Options contract name - */ + * Options contract name + */ 'contract'?: string; /** - * Order ID related - */ + * Order ID related + */ 'orderId'?: number; /** - * Trading size - */ + * Trading size + */ 'size'?: number; /** - * Trading price (quote currency) - */ + * Trading price (quote currency) + */ 'price'?: string; /** - * Underlying price (quote currency) - */ + * Underlying price (quote currency) + */ 'underlyingPrice'?: string; /** - * Trade role. Available values are `taker` and `maker` - */ + * Trade role. Available values are `taker` and `maker` + */ 'role'?: OptionsMyTrade.Role; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'number', + "name": "id", + "baseName": "id", + "type": "number" }, { - name: 'createTime', - baseName: 'create_time', - type: 'number', + "name": "createTime", + "baseName": "create_time", + "type": "number" }, { - name: 'contract', - baseName: 'contract', - type: 'string', + "name": "contract", + "baseName": "contract", + "type": "string" }, { - name: 'orderId', - baseName: 'order_id', - type: 'number', + "name": "orderId", + "baseName": "order_id", + "type": "number" }, { - name: 'size', - baseName: 'size', - type: 'number', + "name": "size", + "baseName": "size", + "type": "number" }, { - name: 'price', - baseName: 'price', - type: 'string', + "name": "price", + "baseName": "price", + "type": "string" }, { - name: 'underlyingPrice', - baseName: 'underlying_price', - type: 'string', + "name": "underlyingPrice", + "baseName": "underlying_price", + "type": "string" }, { - name: 'role', - baseName: 'role', - type: 'OptionsMyTrade.Role', - }, - ]; + "name": "role", + "baseName": "role", + "type": "OptionsMyTrade.Role" + } ]; static getAttributeTypeMap() { return OptionsMyTrade.attributeTypeMap; @@ -95,7 +95,7 @@ export class OptionsMyTrade { export namespace OptionsMyTrade { export enum Role { - Taker = 'taker', - Maker = 'maker', + Taker = 'taker', + Maker = 'maker' } } diff --git a/model/optionsOrder.ts b/model/optionsOrder.ts index 940d038..6277713 100644 --- a/model/optionsOrder.ts +++ b/model/optionsOrder.ts @@ -9,240 +9,240 @@ * Do not edit the class manually. */ + /** - * Options order detail - */ +* Options order detail +*/ export class OptionsOrder { /** - * Options order ID - */ + * Options order ID + */ 'id'?: number; /** - * User ID - */ + * User ID + */ 'user'?: number; /** - * Creation time of order - */ + * Creation time of order + */ 'createTime'?: number; /** - * Order finished time. Not returned if order is open - */ + * Order finished time. Not returned if order is open + */ 'finishTime'?: number; /** - * 结束方式,包括: - filled: 完全成交 - cancelled: 用户撤销 - liquidated: 强制平仓撤销 - ioc: 未立即完全成交,因为tif设置为ioc - auto_deleveraged: 自动减仓撤销 - reduce_only: 增持仓位撤销,因为设置reduce_only或平仓 - position_closed: 因为仓位平掉了,所以挂单被撤掉 - reduce_out: 只减仓被排除的不容易成交的挂单 - mmp_cancelled: MMP撤销 - */ + * 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 + */ 'finishAs'?: OptionsOrder.FinishAs; /** - * Order status - `open`: waiting to be traded - `finished`: finished - */ + * Order status - `open`: waiting to be traded - `finished`: finished + */ 'status'?: OptionsOrder.Status; /** - * Contract name - */ + * Contract name + */ 'contract': string; /** - * Order size. Specify positive number to make a bid, and negative number to ask - */ + * Order size. Specify positive number to make a bid, and negative number to ask + */ 'size': number; /** - * Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size - */ + * Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size + */ 'iceberg'?: number; /** - * Order price. 0 for market order with `tif` set as `ioc` (USDT) - */ + * Order price. 0 for market order with `tif` set as `ioc` (USDT) + */ 'price'?: string; /** - * Set as `true` to close the position, with `size` set to 0 - */ + * Set as `true` to close the position, with `size` set to 0 + */ 'close'?: boolean; /** - * Is the order to close position - */ + * Is the order to close position + */ 'isClose'?: boolean; /** - * Set as `true` to be reduce-only order - */ + * Set as `true` to be reduce-only order + */ 'reduceOnly'?: boolean; /** - * Is the order reduce-only - */ + * Is the order reduce-only + */ 'isReduceOnly'?: boolean; /** - * Is the order for liquidation - */ + * Is the order for liquidation + */ 'isLiq'?: boolean; /** - * 设置为 true 的时候,为MMP委托 - */ + * When set to true, delegate to MMP + */ 'mmp'?: boolean; /** - * 是否为MMP委托。对应请求中的`mmp`。 - */ + * Whether it is MMP delegation. Corresponds to `mmp` in the request. + */ 'isMmp'?: boolean; /** - * Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - */ + * Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee + */ 'tif'?: OptionsOrder.Tif; /** - * Size left to be traded - */ + * Size left to be traded + */ 'left'?: number; /** - * Fill price of the order - */ + * Fill price of the order + */ 'fillPrice'?: string; /** - * 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 - */ + * 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 + */ 'text'?: string; /** - * Taker fee - */ + * Taker fee + */ 'tkfr'?: string; /** - * Maker fee - */ + * Maker fee + */ 'mkfr'?: string; /** - * Reference user ID - */ + * Reference user ID + */ 'refu'?: number; /** - * Referrer rebate - */ + * Referrer rebate + */ 'refr'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'number', + "name": "id", + "baseName": "id", + "type": "number" }, { - name: 'user', - baseName: 'user', - type: 'number', + "name": "user", + "baseName": "user", + "type": "number" }, { - name: 'createTime', - baseName: 'create_time', - type: 'number', + "name": "createTime", + "baseName": "create_time", + "type": "number" }, { - name: 'finishTime', - baseName: 'finish_time', - type: 'number', + "name": "finishTime", + "baseName": "finish_time", + "type": "number" }, { - name: 'finishAs', - baseName: 'finish_as', - type: 'OptionsOrder.FinishAs', + "name": "finishAs", + "baseName": "finish_as", + "type": "OptionsOrder.FinishAs" }, { - name: 'status', - baseName: 'status', - type: 'OptionsOrder.Status', + "name": "status", + "baseName": "status", + "type": "OptionsOrder.Status" }, { - name: 'contract', - baseName: 'contract', - type: 'string', + "name": "contract", + "baseName": "contract", + "type": "string" }, { - name: 'size', - baseName: 'size', - type: 'number', + "name": "size", + "baseName": "size", + "type": "number" }, { - name: 'iceberg', - baseName: 'iceberg', - type: 'number', + "name": "iceberg", + "baseName": "iceberg", + "type": "number" }, { - name: 'price', - baseName: 'price', - type: 'string', + "name": "price", + "baseName": "price", + "type": "string" }, { - name: 'close', - baseName: 'close', - type: 'boolean', + "name": "close", + "baseName": "close", + "type": "boolean" }, { - name: 'isClose', - baseName: 'is_close', - type: 'boolean', + "name": "isClose", + "baseName": "is_close", + "type": "boolean" }, { - name: 'reduceOnly', - baseName: 'reduce_only', - type: 'boolean', + "name": "reduceOnly", + "baseName": "reduce_only", + "type": "boolean" }, { - name: 'isReduceOnly', - baseName: 'is_reduce_only', - type: 'boolean', + "name": "isReduceOnly", + "baseName": "is_reduce_only", + "type": "boolean" }, { - name: 'isLiq', - baseName: 'is_liq', - type: 'boolean', + "name": "isLiq", + "baseName": "is_liq", + "type": "boolean" }, { - name: 'mmp', - baseName: 'mmp', - type: 'boolean', + "name": "mmp", + "baseName": "mmp", + "type": "boolean" }, { - name: 'isMmp', - baseName: 'is_mmp', - type: 'boolean', + "name": "isMmp", + "baseName": "is_mmp", + "type": "boolean" }, { - name: 'tif', - baseName: 'tif', - type: 'OptionsOrder.Tif', + "name": "tif", + "baseName": "tif", + "type": "OptionsOrder.Tif" }, { - name: 'left', - baseName: 'left', - type: 'number', + "name": "left", + "baseName": "left", + "type": "number" }, { - name: 'fillPrice', - baseName: 'fill_price', - type: 'string', + "name": "fillPrice", + "baseName": "fill_price", + "type": "string" }, { - name: 'text', - baseName: 'text', - type: 'string', + "name": "text", + "baseName": "text", + "type": "string" }, { - name: 'tkfr', - baseName: 'tkfr', - type: 'string', + "name": "tkfr", + "baseName": "tkfr", + "type": "string" }, { - name: 'mkfr', - baseName: 'mkfr', - type: 'string', + "name": "mkfr", + "baseName": "mkfr", + "type": "string" }, { - name: 'refu', - baseName: 'refu', - type: 'number', + "name": "refu", + "baseName": "refu", + "type": "number" }, { - name: 'refr', - baseName: 'refr', - type: 'string', - }, - ]; + "name": "refr", + "baseName": "refr", + "type": "string" + } ]; static getAttributeTypeMap() { return OptionsOrder.attributeTypeMap; @@ -251,23 +251,23 @@ export class OptionsOrder { export namespace OptionsOrder { export enum FinishAs { - Filled = 'filled', - Cancelled = 'cancelled', - Liquidated = 'liquidated', - Ioc = 'ioc', - AutoDeleveraged = 'auto_deleveraged', - ReduceOnly = 'reduce_only', - PositionClosed = 'position_closed', - ReduceOut = 'reduce_out', - MmpCancelled = 'mmp_cancelled', + Filled = 'filled', + Cancelled = 'cancelled', + Liquidated = 'liquidated', + Ioc = 'ioc', + AutoDeleveraged = 'auto_deleveraged', + ReduceOnly = 'reduce_only', + PositionClosed = 'position_closed', + ReduceOut = 'reduce_out', + MmpCancelled = 'mmp_cancelled' } export enum Status { - Open = 'open', - Finished = 'finished', + Open = 'open', + Finished = 'finished' } export enum Tif { - Gtc = 'gtc', - Ioc = 'ioc', - Poc = 'poc', + Gtc = 'gtc', + Ioc = 'ioc', + Poc = 'poc' } } diff --git a/model/optionsPosition.ts b/model/optionsPosition.ts index 7101a52..efeeba8 100644 --- a/model/optionsPosition.ts +++ b/model/optionsPosition.ts @@ -12,157 +12,157 @@ import { OptionsPositionCloseOrder } from './optionsPositionCloseOrder'; /** - * Options position information - */ +* Options position information +*/ export class OptionsPosition { /** - * User ID - */ + * User ID + */ 'user'?: number; /** - * Underlying - */ + * Underlying + */ 'underlying'?: string; /** - * Underlying price (quote currency) - */ + * Underlying price (quote currency) + */ 'underlyingPrice'?: string; /** - * Options contract name - */ + * Options contract name + */ 'contract'?: string; /** - * Position size (contract size) - */ + * Position size (contract size) + */ 'size'?: number; /** - * Entry size (quote currency) - */ + * Entry size (quote currency) + */ 'entryPrice'?: string; /** - * Current mark price (quote currency) - */ + * Current mark price (quote currency) + */ 'markPrice'?: string; /** - * Implied volatility - */ + * Implied volatility + */ 'markIv'?: string; /** - * Realized PNL - */ + * Realized PNL + */ 'realisedPnl'?: string; /** - * Unrealized PNL - */ + * Unrealized PNL + */ 'unrealisedPnl'?: string; /** - * Current open orders - */ + * Current open orders + */ 'pendingOrders'?: number; 'closeOrder'?: OptionsPositionCloseOrder | null; /** - * Delta - */ + * Delta + */ 'delta'?: string; /** - * Gamma - */ + * Gamma + */ 'gamma'?: string; /** - * Vega - */ + * Vega + */ 'vega'?: string; /** - * Theta - */ + * Theta + */ 'theta'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'user', - baseName: 'user', - type: 'number', + "name": "user", + "baseName": "user", + "type": "number" }, { - name: 'underlying', - baseName: 'underlying', - type: 'string', + "name": "underlying", + "baseName": "underlying", + "type": "string" }, { - name: 'underlyingPrice', - baseName: 'underlying_price', - type: 'string', + "name": "underlyingPrice", + "baseName": "underlying_price", + "type": "string" }, { - name: 'contract', - baseName: 'contract', - type: 'string', + "name": "contract", + "baseName": "contract", + "type": "string" }, { - name: 'size', - baseName: 'size', - type: 'number', + "name": "size", + "baseName": "size", + "type": "number" }, { - name: 'entryPrice', - baseName: 'entry_price', - type: 'string', + "name": "entryPrice", + "baseName": "entry_price", + "type": "string" }, { - name: 'markPrice', - baseName: 'mark_price', - type: 'string', + "name": "markPrice", + "baseName": "mark_price", + "type": "string" }, { - name: 'markIv', - baseName: 'mark_iv', - type: 'string', + "name": "markIv", + "baseName": "mark_iv", + "type": "string" }, { - name: 'realisedPnl', - baseName: 'realised_pnl', - type: 'string', + "name": "realisedPnl", + "baseName": "realised_pnl", + "type": "string" }, { - name: 'unrealisedPnl', - baseName: 'unrealised_pnl', - type: 'string', + "name": "unrealisedPnl", + "baseName": "unrealised_pnl", + "type": "string" }, { - name: 'pendingOrders', - baseName: 'pending_orders', - type: 'number', + "name": "pendingOrders", + "baseName": "pending_orders", + "type": "number" }, { - name: 'closeOrder', - baseName: 'close_order', - type: 'OptionsPositionCloseOrder', + "name": "closeOrder", + "baseName": "close_order", + "type": "OptionsPositionCloseOrder" }, { - name: 'delta', - baseName: 'delta', - type: 'string', + "name": "delta", + "baseName": "delta", + "type": "string" }, { - name: 'gamma', - baseName: 'gamma', - type: 'string', + "name": "gamma", + "baseName": "gamma", + "type": "string" }, { - name: 'vega', - baseName: 'vega', - type: 'string', + "name": "vega", + "baseName": "vega", + "type": "string" }, { - name: 'theta', - baseName: 'theta', - type: 'string', - }, - ]; + "name": "theta", + "baseName": "theta", + "type": "string" + } ]; static getAttributeTypeMap() { return OptionsPosition.attributeTypeMap; } } + diff --git a/model/optionsPositionClose.ts b/model/optionsPositionClose.ts index 587aa73..fe94f4e 100644 --- a/model/optionsPositionClose.ts +++ b/model/optionsPositionClose.ts @@ -9,66 +9,66 @@ * Do not edit the class manually. */ + export class OptionsPositionClose { /** - * Position close time - */ + * Position close time + */ 'time'?: number; /** - * Options contract name - */ + * Options contract name + */ 'contract'?: string; /** - * Position side, long or short - */ + * Position side, long or short + */ 'side'?: OptionsPositionClose.Side; /** - * PNL - */ + * PNL + */ 'pnl'?: string; /** - * Text of close order - */ + * Text of close order + */ 'text'?: string; /** - * settlement size - */ + * settlement size + */ 'settleSize'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'time', - baseName: 'time', - type: 'number', + "name": "time", + "baseName": "time", + "type": "number" }, { - name: 'contract', - baseName: 'contract', - type: 'string', + "name": "contract", + "baseName": "contract", + "type": "string" }, { - name: 'side', - baseName: 'side', - type: 'OptionsPositionClose.Side', + "name": "side", + "baseName": "side", + "type": "OptionsPositionClose.Side" }, { - name: 'pnl', - baseName: 'pnl', - type: 'string', + "name": "pnl", + "baseName": "pnl", + "type": "string" }, { - name: 'text', - baseName: 'text', - type: 'string', + "name": "text", + "baseName": "text", + "type": "string" }, { - name: 'settleSize', - baseName: 'settle_size', - type: 'string', - }, - ]; + "name": "settleSize", + "baseName": "settle_size", + "type": "string" + } ]; static getAttributeTypeMap() { return OptionsPositionClose.attributeTypeMap; @@ -77,7 +77,7 @@ export class OptionsPositionClose { export namespace OptionsPositionClose { export enum Side { - Long = 'long', - Short = 'short', + Long = 'long', + Short = 'short' } } diff --git a/model/optionsPositionCloseOrder.ts b/model/optionsPositionCloseOrder.ts index 14da25f..b1ef214 100644 --- a/model/optionsPositionCloseOrder.ts +++ b/model/optionsPositionCloseOrder.ts @@ -9,44 +9,45 @@ * Do not edit the class manually. */ + /** - * Current close order if any, or `null` - */ +* Current close order if any, or `null` +*/ export class OptionsPositionCloseOrder { /** - * Close order ID - */ + * Close order ID + */ 'id'?: number; /** - * Close order price (quote currency) - */ + * Close order price (quote currency) + */ 'price'?: string; /** - * Is the close order from liquidation - */ + * Is the close order from liquidation + */ 'isLiq'?: boolean; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'number', + "name": "id", + "baseName": "id", + "type": "number" }, { - name: 'price', - baseName: 'price', - type: 'string', + "name": "price", + "baseName": "price", + "type": "string" }, { - name: 'isLiq', - baseName: 'is_liq', - type: 'boolean', - }, - ]; + "name": "isLiq", + "baseName": "is_liq", + "type": "boolean" + } ]; static getAttributeTypeMap() { return OptionsPositionCloseOrder.attributeTypeMap; } } + diff --git a/model/optionsSettlement.ts b/model/optionsSettlement.ts index 806cba9..289c6d0 100644 --- a/model/optionsSettlement.ts +++ b/model/optionsSettlement.ts @@ -9,68 +9,69 @@ * Do not edit the class manually. */ + export class OptionsSettlement { /** - * Last changed time of configuration - */ + * Last changed time of configuration + */ 'time'?: number; /** - * Options contract name - */ + * Options contract name + */ 'contract'?: string; /** - * Settlement profit per size (quote currency) - */ + * Settlement profit per size (quote currency) + */ 'profit'?: string; /** - * Settlement fee per size (quote currency) - */ + * Settlement fee per size (quote currency) + */ 'fee'?: string; /** - * Strike price (quote currency) - */ + * Strike price (quote currency) + */ 'strikePrice'?: string; /** - * Settlement price (quote currency) - */ + * Settlement price (quote currency) + */ 'settlePrice'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'time', - baseName: 'time', - type: 'number', + "name": "time", + "baseName": "time", + "type": "number" }, { - name: 'contract', - baseName: 'contract', - type: 'string', + "name": "contract", + "baseName": "contract", + "type": "string" }, { - name: 'profit', - baseName: 'profit', - type: 'string', + "name": "profit", + "baseName": "profit", + "type": "string" }, { - name: 'fee', - baseName: 'fee', - type: 'string', + "name": "fee", + "baseName": "fee", + "type": "string" }, { - name: 'strikePrice', - baseName: 'strike_price', - type: 'string', + "name": "strikePrice", + "baseName": "strike_price", + "type": "string" }, { - name: 'settlePrice', - baseName: 'settle_price', - type: 'string', - }, - ]; + "name": "settlePrice", + "baseName": "settle_price", + "type": "string" + } ]; static getAttributeTypeMap() { return OptionsSettlement.attributeTypeMap; } } + diff --git a/model/optionsTicker.ts b/model/optionsTicker.ts index af2c7cb..56e08f8 100644 --- a/model/optionsTicker.ts +++ b/model/optionsTicker.ts @@ -9,179 +9,180 @@ * Do not edit the class manually. */ + /** - * Options contract detail - */ +* Options contract detail +*/ export class OptionsTicker { /** - * Options contract name - */ + * Options contract name + */ 'name'?: string; /** - * Last trading price (quote currency) - */ + * Last trading price (quote currency) + */ 'lastPrice'?: string; /** - * Current mark price (quote currency) - */ + * Current mark price (quote currency) + */ 'markPrice'?: string; /** - * Current index price (quote currency) - */ + * Current index price (quote currency) + */ 'indexPrice'?: string; /** - * Best ask size - */ + * Best ask size + */ 'ask1Size'?: number; /** - * Best ask price - */ + * Best ask price + */ 'ask1Price'?: string; /** - * Best bid size - */ + * Best bid size + */ 'bid1Size'?: number; /** - * Best bid price - */ + * Best bid price + */ 'bid1Price'?: string; /** - * Current total long position size - */ + * Current total long position size + */ 'positionSize'?: number; /** - * Implied volatility - */ + * Implied volatility + */ 'markIv'?: string; /** - * Bid side implied volatility - */ + * Bid side implied volatility + */ 'bidIv'?: string; /** - * Ask side implied volatility - */ + * Ask side implied volatility + */ 'askIv'?: string; /** - * Current leverage. Formula: underlying_price / mark_price * delta - */ + * Current leverage. Formula: underlying_price / mark_price * delta + */ 'leverage'?: string; /** - * Delta - */ + * Delta + */ 'delta'?: string; /** - * Gamma - */ + * Gamma + */ 'gamma'?: string; /** - * Vega - */ + * Vega + */ 'vega'?: string; /** - * Theta - */ + * Theta + */ 'theta'?: string; /** - * Rho - */ + * Rho + */ 'rho'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'name', - baseName: 'name', - type: 'string', + "name": "name", + "baseName": "name", + "type": "string" }, { - name: 'lastPrice', - baseName: 'last_price', - type: 'string', + "name": "lastPrice", + "baseName": "last_price", + "type": "string" }, { - name: 'markPrice', - baseName: 'mark_price', - type: 'string', + "name": "markPrice", + "baseName": "mark_price", + "type": "string" }, { - name: 'indexPrice', - baseName: 'index_price', - type: 'string', + "name": "indexPrice", + "baseName": "index_price", + "type": "string" }, { - name: 'ask1Size', - baseName: 'ask1_size', - type: 'number', + "name": "ask1Size", + "baseName": "ask1_size", + "type": "number" }, { - name: 'ask1Price', - baseName: 'ask1_price', - type: 'string', + "name": "ask1Price", + "baseName": "ask1_price", + "type": "string" }, { - name: 'bid1Size', - baseName: 'bid1_size', - type: 'number', + "name": "bid1Size", + "baseName": "bid1_size", + "type": "number" }, { - name: 'bid1Price', - baseName: 'bid1_price', - type: 'string', + "name": "bid1Price", + "baseName": "bid1_price", + "type": "string" }, { - name: 'positionSize', - baseName: 'position_size', - type: 'number', + "name": "positionSize", + "baseName": "position_size", + "type": "number" }, { - name: 'markIv', - baseName: 'mark_iv', - type: 'string', + "name": "markIv", + "baseName": "mark_iv", + "type": "string" }, { - name: 'bidIv', - baseName: 'bid_iv', - type: 'string', + "name": "bidIv", + "baseName": "bid_iv", + "type": "string" }, { - name: 'askIv', - baseName: 'ask_iv', - type: 'string', + "name": "askIv", + "baseName": "ask_iv", + "type": "string" }, { - name: 'leverage', - baseName: 'leverage', - type: 'string', + "name": "leverage", + "baseName": "leverage", + "type": "string" }, { - name: 'delta', - baseName: 'delta', - type: 'string', + "name": "delta", + "baseName": "delta", + "type": "string" }, { - name: 'gamma', - baseName: 'gamma', - type: 'string', + "name": "gamma", + "baseName": "gamma", + "type": "string" }, { - name: 'vega', - baseName: 'vega', - type: 'string', + "name": "vega", + "baseName": "vega", + "type": "string" }, { - name: 'theta', - baseName: 'theta', - type: 'string', + "name": "theta", + "baseName": "theta", + "type": "string" }, { - name: 'rho', - baseName: 'rho', - type: 'string', - }, - ]; + "name": "rho", + "baseName": "rho", + "type": "string" + } ]; static getAttributeTypeMap() { return OptionsTicker.attributeTypeMap; } } + diff --git a/model/optionsUnderlying.ts b/model/optionsUnderlying.ts index 3814d1d..203dbbf 100644 --- a/model/optionsUnderlying.ts +++ b/model/optionsUnderlying.ts @@ -9,32 +9,33 @@ * Do not edit the class manually. */ + export class OptionsUnderlying { /** - * Underlying name - */ + * Underlying name + */ 'name'?: string; /** - * Spot index price (quote currency) - */ + * Spot index price (quote currency) + */ 'indexPrice'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'name', - baseName: 'name', - type: 'string', + "name": "name", + "baseName": "name", + "type": "string" }, { - name: 'indexPrice', - baseName: 'index_price', - type: 'string', - }, - ]; + "name": "indexPrice", + "baseName": "index_price", + "type": "string" + } ]; static getAttributeTypeMap() { return OptionsUnderlying.attributeTypeMap; } } + diff --git a/model/optionsUnderlyingTicker.ts b/model/optionsUnderlyingTicker.ts index 17a818d..3c9b7c0 100644 --- a/model/optionsUnderlyingTicker.ts +++ b/model/optionsUnderlyingTicker.ts @@ -9,44 +9,45 @@ * Do not edit the class manually. */ + /** - * Options underlying detail - */ +* Options underlying detail +*/ export class OptionsUnderlyingTicker { /** - * Total put options trades amount in last 24h - */ + * Total put options trades amount in last 24h + */ 'tradePut'?: number; /** - * Total call options trades amount in last 24h - */ + * Total call options trades amount in last 24h + */ 'tradeCall'?: number; /** - * Index price (quote currency) - */ + * Index price (quote currency) + */ 'indexPrice'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'tradePut', - baseName: 'trade_put', - type: 'number', + "name": "tradePut", + "baseName": "trade_put", + "type": "number" }, { - name: 'tradeCall', - baseName: 'trade_call', - type: 'number', + "name": "tradeCall", + "baseName": "trade_call", + "type": "number" }, { - name: 'indexPrice', - baseName: 'index_price', - type: 'string', - }, - ]; + "name": "indexPrice", + "baseName": "index_price", + "type": "string" + } ]; static getAttributeTypeMap() { return OptionsUnderlyingTicker.attributeTypeMap; } } + diff --git a/model/order.ts b/model/order.ts index beb10c8..99de223 100644 --- a/model/order.ts +++ b/model/order.ts @@ -9,339 +9,339 @@ * Do not edit the class manually. */ + /** - * Spot order details - */ +* Spot order details +*/ export class Order { /** - * Order ID - */ + * Order ID + */ 'id'?: string; /** - * 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 - */ + * 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 + */ 'text'?: string; /** - * The custom data that the user remarked when amending the order - */ + * The custom data that the user remarked when amending the order + */ 'amendText'?: string; /** - * Creation time of order - */ + * Creation time of order + */ 'createTime'?: string; /** - * Last modification time of order - */ + * Last modification time of order + */ 'updateTime'?: string; /** - * Creation time of order (in milliseconds) - */ + * Creation time of order (in milliseconds) + */ 'createTimeMs'?: number; /** - * Last modification time of order (in milliseconds) - */ + * Last modification time of order (in milliseconds) + */ 'updateTimeMs'?: number; /** - * Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled - */ + * Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled + */ 'status'?: Order.Status; /** - * Currency pair - */ + * Currency pair + */ 'currencyPair': string; /** - * Order Type - limit : Limit Order - market : Market Order - */ + * Order Type - limit : Limit Order - market : Market Order + */ 'type'?: Order.Type; /** - * Account types, spot - spot account, margin - margin account, unified - unified account, cross_margin - cross margin account. Portfolio margin accounts can only be set to `cross_margin` - */ + * Account types, spot - spot account, margin - margin account, unified - unified account, cross_margin - cross margin account. Portfolio margin accounts can only be set to `cross_margin` + */ 'account'?: string; /** - * Order side - */ + * Order side + */ 'side': Order.Side; /** - * 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` - */ + * 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` + */ 'amount': string; /** - * Price can\'t be empty when `type`= `limit` - */ + * Price can\'t be empty when `type`= `limit` + */ 'price'?: string; /** - * 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` - */ + * 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` + */ 'timeInForce'?: Order.TimeInForce; /** - * Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. - */ + * Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. + */ 'iceberg'?: string; /** - * Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. - */ + * Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. + */ 'autoBorrow'?: boolean; /** - * 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. - */ + * 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. + */ 'autoRepay'?: boolean; /** - * Amount left to fill - */ + * Amount left to fill + */ 'left'?: string; /** - * Amount traded to fill - */ + * Amount traded to fill + */ 'filledAmount'?: string; /** - * Total filled in quote currency. Deprecated in favor of `filled_total` - */ + * Total filled in quote currency. Deprecated in favor of `filled_total` + */ 'fillPrice'?: string; /** - * Total filled in quote currency - */ + * Total filled in quote currency + */ 'filledTotal'?: string; /** - * Average fill price - */ + * Average fill price + */ 'avgDealPrice'?: string; /** - * Fee deducted - */ + * Fee deducted + */ 'fee'?: string; /** - * Fee currency unit - */ + * Fee currency unit + */ 'feeCurrency'?: string; /** - * Points used to deduct fee - */ + * Points used to deduct fee + */ 'pointFee'?: string; /** - * GT used to deduct fee - */ + * GT used to deduct fee + */ 'gtFee'?: string; /** - * GT used to deduct maker fee - */ + * GT used to deduct maker fee + */ 'gtMakerFee'?: string; /** - * GT used to deduct taker fee - */ + * GT used to deduct taker fee + */ 'gtTakerFee'?: string; /** - * Whether GT fee discount is used - */ + * Whether GT fee discount is used + */ 'gtDiscount'?: boolean; /** - * Rebated fee - */ + * Rebated fee + */ 'rebatedFee'?: string; /** - * Rebated fee currency unit - */ + * Rebated fee currency unit + */ 'rebatedFeeCurrency'?: string; /** - * 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` - */ + * 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` + */ 'stpId'?: number; /** - * 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 - */ + * 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 + */ 'stpAct'?: Order.StpAct; /** - * 订单结束方式,包括: - open: 等待处理 - filled: 完全成交 - cancelled: 用户撤销 - liquidate_cancelled: 爆仓撤销 - small: 订单数量太小 - depth_not_enough: 深度不足导致撤单 - trader_not_enough: 对手方不足导致撤单 - ioc: 未立即成交,因为 tif 设置为 ioc - poc: 未满足挂单策略,因为 tif 设置为 poc - fok: 未立即完全成交,因为 tif 设置为 fok - stp: 订单发生自成交限制而被撤销 - unknown: 未知 - */ + * 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 + */ 'finishAs'?: Order.FinishAs; /** - * 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) - */ + * 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) + */ 'actionMode'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'string', + "name": "id", + "baseName": "id", + "type": "string" }, { - name: 'text', - baseName: 'text', - type: 'string', + "name": "text", + "baseName": "text", + "type": "string" }, { - name: 'amendText', - baseName: 'amend_text', - type: 'string', + "name": "amendText", + "baseName": "amend_text", + "type": "string" }, { - name: 'createTime', - baseName: 'create_time', - type: 'string', + "name": "createTime", + "baseName": "create_time", + "type": "string" }, { - name: 'updateTime', - baseName: 'update_time', - type: 'string', + "name": "updateTime", + "baseName": "update_time", + "type": "string" }, { - name: 'createTimeMs', - baseName: 'create_time_ms', - type: 'number', + "name": "createTimeMs", + "baseName": "create_time_ms", + "type": "number" }, { - name: 'updateTimeMs', - baseName: 'update_time_ms', - type: 'number', + "name": "updateTimeMs", + "baseName": "update_time_ms", + "type": "number" }, { - name: 'status', - baseName: 'status', - type: 'Order.Status', + "name": "status", + "baseName": "status", + "type": "Order.Status" }, { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" }, { - name: 'type', - baseName: 'type', - type: 'Order.Type', + "name": "type", + "baseName": "type", + "type": "Order.Type" }, { - name: 'account', - baseName: 'account', - type: 'string', + "name": "account", + "baseName": "account", + "type": "string" }, { - name: 'side', - baseName: 'side', - type: 'Order.Side', + "name": "side", + "baseName": "side", + "type": "Order.Side" }, { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'price', - baseName: 'price', - type: 'string', + "name": "price", + "baseName": "price", + "type": "string" }, { - name: 'timeInForce', - baseName: 'time_in_force', - type: 'Order.TimeInForce', + "name": "timeInForce", + "baseName": "time_in_force", + "type": "Order.TimeInForce" }, { - name: 'iceberg', - baseName: 'iceberg', - type: 'string', + "name": "iceberg", + "baseName": "iceberg", + "type": "string" }, { - name: 'autoBorrow', - baseName: 'auto_borrow', - type: 'boolean', + "name": "autoBorrow", + "baseName": "auto_borrow", + "type": "boolean" }, { - name: 'autoRepay', - baseName: 'auto_repay', - type: 'boolean', + "name": "autoRepay", + "baseName": "auto_repay", + "type": "boolean" }, { - name: 'left', - baseName: 'left', - type: 'string', + "name": "left", + "baseName": "left", + "type": "string" }, { - name: 'filledAmount', - baseName: 'filled_amount', - type: 'string', + "name": "filledAmount", + "baseName": "filled_amount", + "type": "string" }, { - name: 'fillPrice', - baseName: 'fill_price', - type: 'string', + "name": "fillPrice", + "baseName": "fill_price", + "type": "string" }, { - name: 'filledTotal', - baseName: 'filled_total', - type: 'string', + "name": "filledTotal", + "baseName": "filled_total", + "type": "string" }, { - name: 'avgDealPrice', - baseName: 'avg_deal_price', - type: 'string', + "name": "avgDealPrice", + "baseName": "avg_deal_price", + "type": "string" }, { - name: 'fee', - baseName: 'fee', - type: 'string', + "name": "fee", + "baseName": "fee", + "type": "string" }, { - name: 'feeCurrency', - baseName: 'fee_currency', - type: 'string', + "name": "feeCurrency", + "baseName": "fee_currency", + "type": "string" }, { - name: 'pointFee', - baseName: 'point_fee', - type: 'string', + "name": "pointFee", + "baseName": "point_fee", + "type": "string" }, { - name: 'gtFee', - baseName: 'gt_fee', - type: 'string', + "name": "gtFee", + "baseName": "gt_fee", + "type": "string" }, { - name: 'gtMakerFee', - baseName: 'gt_maker_fee', - type: 'string', + "name": "gtMakerFee", + "baseName": "gt_maker_fee", + "type": "string" }, { - name: 'gtTakerFee', - baseName: 'gt_taker_fee', - type: 'string', + "name": "gtTakerFee", + "baseName": "gt_taker_fee", + "type": "string" }, { - name: 'gtDiscount', - baseName: 'gt_discount', - type: 'boolean', + "name": "gtDiscount", + "baseName": "gt_discount", + "type": "boolean" }, { - name: 'rebatedFee', - baseName: 'rebated_fee', - type: 'string', + "name": "rebatedFee", + "baseName": "rebated_fee", + "type": "string" }, { - name: 'rebatedFeeCurrency', - baseName: 'rebated_fee_currency', - type: 'string', + "name": "rebatedFeeCurrency", + "baseName": "rebated_fee_currency", + "type": "string" }, { - name: 'stpId', - baseName: 'stp_id', - type: 'number', + "name": "stpId", + "baseName": "stp_id", + "type": "number" }, { - name: 'stpAct', - baseName: 'stp_act', - type: 'Order.StpAct', + "name": "stpAct", + "baseName": "stp_act", + "type": "Order.StpAct" }, { - name: 'finishAs', - baseName: 'finish_as', - type: 'Order.FinishAs', + "name": "finishAs", + "baseName": "finish_as", + "type": "Order.FinishAs" }, { - name: 'actionMode', - baseName: 'action_mode', - type: 'string', - }, - ]; + "name": "actionMode", + "baseName": "action_mode", + "type": "string" + } ]; static getAttributeTypeMap() { return Order.attributeTypeMap; @@ -350,42 +350,42 @@ export class Order { export namespace Order { export enum Status { - Open = 'open', - Closed = 'closed', - Cancelled = 'cancelled', + Open = 'open', + Closed = 'closed', + Cancelled = 'cancelled' } export enum Type { - Limit = 'limit', - Market = 'market', + Limit = 'limit', + Market = 'market' } export enum Side { - Buy = 'buy', - Sell = 'sell', + Buy = 'buy', + Sell = 'sell' } export enum TimeInForce { - Gtc = 'gtc', - Ioc = 'ioc', - Poc = 'poc', - Fok = 'fok', + Gtc = 'gtc', + Ioc = 'ioc', + Poc = 'poc', + Fok = 'fok' } export enum StpAct { - Cn = 'cn', - Co = 'co', - Cb = 'cb', - Minus = '-', + Cn = 'cn', + Co = 'co', + Cb = 'cb', + Minus = '-' } export enum FinishAs { - Open = 'open', - Filled = 'filled', - Cancelled = 'cancelled', - LiquidateCancelled = 'liquidate_cancelled', - DepthNotEnough = 'depth_not_enough', - TraderNotEnough = 'trader_not_enough', - Small = 'small', - Ioc = 'ioc', - Poc = 'poc', - Fok = 'fok', - Stp = 'stp', - Unknown = 'unknown', + Open = 'open', + Filled = 'filled', + Cancelled = 'cancelled', + LiquidateCancelled = 'liquidate_cancelled', + DepthNotEnough = 'depth_not_enough', + TraderNotEnough = 'trader_not_enough', + Small = 'small', + Ioc = 'ioc', + Poc = 'poc', + Fok = 'fok', + Stp = 'stp', + Unknown = 'unknown' } } diff --git a/model/orderBook.ts b/model/orderBook.ts index 3297d1d..d0ca8db 100644 --- a/model/orderBook.ts +++ b/model/orderBook.ts @@ -9,59 +9,60 @@ * Do not edit the class manually. */ + export class OrderBook { /** - * Order book ID, which is updated whenever the order book is changed. Valid only when `with_id` is set to `true` - */ + * Order book ID, which is updated whenever the order book is changed. Valid only when `with_id` is set to `true` + */ 'id'?: number; /** - * The timestamp of the response data being generated (in milliseconds) - */ + * The timestamp of the response data being generated (in milliseconds) + */ 'current'?: number; /** - * The timestamp of when the orderbook last changed (in milliseconds) - */ + * The timestamp of when the orderbook last changed (in milliseconds) + */ 'update'?: number; /** - * Asks order depth - */ + * Asks order depth + */ 'asks': Array>; /** - * Bids order depth - */ + * Bids order depth + */ 'bids': Array>; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'number', + "name": "id", + "baseName": "id", + "type": "number" }, { - name: 'current', - baseName: 'current', - type: 'number', + "name": "current", + "baseName": "current", + "type": "number" }, { - name: 'update', - baseName: 'update', - type: 'number', + "name": "update", + "baseName": "update", + "type": "number" }, { - name: 'asks', - baseName: 'asks', - type: 'Array>', + "name": "asks", + "baseName": "asks", + "type": "Array>" }, { - name: 'bids', - baseName: 'bids', - type: 'Array>', - }, - ]; + "name": "bids", + "baseName": "bids", + "type": "Array>" + } ]; static getAttributeTypeMap() { return OrderBook.attributeTypeMap; } } + diff --git a/model/orderCancel.ts b/model/orderCancel.ts index 3d568bd..3ef0304 100644 --- a/model/orderCancel.ts +++ b/model/orderCancel.ts @@ -9,366 +9,366 @@ * Do not edit the class manually. */ + /** - * Spot order details - */ +* Spot order details +*/ export class OrderCancel { /** - * Order ID - */ + * Order ID + */ 'id'?: string; /** - * 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 - */ + * 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 + */ 'text'?: string; /** - * The custom data that the user remarked when amending the order - */ + * The custom data that the user remarked when amending the order + */ 'amendText'?: string; /** - * Whether the batch of orders succeeded - */ + * Whether the batch of orders succeeded + */ 'succeeded'?: boolean; /** - * Error label, if any, otherwise an empty string - */ + * Error label, if any, otherwise an empty string + */ 'label'?: string; /** - * Detailed error message, if any, otherwise an empty string - */ + * Detailed error message, if any, otherwise an empty string + */ 'message'?: string; /** - * Creation time of order - */ + * Creation time of order + */ 'createTime'?: string; /** - * Last modification time of order - */ + * Last modification time of order + */ 'updateTime'?: string; /** - * Creation time of order (in milliseconds) - */ + * Creation time of order (in milliseconds) + */ 'createTimeMs'?: number; /** - * Last modification time of order (in milliseconds) - */ + * Last modification time of order (in milliseconds) + */ 'updateTimeMs'?: number; /** - * Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled - */ + * Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled + */ 'status'?: OrderCancel.Status; /** - * Currency pair - */ + * Currency pair + */ 'currencyPair': string; /** - * Order Type - limit : Limit Order - market : Market Order - */ + * Order Type - limit : Limit Order - market : Market Order + */ 'type'?: OrderCancel.Type; /** - * Account types, spot - spot account, margin - margin account, unified - unified account, cross_margin - cross margin account. Portfolio margin accounts can only be set to `cross_margin` - */ + * Account types, spot - spot account, margin - margin account, unified - unified account, cross_margin - cross margin account. Portfolio margin accounts can only be set to `cross_margin` + */ 'account'?: string; /** - * Order side - */ + * Order side + */ 'side': OrderCancel.Side; /** - * 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` - */ + * 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` + */ 'amount': string; /** - * Price can\'t be empty when `type`= `limit` - */ + * Price can\'t be empty when `type`= `limit` + */ 'price'?: string; /** - * 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` - */ + * 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` + */ 'timeInForce'?: OrderCancel.TimeInForce; /** - * Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. - */ + * Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported. + */ 'iceberg'?: string; /** - * Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. - */ + * Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough. + */ 'autoBorrow'?: boolean; /** - * 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. - */ + * 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. + */ 'autoRepay'?: boolean; /** - * Amount left to fill - */ + * Amount left to fill + */ 'left'?: string; /** - * Amount traded to fill - */ + * Amount traded to fill + */ 'filledAmount'?: string; /** - * Total filled in quote currency. Deprecated in favor of `filled_total` - */ + * Total filled in quote currency. Deprecated in favor of `filled_total` + */ 'fillPrice'?: string; /** - * Total filled in quote currency - */ + * Total filled in quote currency + */ 'filledTotal'?: string; /** - * Average fill price - */ + * Average fill price + */ 'avgDealPrice'?: string; /** - * Fee deducted - */ + * Fee deducted + */ 'fee'?: string; /** - * Fee currency unit - */ + * Fee currency unit + */ 'feeCurrency'?: string; /** - * Points used to deduct fee - */ + * Points used to deduct fee + */ 'pointFee'?: string; /** - * GT used to deduct fee - */ + * GT used to deduct fee + */ 'gtFee'?: string; /** - * GT used to deduct maker fee - */ + * GT used to deduct maker fee + */ 'gtMakerFee'?: string; /** - * GT used to deduct taker fee - */ + * GT used to deduct taker fee + */ 'gtTakerFee'?: string; /** - * Whether GT fee discount is used - */ + * Whether GT fee discount is used + */ 'gtDiscount'?: boolean; /** - * Rebated fee - */ + * Rebated fee + */ 'rebatedFee'?: string; /** - * Rebated fee currency unit - */ + * Rebated fee currency unit + */ 'rebatedFeeCurrency'?: string; /** - * 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` - */ + * 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` + */ 'stpId'?: number; /** - * 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 - */ + * 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 + */ 'stpAct'?: OrderCancel.StpAct; /** - * 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 - */ + * 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 + */ 'finishAs'?: OrderCancel.FinishAs; /** - * 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) - */ + * 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) + */ 'actionMode'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'string', + "name": "id", + "baseName": "id", + "type": "string" }, { - name: 'text', - baseName: 'text', - type: 'string', + "name": "text", + "baseName": "text", + "type": "string" }, { - name: 'amendText', - baseName: 'amend_text', - type: 'string', + "name": "amendText", + "baseName": "amend_text", + "type": "string" }, { - name: 'succeeded', - baseName: 'succeeded', - type: 'boolean', + "name": "succeeded", + "baseName": "succeeded", + "type": "boolean" }, { - name: 'label', - baseName: 'label', - type: 'string', + "name": "label", + "baseName": "label", + "type": "string" }, { - name: 'message', - baseName: 'message', - type: 'string', + "name": "message", + "baseName": "message", + "type": "string" }, { - name: 'createTime', - baseName: 'create_time', - type: 'string', + "name": "createTime", + "baseName": "create_time", + "type": "string" }, { - name: 'updateTime', - baseName: 'update_time', - type: 'string', + "name": "updateTime", + "baseName": "update_time", + "type": "string" }, { - name: 'createTimeMs', - baseName: 'create_time_ms', - type: 'number', + "name": "createTimeMs", + "baseName": "create_time_ms", + "type": "number" }, { - name: 'updateTimeMs', - baseName: 'update_time_ms', - type: 'number', + "name": "updateTimeMs", + "baseName": "update_time_ms", + "type": "number" }, { - name: 'status', - baseName: 'status', - type: 'OrderCancel.Status', + "name": "status", + "baseName": "status", + "type": "OrderCancel.Status" }, { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" }, { - name: 'type', - baseName: 'type', - type: 'OrderCancel.Type', + "name": "type", + "baseName": "type", + "type": "OrderCancel.Type" }, { - name: 'account', - baseName: 'account', - type: 'string', + "name": "account", + "baseName": "account", + "type": "string" }, { - name: 'side', - baseName: 'side', - type: 'OrderCancel.Side', + "name": "side", + "baseName": "side", + "type": "OrderCancel.Side" }, { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'price', - baseName: 'price', - type: 'string', + "name": "price", + "baseName": "price", + "type": "string" }, { - name: 'timeInForce', - baseName: 'time_in_force', - type: 'OrderCancel.TimeInForce', + "name": "timeInForce", + "baseName": "time_in_force", + "type": "OrderCancel.TimeInForce" }, { - name: 'iceberg', - baseName: 'iceberg', - type: 'string', + "name": "iceberg", + "baseName": "iceberg", + "type": "string" }, { - name: 'autoBorrow', - baseName: 'auto_borrow', - type: 'boolean', + "name": "autoBorrow", + "baseName": "auto_borrow", + "type": "boolean" }, { - name: 'autoRepay', - baseName: 'auto_repay', - type: 'boolean', + "name": "autoRepay", + "baseName": "auto_repay", + "type": "boolean" }, { - name: 'left', - baseName: 'left', - type: 'string', + "name": "left", + "baseName": "left", + "type": "string" }, { - name: 'filledAmount', - baseName: 'filled_amount', - type: 'string', + "name": "filledAmount", + "baseName": "filled_amount", + "type": "string" }, { - name: 'fillPrice', - baseName: 'fill_price', - type: 'string', + "name": "fillPrice", + "baseName": "fill_price", + "type": "string" }, { - name: 'filledTotal', - baseName: 'filled_total', - type: 'string', + "name": "filledTotal", + "baseName": "filled_total", + "type": "string" }, { - name: 'avgDealPrice', - baseName: 'avg_deal_price', - type: 'string', + "name": "avgDealPrice", + "baseName": "avg_deal_price", + "type": "string" }, { - name: 'fee', - baseName: 'fee', - type: 'string', + "name": "fee", + "baseName": "fee", + "type": "string" }, { - name: 'feeCurrency', - baseName: 'fee_currency', - type: 'string', + "name": "feeCurrency", + "baseName": "fee_currency", + "type": "string" }, { - name: 'pointFee', - baseName: 'point_fee', - type: 'string', + "name": "pointFee", + "baseName": "point_fee", + "type": "string" }, { - name: 'gtFee', - baseName: 'gt_fee', - type: 'string', + "name": "gtFee", + "baseName": "gt_fee", + "type": "string" }, { - name: 'gtMakerFee', - baseName: 'gt_maker_fee', - type: 'string', + "name": "gtMakerFee", + "baseName": "gt_maker_fee", + "type": "string" }, { - name: 'gtTakerFee', - baseName: 'gt_taker_fee', - type: 'string', + "name": "gtTakerFee", + "baseName": "gt_taker_fee", + "type": "string" }, { - name: 'gtDiscount', - baseName: 'gt_discount', - type: 'boolean', + "name": "gtDiscount", + "baseName": "gt_discount", + "type": "boolean" }, { - name: 'rebatedFee', - baseName: 'rebated_fee', - type: 'string', + "name": "rebatedFee", + "baseName": "rebated_fee", + "type": "string" }, { - name: 'rebatedFeeCurrency', - baseName: 'rebated_fee_currency', - type: 'string', + "name": "rebatedFeeCurrency", + "baseName": "rebated_fee_currency", + "type": "string" }, { - name: 'stpId', - baseName: 'stp_id', - type: 'number', + "name": "stpId", + "baseName": "stp_id", + "type": "number" }, { - name: 'stpAct', - baseName: 'stp_act', - type: 'OrderCancel.StpAct', + "name": "stpAct", + "baseName": "stp_act", + "type": "OrderCancel.StpAct" }, { - name: 'finishAs', - baseName: 'finish_as', - type: 'OrderCancel.FinishAs', + "name": "finishAs", + "baseName": "finish_as", + "type": "OrderCancel.FinishAs" }, { - name: 'actionMode', - baseName: 'action_mode', - type: 'string', - }, - ]; + "name": "actionMode", + "baseName": "action_mode", + "type": "string" + } ]; static getAttributeTypeMap() { return OrderCancel.attributeTypeMap; @@ -377,35 +377,35 @@ export class OrderCancel { export namespace OrderCancel { export enum Status { - Open = 'open', - Closed = 'closed', - Cancelled = 'cancelled', + Open = 'open', + Closed = 'closed', + Cancelled = 'cancelled' } export enum Type { - Limit = 'limit', - Market = 'market', + Limit = 'limit', + Market = 'market' } export enum Side { - Buy = 'buy', - Sell = 'sell', + Buy = 'buy', + Sell = 'sell' } export enum TimeInForce { - Gtc = 'gtc', - Ioc = 'ioc', - Poc = 'poc', - Fok = 'fok', + Gtc = 'gtc', + Ioc = 'ioc', + Poc = 'poc', + Fok = 'fok' } export enum StpAct { - Cn = 'cn', - Co = 'co', - Cb = 'cb', - Minus = '-', + Cn = 'cn', + Co = 'co', + Cb = 'cb', + Minus = '-' } export enum FinishAs { - Open = 'open', - Filled = 'filled', - Cancelled = 'cancelled', - Ioc = 'ioc', - Stp = 'stp', + Open = 'open', + Filled = 'filled', + Cancelled = 'cancelled', + Ioc = 'ioc', + Stp = 'stp' } } diff --git a/model/orderPatch.ts b/model/orderPatch.ts index d4e8625..6c72e9d 100644 --- a/model/orderPatch.ts +++ b/model/orderPatch.ts @@ -9,71 +9,72 @@ * Do not edit the class manually. */ + /** - * Spot order details - */ +* Spot order details +*/ export class OrderPatch { /** - * Currency pair - */ + * Currency pair + */ 'currencyPair'?: string; /** - * 指定查询账户。 - */ + * Specify query account. + */ 'account'?: string; /** - * New order amount. `amount` and `price` must specify one of them - */ + * New order amount. `amount` and `price` must specify one of them + */ 'amount'?: string; /** - * New order price. `amount` and `Price` must specify one of them\" - */ + * New order price. `amount` and `Price` must specify one of them\" + */ 'price'?: string; /** - * Custom info during amending order - */ + * Custom info during amending order + */ 'amendText'?: string; /** - * 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) - */ + * 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) + */ 'actionMode'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" }, { - name: 'account', - baseName: 'account', - type: 'string', + "name": "account", + "baseName": "account", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'price', - baseName: 'price', - type: 'string', + "name": "price", + "baseName": "price", + "type": "string" }, { - name: 'amendText', - baseName: 'amend_text', - type: 'string', + "name": "amendText", + "baseName": "amend_text", + "type": "string" }, { - name: 'actionMode', - baseName: 'action_mode', - type: 'string', - }, - ]; + "name": "actionMode", + "baseName": "action_mode", + "type": "string" + } ]; static getAttributeTypeMap() { return OrderPatch.attributeTypeMap; } } + diff --git a/model/orderResp.ts b/model/orderResp.ts index fc99722..b006e37 100644 --- a/model/orderResp.ts +++ b/model/orderResp.ts @@ -9,23 +9,24 @@ * Do not edit the class manually. */ + export class OrderResp { /** - * Order ID - */ + * Order ID + */ 'orderId'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'orderId', - baseName: 'order_id', - type: 'number', - }, - ]; + "name": "orderId", + "baseName": "order_id", + "type": "number" + } ]; static getAttributeTypeMap() { return OrderResp.attributeTypeMap; } } + diff --git a/model/partnerCommissionHistory.ts b/model/partnerCommissionHistory.ts index efe91bd..f1ad3ae 100644 --- a/model/partnerCommissionHistory.ts +++ b/model/partnerCommissionHistory.ts @@ -13,30 +13,30 @@ import { AgencyCommission } from './agencyCommission'; export class PartnerCommissionHistory { /** - * Total - */ + * Total + */ 'total'?: number; /** - * List of comission history - */ + * List of comission history + */ 'list'?: Array; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'total', - baseName: 'total', - type: 'number', + "name": "total", + "baseName": "total", + "type": "number" }, { - name: 'list', - baseName: 'list', - type: 'Array', - }, - ]; + "name": "list", + "baseName": "list", + "type": "Array" + } ]; static getAttributeTypeMap() { return PartnerCommissionHistory.attributeTypeMap; } } + diff --git a/model/partnerSub.ts b/model/partnerSub.ts index 7794228..287a727 100644 --- a/model/partnerSub.ts +++ b/model/partnerSub.ts @@ -9,41 +9,42 @@ * Do not edit the class manually. */ + export class PartnerSub { /** - * User ID - */ + * User ID + */ 'userId'?: number; /** - * 用户加入体系的时间,秒级 Unix 时间戳 - */ + * The time when the user joined the system, in seconds Unix timestamp + */ 'userJoinTime'?: number; /** - * 类型(1-子代理 2-间接直客 3-直接直客) - */ + * Type (1-Sub-agent 2-Indirect Customer 3-Direct Customer) + */ 'type'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'userId', - baseName: 'user_id', - type: 'number', + "name": "userId", + "baseName": "user_id", + "type": "number" }, { - name: 'userJoinTime', - baseName: 'user_join_time', - type: 'number', + "name": "userJoinTime", + "baseName": "user_join_time", + "type": "number" }, { - name: 'type', - baseName: 'type', - type: 'number', - }, - ]; + "name": "type", + "baseName": "type", + "type": "number" + } ]; static getAttributeTypeMap() { return PartnerSub.attributeTypeMap; } } + diff --git a/model/partnerSubList.ts b/model/partnerSubList.ts index fd41756..c51d9d3 100644 --- a/model/partnerSubList.ts +++ b/model/partnerSubList.ts @@ -13,30 +13,30 @@ import { PartnerSub } from './partnerSub'; export class PartnerSubList { /** - * Total - */ + * Total + */ 'total'?: number; /** - * 下级列表 - */ + * Subordinate list + */ 'list'?: Array; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'total', - baseName: 'total', - type: 'number', + "name": "total", + "baseName": "total", + "type": "number" }, { - name: 'list', - baseName: 'list', - type: 'Array', - }, - ]; + "name": "list", + "baseName": "list", + "type": "Array" + } ]; static getAttributeTypeMap() { return PartnerSubList.attributeTypeMap; } } + diff --git a/model/partnerTransactionHistory.ts b/model/partnerTransactionHistory.ts index 0a1e4cf..0664291 100644 --- a/model/partnerTransactionHistory.ts +++ b/model/partnerTransactionHistory.ts @@ -13,30 +13,30 @@ import { AgencyTransaction } from './agencyTransaction'; export class PartnerTransactionHistory { /** - * Total - */ + * Total + */ 'total'?: number; /** - * List of transaction history - */ + * List of transaction history + */ 'list'?: Array; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'total', - baseName: 'total', - type: 'number', + "name": "total", + "baseName": "total", + "type": "number" }, { - name: 'list', - baseName: 'list', - type: 'Array', - }, - ]; + "name": "list", + "baseName": "list", + "type": "Array" + } ]; static getAttributeTypeMap() { return PartnerTransactionHistory.attributeTypeMap; } } + diff --git a/model/patchUniLend.ts b/model/patchUniLend.ts index f68f837..6f57a69 100644 --- a/model/patchUniLend.ts +++ b/model/patchUniLend.ts @@ -9,32 +9,33 @@ * Do not edit the class manually. */ + export class PatchUniLend { /** - * Currency name - */ + * Currency name + */ 'currency'?: string; /** - * Minimum interest rate - */ + * Minimum interest rate + */ 'minRate'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'minRate', - baseName: 'min_rate', - type: 'string', - }, - ]; + "name": "minRate", + "baseName": "min_rate", + "type": "string" + } ]; static getAttributeTypeMap() { return PatchUniLend.attributeTypeMap; } } + diff --git a/model/placeDualInvestmentOrder.ts b/model/placeDualInvestmentOrder.ts index 6832bdc..0d2022f 100644 --- a/model/placeDualInvestmentOrder.ts +++ b/model/placeDualInvestmentOrder.ts @@ -9,53 +9,54 @@ * Do not edit the class manually. */ + /** - * Dual Investment order - */ +* Dual Investment order +*/ export class PlaceDualInvestmentOrder { /** - * Plan ID - */ + * Plan ID + */ 'planId': string; /** - * 份数,与amount 字段互斥,即将废弃.即将废弃,建议使用amount传参 - */ + * The number of copies is mutually exclusive with the amount field and will be deprecated soon. It is recommended to use the amount parameter. + */ 'copies'?: string; /** - * 是否最大申购,与amount字段互斥.即将废弃,建议使用amount传参 - */ + * Whether to purchase at the maximum. Mutually exclusive with the amount field. Will be deprecated soon. It is recommended to use the amount parameter. + */ 'isMax'?: number; /** - * 申购金额,与copies字段互斥 - */ + * Subscription amount, mutually exclusive with the copies field + */ 'amount': string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'planId', - baseName: 'plan_id', - type: 'string', + "name": "planId", + "baseName": "plan_id", + "type": "string" }, { - name: 'copies', - baseName: 'copies', - type: 'string', + "name": "copies", + "baseName": "copies", + "type": "string" }, { - name: 'isMax', - baseName: 'is_max', - type: 'number', + "name": "isMax", + "baseName": "is_max", + "type": "number" }, { - name: 'amount', - baseName: 'amount', - type: 'string', - }, - ]; + "name": "amount", + "baseName": "amount", + "type": "string" + } ]; static getAttributeTypeMap() { return PlaceDualInvestmentOrder.attributeTypeMap; } } + diff --git a/model/portfolioAccount.ts b/model/portfolioAccount.ts deleted file mode 100644 index a3cc29a..0000000 --- a/model/portfolioAccount.ts +++ /dev/null @@ -1,165 +0,0 @@ -/** - * Gate API v4 - * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. - * - * Contact: support@mail.gate.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { PortfolioMarginBalance } from './portfolioMarginBalance'; - -export class PortfolioAccount { - /** - * User ID - */ - 'userId'?: number; - /** - * Time of the most recent refresh - */ - 'refreshTime'?: number; - /** - * Whether account is locked - */ - 'locked'?: boolean; - 'balances'?: { [key: string]: PortfolioMarginBalance }; - /** - * Total account value in USDT, i.e., the sum of all currencies\' - */ - 'total'?: string; - /** - * Total borrowed value in USDT, i.e., the sum of all currencies - */ - 'borrowed'?: string; - /** - * Total unpaid interests in USDT, i.e., the sum of all currencies - */ - 'interest'?: string; - /** - * Total initial margin - */ - 'totalInitialMargin'?: string; - /** - * Total margin balance - */ - 'totalMarginBalance'?: string; - /** - * Total maintenance margin - */ - 'totalMaintenanceMargin'?: string; - /** - * Total initial margin rate - */ - 'totalInitialMarginRate'?: string; - /** - * Total maintenance margin rate - */ - 'totalMaintenanceMarginRate'?: string; - /** - * Total available margin - */ - 'totalAvailableMargin'?: string; - /** - * Total margin balance of the account - */ - 'portfolioMarginTotal'?: string; - /** - * Total liabilities of the account - */ - 'portfolioMarginTotalLiab'?: string; - /** - * Total equity of the account - */ - 'portfolioMarginTotalEquity'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ - { - name: 'userId', - baseName: 'user_id', - type: 'number', - }, - { - name: 'refreshTime', - baseName: 'refresh_time', - type: 'number', - }, - { - name: 'locked', - baseName: 'locked', - type: 'boolean', - }, - { - name: 'balances', - baseName: 'balances', - type: '{ [key: string]: PortfolioMarginBalance; }', - }, - { - name: 'total', - baseName: 'total', - type: 'string', - }, - { - name: 'borrowed', - baseName: 'borrowed', - type: 'string', - }, - { - name: 'interest', - baseName: 'interest', - type: 'string', - }, - { - name: 'totalInitialMargin', - baseName: 'total_initial_margin', - type: 'string', - }, - { - name: 'totalMarginBalance', - baseName: 'total_margin_balance', - type: 'string', - }, - { - name: 'totalMaintenanceMargin', - baseName: 'total_maintenance_margin', - type: 'string', - }, - { - name: 'totalInitialMarginRate', - baseName: 'total_initial_margin_rate', - type: 'string', - }, - { - name: 'totalMaintenanceMarginRate', - baseName: 'total_maintenance_margin_rate', - type: 'string', - }, - { - name: 'totalAvailableMargin', - baseName: 'total_available_margin', - type: 'string', - }, - { - name: 'portfolioMarginTotal', - baseName: 'portfolio_margin_total', - type: 'string', - }, - { - name: 'portfolioMarginTotalLiab', - baseName: 'portfolio_margin_total_liab', - type: 'string', - }, - { - name: 'portfolioMarginTotalEquity', - baseName: 'portfolio_margin_total_equity', - type: 'string', - }, - ]; - - static getAttributeTypeMap() { - return PortfolioAccount.attributeTypeMap; - } -} diff --git a/model/portfolioBorrowable.ts b/model/portfolioBorrowable.ts deleted file mode 100644 index 23fb60a..0000000 --- a/model/portfolioBorrowable.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Gate API v4 - * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. - * - * Contact: support@mail.gate.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export class PortfolioBorrowable { - /** - * Currency detail - */ - 'currency'?: string; - /** - * Max borrowable amount - */ - 'amount'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ - { - name: 'currency', - baseName: 'currency', - type: 'string', - }, - { - name: 'amount', - baseName: 'amount', - type: 'string', - }, - ]; - - static getAttributeTypeMap() { - return PortfolioBorrowable.attributeTypeMap; - } -} diff --git a/model/portfolioLoan.ts b/model/portfolioLoan.ts deleted file mode 100644 index 6e7482e..0000000 --- a/model/portfolioLoan.ts +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Gate API v4 - * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. - * - * Contact: support@mail.gate.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Borrow or repay - */ -export class PortfolioLoan { - /** - * Currency - */ - 'currency': string; - /** - * type: borrow - borrow, repay - repay - */ - 'type': PortfolioLoan.Type; - /** - * The amount of lending or repaying - */ - 'amount': string; - /** - * Full repayment. Repay operation only. If the value is `true`, the amount will be ignored and the loan will be repaid in full. - */ - 'repaidAll'?: boolean; - /** - * User defined custom ID - */ - 'text'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ - { - name: 'currency', - baseName: 'currency', - type: 'string', - }, - { - name: 'type', - baseName: 'type', - type: 'PortfolioLoan.Type', - }, - { - name: 'amount', - baseName: 'amount', - type: 'string', - }, - { - name: 'repaidAll', - baseName: 'repaid_all', - type: 'boolean', - }, - { - name: 'text', - baseName: 'text', - type: 'string', - }, - ]; - - static getAttributeTypeMap() { - return PortfolioLoan.attributeTypeMap; - } -} - -export namespace PortfolioLoan { - export enum Type { - Borrow = 'borrow', - Repay = 'repay', - } -} diff --git a/model/portfolioLoanRecord.ts b/model/portfolioLoanRecord.ts deleted file mode 100644 index 3fa9a34..0000000 --- a/model/portfolioLoanRecord.ts +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Gate API v4 - * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. - * - * Contact: support@mail.gate.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Loan records - */ -export class PortfolioLoanRecord { - /** - * id - */ - 'id'?: number; - /** - * type: borrow - borrow, repay - repay - */ - 'type'?: string; - /** - * Repayment type: none - no repayment type, manual_repay - manual repayment, auto_repay - automatic repayment, cancel_auto_repay - automatic repayment after cancellation - */ - 'repaymentType'?: string; - /** - * Currency pair - */ - 'currencyPair'?: string; - /** - * Currency - */ - 'currency'?: string; - /** - * The amount of lending or repaying - */ - 'amount'?: string; - /** - * Created time - */ - 'createTime'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ - { - name: 'id', - baseName: 'id', - type: 'number', - }, - { - name: 'type', - baseName: 'type', - type: 'string', - }, - { - name: 'repaymentType', - baseName: 'repayment_type', - type: 'string', - }, - { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', - }, - { - name: 'currency', - baseName: 'currency', - type: 'string', - }, - { - name: 'amount', - baseName: 'amount', - type: 'string', - }, - { - name: 'createTime', - baseName: 'create_time', - type: 'number', - }, - ]; - - static getAttributeTypeMap() { - return PortfolioLoanRecord.attributeTypeMap; - } -} diff --git a/model/portfolioMarginBalance.ts b/model/portfolioMarginBalance.ts deleted file mode 100644 index fe2b7ca..0000000 --- a/model/portfolioMarginBalance.ts +++ /dev/null @@ -1,103 +0,0 @@ -/** - * Gate API v4 - * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. - * - * Contact: support@mail.gate.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export class PortfolioMarginBalance { - /** - * Available amount - */ - 'available'?: string; - /** - * Locked amount - */ - 'freeze'?: string; - /** - * Borrowed amount - */ - 'borrowed'?: string; - /** - * Unpaid interests - */ - 'interest'?: string; - /** - * Negative Liabilities - */ - 'negativeLiab'?: string; - /** - * Borrowing to Open Positions in Futures - */ - 'futuresPosLiab'?: string; - /** - * Equity - */ - 'equity'?: string; - /** - * Total freeze - */ - 'totalFreeze'?: string; - /** - * Total liabilities - */ - 'totalLiab'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ - { - name: 'available', - baseName: 'available', - type: 'string', - }, - { - name: 'freeze', - baseName: 'freeze', - type: 'string', - }, - { - name: 'borrowed', - baseName: 'borrowed', - type: 'string', - }, - { - name: 'interest', - baseName: 'interest', - type: 'string', - }, - { - name: 'negativeLiab', - baseName: 'negative_liab', - type: 'string', - }, - { - name: 'futuresPosLiab', - baseName: 'futures_pos_liab', - type: 'string', - }, - { - name: 'equity', - baseName: 'equity', - type: 'string', - }, - { - name: 'totalFreeze', - baseName: 'total_freeze', - type: 'string', - }, - { - name: 'totalLiab', - baseName: 'total_liab', - type: 'string', - }, - ]; - - static getAttributeTypeMap() { - return PortfolioMarginBalance.attributeTypeMap; - } -} diff --git a/model/portfolioMode.ts b/model/portfolioMode.ts deleted file mode 100644 index d826df6..0000000 --- a/model/portfolioMode.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Gate API v4 - * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. - * - * Contact: support@mail.gate.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export class PortfolioMode { - /** - * Portfolio mode - cross_margin : cross margin - */ - 'mode': string; - /** - * Is it enabled? - */ - 'enabled': boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ - { - name: 'mode', - baseName: 'mode', - type: 'string', - }, - { - name: 'enabled', - baseName: 'enabled', - type: 'boolean', - }, - ]; - - static getAttributeTypeMap() { - return PortfolioMode.attributeTypeMap; - } -} diff --git a/model/portfolioTransferable.ts b/model/portfolioTransferable.ts deleted file mode 100644 index 1604de0..0000000 --- a/model/portfolioTransferable.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Gate API v4 - * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. - * - * Contact: support@mail.gate.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export class PortfolioTransferable { - /** - * Currency detail - */ - 'currency'?: string; - /** - * The maximum amount that can be transferred out - */ - 'amount'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ - { - name: 'currency', - baseName: 'currency', - type: 'string', - }, - { - name: 'amount', - baseName: 'amount', - type: 'string', - }, - ]; - - static getAttributeTypeMap() { - return PortfolioTransferable.attributeTypeMap; - } -} diff --git a/model/position.ts b/model/position.ts index 8d8f21f..1481ac9 100644 --- a/model/position.ts +++ b/model/position.ts @@ -12,290 +12,289 @@ import { PositionCloseOrder } from './positionCloseOrder'; /** - * Futures position details - */ +* Futures position details +*/ export class Position { /** - * User ID - */ + * User ID + */ 'user'?: number; /** - * Futures contract - */ + * Futures contract + */ 'contract'?: string; /** - * Position size - */ + * Position size + */ 'size'?: number; /** - * Position leverage. 0 means cross margin; positive number means isolated margin - */ + * Position leverage. 0 means cross margin; positive number means isolated margin + */ 'leverage'?: string; /** - * Position risk limit - */ + * Position risk limit + */ 'riskLimit'?: string; /** - * Maximum leverage under current risk limit - */ + * Maximum leverage under current risk limit + */ 'leverageMax'?: string; /** - * Maintenance rate under current risk limit - */ + * Maintenance rate under current risk limit + */ 'maintenanceRate'?: string; /** - * Position value calculated in settlement currency - */ + * Position value calculated in settlement currency + */ 'value'?: string; /** - * Position margin - */ + * Position margin + */ 'margin'?: string; /** - * Entry price - */ + * Entry price + */ 'entryPrice'?: string; /** - * Liquidation price - */ + * Liquidation price + */ 'liqPrice'?: string; /** - * Current mark price - */ + * Current mark price + */ 'markPrice'?: string; /** - * The initial margin occupied by the position, applicable to the portfolio margin account - */ + * The initial margin occupied by the position, applicable to the portfolio margin account + */ 'initialMargin'?: string; /** - * Maintenance margin required for the position, applicable to portfolio margin account - */ + * Maintenance margin required for the position, applicable to portfolio margin account + */ 'maintenanceMargin'?: string; /** - * Unrealized PNL - */ + * Unrealized PNL + */ 'unrealisedPnl'?: string; /** - * Realized PNL - */ + * Realized PNL + */ 'realisedPnl'?: string; /** - * Realized PNL - Position P/L - */ + * Realized PNL - Position P/L + */ 'pnlPnl'?: string; /** - * Realized PNL - Funding Fees - */ + * Realized PNL - Funding Fees + */ 'pnlFund'?: string; /** - * Realized PNL - Transaction Fees - */ + * Realized PNL - Transaction Fees + */ 'pnlFee'?: string; /** - * History realized PNL - */ + * History realized PNL + */ 'historyPnl'?: string; /** - * PNL of last position close - */ + * PNL of last position close + */ 'lastClosePnl'?: string; /** - * Realized POINT PNL - */ + * Realized POINT PNL + */ 'realisedPoint'?: string; /** - * History realized POINT PNL - */ + * History realized POINT PNL + */ 'historyPoint'?: string; /** - * 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 - */ + * 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 + */ 'adlRanking'?: number; /** - * Current open orders - */ + * Current open orders + */ 'pendingOrders'?: number; 'closeOrder'?: PositionCloseOrder | null; /** - * Position mode, including: - `single`: dual mode is not enabled- `dual_long`: long position in dual mode- `dual_short`: short position in dual mode - */ + * Position mode, including: - `single`: dual mode is not enabled- `dual_long`: long position in dual mode- `dual_short`: short position in dual mode + */ 'mode'?: Position.Mode; /** - * Cross margin leverage(valid only when `leverage` is 0) - */ + * Cross margin leverage(valid only when `leverage` is 0) + */ 'crossLeverageLimit'?: string; /** - * Last update time - */ + * Last update time + */ 'updateTime'?: number; /** - * 更新id,仓位每更新一次,数值会+1 - */ + * Update id. Each time the position is updated, the value will be +1. + */ 'updateId'?: number; /** - * First Open Time - */ + * First Open Time + */ 'openTime'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'user', - baseName: 'user', - type: 'number', + "name": "user", + "baseName": "user", + "type": "number" }, { - name: 'contract', - baseName: 'contract', - type: 'string', + "name": "contract", + "baseName": "contract", + "type": "string" }, { - name: 'size', - baseName: 'size', - type: 'number', + "name": "size", + "baseName": "size", + "type": "number" }, { - name: 'leverage', - baseName: 'leverage', - type: 'string', + "name": "leverage", + "baseName": "leverage", + "type": "string" }, { - name: 'riskLimit', - baseName: 'risk_limit', - type: 'string', + "name": "riskLimit", + "baseName": "risk_limit", + "type": "string" }, { - name: 'leverageMax', - baseName: 'leverage_max', - type: 'string', + "name": "leverageMax", + "baseName": "leverage_max", + "type": "string" }, { - name: 'maintenanceRate', - baseName: 'maintenance_rate', - type: 'string', + "name": "maintenanceRate", + "baseName": "maintenance_rate", + "type": "string" }, { - name: 'value', - baseName: 'value', - type: 'string', + "name": "value", + "baseName": "value", + "type": "string" }, { - name: 'margin', - baseName: 'margin', - type: 'string', + "name": "margin", + "baseName": "margin", + "type": "string" }, { - name: 'entryPrice', - baseName: 'entry_price', - type: 'string', + "name": "entryPrice", + "baseName": "entry_price", + "type": "string" }, { - name: 'liqPrice', - baseName: 'liq_price', - type: 'string', + "name": "liqPrice", + "baseName": "liq_price", + "type": "string" }, { - name: 'markPrice', - baseName: 'mark_price', - type: 'string', + "name": "markPrice", + "baseName": "mark_price", + "type": "string" }, { - name: 'initialMargin', - baseName: 'initial_margin', - type: 'string', + "name": "initialMargin", + "baseName": "initial_margin", + "type": "string" }, { - name: 'maintenanceMargin', - baseName: 'maintenance_margin', - type: 'string', + "name": "maintenanceMargin", + "baseName": "maintenance_margin", + "type": "string" }, { - name: 'unrealisedPnl', - baseName: 'unrealised_pnl', - type: 'string', + "name": "unrealisedPnl", + "baseName": "unrealised_pnl", + "type": "string" }, { - name: 'realisedPnl', - baseName: 'realised_pnl', - type: 'string', + "name": "realisedPnl", + "baseName": "realised_pnl", + "type": "string" }, { - name: 'pnlPnl', - baseName: 'pnl_pnl', - type: 'string', + "name": "pnlPnl", + "baseName": "pnl_pnl", + "type": "string" }, { - name: 'pnlFund', - baseName: 'pnl_fund', - type: 'string', + "name": "pnlFund", + "baseName": "pnl_fund", + "type": "string" }, { - name: 'pnlFee', - baseName: 'pnl_fee', - type: 'string', + "name": "pnlFee", + "baseName": "pnl_fee", + "type": "string" }, { - name: 'historyPnl', - baseName: 'history_pnl', - type: 'string', + "name": "historyPnl", + "baseName": "history_pnl", + "type": "string" }, { - name: 'lastClosePnl', - baseName: 'last_close_pnl', - type: 'string', + "name": "lastClosePnl", + "baseName": "last_close_pnl", + "type": "string" }, { - name: 'realisedPoint', - baseName: 'realised_point', - type: 'string', + "name": "realisedPoint", + "baseName": "realised_point", + "type": "string" }, { - name: 'historyPoint', - baseName: 'history_point', - type: 'string', + "name": "historyPoint", + "baseName": "history_point", + "type": "string" }, { - name: 'adlRanking', - baseName: 'adl_ranking', - type: 'number', + "name": "adlRanking", + "baseName": "adl_ranking", + "type": "number" }, { - name: 'pendingOrders', - baseName: 'pending_orders', - type: 'number', + "name": "pendingOrders", + "baseName": "pending_orders", + "type": "number" }, { - name: 'closeOrder', - baseName: 'close_order', - type: 'PositionCloseOrder', + "name": "closeOrder", + "baseName": "close_order", + "type": "PositionCloseOrder" }, { - name: 'mode', - baseName: 'mode', - type: 'Position.Mode', + "name": "mode", + "baseName": "mode", + "type": "Position.Mode" }, { - name: 'crossLeverageLimit', - baseName: 'cross_leverage_limit', - type: 'string', + "name": "crossLeverageLimit", + "baseName": "cross_leverage_limit", + "type": "string" }, { - name: 'updateTime', - baseName: 'update_time', - type: 'number', + "name": "updateTime", + "baseName": "update_time", + "type": "number" }, { - name: 'updateId', - baseName: 'update_id', - type: 'number', + "name": "updateId", + "baseName": "update_id", + "type": "number" }, { - name: 'openTime', - baseName: 'open_time', - type: 'number', - }, - ]; + "name": "openTime", + "baseName": "open_time", + "type": "number" + } ]; static getAttributeTypeMap() { return Position.attributeTypeMap; @@ -304,8 +303,8 @@ export class Position { export namespace Position { export enum Mode { - Single = 'single', - DualLong = 'dual_long', - DualShort = 'dual_short', + Single = 'single', + DualLong = 'dual_long', + DualShort = 'dual_short' } } diff --git a/model/positionClose.ts b/model/positionClose.ts index 69903bf..4b0bf44 100644 --- a/model/positionClose.ts +++ b/model/positionClose.ts @@ -9,129 +9,129 @@ * Do not edit the class manually. */ + export class PositionClose { /** - * Position close time - */ + * Position close time + */ 'time'?: number; /** - * Futures contract - */ + * Futures contract + */ 'contract'?: string; /** - * Position side, long or short - */ + * Position side, long or short + */ 'side'?: PositionClose.Side; /** - * PNL - */ + * PNL + */ 'pnl'?: string; /** - * PNL - Position P/L - */ + * PNL - Position P/L + */ 'pnlPnl'?: string; /** - * PNL - Funding Fees - */ + * PNL - Funding Fees + */ 'pnlFund'?: string; /** - * PNL - Transaction Fees - */ + * PNL - Transaction Fees + */ 'pnlFee'?: string; /** - * Text of close order - */ + * Text of close order + */ 'text'?: string; /** - * Max Trade Size - */ + * Max Trade Size + */ 'maxSize'?: string; /** - * 累计平仓量 - */ + * Cumulative closed position volume + */ 'accumSize'?: string; /** - * First Open Time - */ + * First Open Time + */ 'firstOpenTime'?: number; /** - * When \'side\' is \'long,\' it indicates the opening average price; when \'side\' is \'short,\' it indicates the closing average price. - */ + * When \'side\' is \'long,\' it indicates the opening average price; when \'side\' is \'short,\' it indicates the closing average price. + */ 'longPrice'?: string; /** - * When \'side\' is \'long,\' it indicates the opening average price; when \'side\' is \'short,\' it indicates the closing average price - */ + * When \'side\' is \'long,\' it indicates the opening average price; when \'side\' is \'short,\' it indicates the closing average price + */ 'shortPrice'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'time', - baseName: 'time', - type: 'number', + "name": "time", + "baseName": "time", + "type": "number" }, { - name: 'contract', - baseName: 'contract', - type: 'string', + "name": "contract", + "baseName": "contract", + "type": "string" }, { - name: 'side', - baseName: 'side', - type: 'PositionClose.Side', + "name": "side", + "baseName": "side", + "type": "PositionClose.Side" }, { - name: 'pnl', - baseName: 'pnl', - type: 'string', + "name": "pnl", + "baseName": "pnl", + "type": "string" }, { - name: 'pnlPnl', - baseName: 'pnl_pnl', - type: 'string', + "name": "pnlPnl", + "baseName": "pnl_pnl", + "type": "string" }, { - name: 'pnlFund', - baseName: 'pnl_fund', - type: 'string', + "name": "pnlFund", + "baseName": "pnl_fund", + "type": "string" }, { - name: 'pnlFee', - baseName: 'pnl_fee', - type: 'string', + "name": "pnlFee", + "baseName": "pnl_fee", + "type": "string" }, { - name: 'text', - baseName: 'text', - type: 'string', + "name": "text", + "baseName": "text", + "type": "string" }, { - name: 'maxSize', - baseName: 'max_size', - type: 'string', + "name": "maxSize", + "baseName": "max_size", + "type": "string" }, { - name: 'accumSize', - baseName: 'accum_size', - type: 'string', + "name": "accumSize", + "baseName": "accum_size", + "type": "string" }, { - name: 'firstOpenTime', - baseName: 'first_open_time', - type: 'number', + "name": "firstOpenTime", + "baseName": "first_open_time", + "type": "number" }, { - name: 'longPrice', - baseName: 'long_price', - type: 'string', + "name": "longPrice", + "baseName": "long_price", + "type": "string" }, { - name: 'shortPrice', - baseName: 'short_price', - type: 'string', - }, - ]; + "name": "shortPrice", + "baseName": "short_price", + "type": "string" + } ]; static getAttributeTypeMap() { return PositionClose.attributeTypeMap; @@ -140,7 +140,7 @@ export class PositionClose { export namespace PositionClose { export enum Side { - Long = 'long', - Short = 'short', + Long = 'long', + Short = 'short' } } diff --git a/model/positionCloseOrder.ts b/model/positionCloseOrder.ts index f4a46df..6a7d556 100644 --- a/model/positionCloseOrder.ts +++ b/model/positionCloseOrder.ts @@ -9,44 +9,45 @@ * Do not edit the class manually. */ + /** - * Current close order if any, or `null` - */ +* Current close order if any, or `null` +*/ export class PositionCloseOrder { /** - * Close order ID - */ + * Close order ID + */ 'id'?: number; /** - * Close order price - */ + * Close order price + */ 'price'?: string; /** - * Is the close order from liquidation - */ + * Is the close order from liquidation + */ 'isLiq'?: boolean; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'number', + "name": "id", + "baseName": "id", + "type": "number" }, { - name: 'price', - baseName: 'price', - type: 'string', + "name": "price", + "baseName": "price", + "type": "string" }, { - name: 'isLiq', - baseName: 'is_liq', - type: 'boolean', - }, - ]; + "name": "isLiq", + "baseName": "is_liq", + "type": "boolean" + } ]; static getAttributeTypeMap() { return PositionCloseOrder.attributeTypeMap; } } + diff --git a/model/profitLossRange.ts b/model/profitLossRange.ts index 9708f67..8180320 100644 --- a/model/profitLossRange.ts +++ b/model/profitLossRange.ts @@ -9,44 +9,45 @@ * Do not edit the class manually. */ + /** - * 盈亏范围 - */ +* Profit and loss range +*/ export class ProfitLossRange { /** - * 价格变动百分比 - */ + * Percentage change in price + */ 'pricePercentage'?: string; /** - * 隐含波动率变动百分比 - */ + * Percentage change in implied volatility + */ 'impliedVolatilityPercentage'?: string; /** - * PNL - */ + * PNL + */ 'profitLoss'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'pricePercentage', - baseName: 'price_percentage', - type: 'string', + "name": "pricePercentage", + "baseName": "price_percentage", + "type": "string" }, { - name: 'impliedVolatilityPercentage', - baseName: 'implied_volatility_percentage', - type: 'string', + "name": "impliedVolatilityPercentage", + "baseName": "implied_volatility_percentage", + "type": "string" }, { - name: 'profitLoss', - baseName: 'profit_loss', - type: 'string', - }, - ]; + "name": "profitLoss", + "baseName": "profit_loss", + "type": "string" + } ]; static getAttributeTypeMap() { return ProfitLossRange.attributeTypeMap; } } + diff --git a/model/rebateUserInfo.ts b/model/rebateUserInfo.ts index 5194c81..3f94783 100644 --- a/model/rebateUserInfo.ts +++ b/model/rebateUserInfo.ts @@ -9,26 +9,27 @@ * Do not edit the class manually. */ + /** - * 获取用户返佣信息 - */ +* Retrieve user rebate information +*/ export class RebateUserInfo { /** - * 我的邀请人UID - */ + * My inviter\'s UID + */ 'inviteUid'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'inviteUid', - baseName: 'invite_uid', - type: 'number', - }, - ]; + "name": "inviteUid", + "baseName": "invite_uid", + "type": "number" + } ]; static getAttributeTypeMap() { return RebateUserInfo.attributeTypeMap; } } + diff --git a/model/repayCurrencyRes.ts b/model/repayCurrencyRes.ts index 14e12d0..1bf3bf0 100644 --- a/model/repayCurrencyRes.ts +++ b/model/repayCurrencyRes.ts @@ -9,68 +9,69 @@ * Do not edit the class manually. */ + export class RepayCurrencyRes { /** - * Has the repayment been successful - */ + * Has the repayment been successful + */ 'succeeded'?: boolean; /** - * Error identifier for unsuccessful operations; empty for successful. - */ + * Error identifier for unsuccessful operations; empty for successful. + */ 'label'?: string; /** - * Error description in case of operation failure; empty when successful. - */ + * Error description in case of operation failure; empty when successful. + */ 'message'?: string; /** - * Repayment currency - */ + * Repayment currency + */ 'currency'?: string; /** - * Principal - */ + * Principal + */ 'repaidPrincipal'?: string; /** - * Principal - */ + * Principal + */ 'repaidInterest'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'succeeded', - baseName: 'succeeded', - type: 'boolean', + "name": "succeeded", + "baseName": "succeeded", + "type": "boolean" }, { - name: 'label', - baseName: 'label', - type: 'string', + "name": "label", + "baseName": "label", + "type": "string" }, { - name: 'message', - baseName: 'message', - type: 'string', + "name": "message", + "baseName": "message", + "type": "string" }, { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'repaidPrincipal', - baseName: 'repaid_principal', - type: 'string', + "name": "repaidPrincipal", + "baseName": "repaid_principal", + "type": "string" }, { - name: 'repaidInterest', - baseName: 'repaid_interest', - type: 'string', - }, - ]; + "name": "repaidInterest", + "baseName": "repaid_interest", + "type": "string" + } ]; static getAttributeTypeMap() { return RepayCurrencyRes.attributeTypeMap; } } + diff --git a/model/repayLoan.ts b/model/repayLoan.ts index 9701ffe..3b85d99 100644 --- a/model/repayLoan.ts +++ b/model/repayLoan.ts @@ -9,44 +9,45 @@ * Do not edit the class manually. */ + /** - * Repay - */ +* Repay +*/ export class RepayLoan { /** - * Order ID - */ + * Order ID + */ 'orderId': number; /** - * Repayment amount, it is mandatory when making partial repayments - */ + * Repayment amount, it is mandatory when making partial repayments + */ 'repayAmount': string; /** - * 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. - */ + * 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. + */ 'repaidAll': boolean; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'orderId', - baseName: 'order_id', - type: 'number', + "name": "orderId", + "baseName": "order_id", + "type": "number" }, { - name: 'repayAmount', - baseName: 'repay_amount', - type: 'string', + "name": "repayAmount", + "baseName": "repay_amount", + "type": "string" }, { - name: 'repaidAll', - baseName: 'repaid_all', - type: 'boolean', - }, - ]; + "name": "repaidAll", + "baseName": "repaid_all", + "type": "boolean" + } ]; static getAttributeTypeMap() { return RepayLoan.attributeTypeMap; } } + diff --git a/model/repayMultiLoan.ts b/model/repayMultiLoan.ts index 5919292..4d17d79 100644 --- a/model/repayMultiLoan.ts +++ b/model/repayMultiLoan.ts @@ -12,34 +12,34 @@ import { MultiLoanRepayItem } from './multiLoanRepayItem'; /** - * Repay Multi-Collateral Loan - */ +* Repay Multi-Collateral Loan +*/ export class RepayMultiLoan { /** - * Order ID - */ + * Order ID + */ 'orderId': number; /** - * Repay Currency Item - */ + * Repay Currency Item + */ 'repayItems': Array; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'orderId', - baseName: 'order_id', - type: 'number', + "name": "orderId", + "baseName": "order_id", + "type": "number" }, { - name: 'repayItems', - baseName: 'repay_items', - type: 'Array', - }, - ]; + "name": "repayItems", + "baseName": "repay_items", + "type": "Array" + } ]; static getAttributeTypeMap() { return RepayMultiLoan.attributeTypeMap; } } + diff --git a/model/repayRecord.ts b/model/repayRecord.ts index 515cca9..1729a67 100644 --- a/model/repayRecord.ts +++ b/model/repayRecord.ts @@ -9,134 +9,135 @@ * Do not edit the class manually. */ + /** - * Repayment record - */ +* Repayment record +*/ export class RepayRecord { /** - * Order ID - */ + * Order ID + */ 'orderId'?: number; /** - * Repayment record ID - */ + * Repayment record ID + */ 'recordId'?: number; /** - * Repayment amount - */ + * Repayment amount + */ 'repaidAmount'?: string; /** - * Borrowed currency - */ + * Borrowed currency + */ 'borrowCurrency'?: string; /** - * Collateral - */ + * Collateral + */ 'collateralCurrency'?: string; /** - * The initial collateralization rate - */ + * The initial collateralization rate + */ 'initLtv'?: string; /** - * Borrowing time, timestamp - */ + * Borrowing time, timestamp + */ 'borrowTime'?: number; /** - * Repayment time, timestamp - */ + * Repayment time, timestamp + */ 'repayTime'?: number; /** - * Total interest - */ + * Total interest + */ 'totalInterest'?: string; /** - * Principal to be repaid before repayment - */ + * Principal to be repaid before repayment + */ 'beforeLeftPrincipal'?: string; /** - * Principal to be repaid after repayment - */ + * Principal to be repaid after repayment + */ 'afterLeftPrincipal'?: string; /** - * Collateral quantity before repayment - */ + * Collateral quantity before repayment + */ 'beforeLeftCollateral'?: string; /** - * Collateral quantity after repayment - */ + * Collateral quantity after repayment + */ 'afterLeftCollateral'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'orderId', - baseName: 'order_id', - type: 'number', + "name": "orderId", + "baseName": "order_id", + "type": "number" }, { - name: 'recordId', - baseName: 'record_id', - type: 'number', + "name": "recordId", + "baseName": "record_id", + "type": "number" }, { - name: 'repaidAmount', - baseName: 'repaid_amount', - type: 'string', + "name": "repaidAmount", + "baseName": "repaid_amount", + "type": "string" }, { - name: 'borrowCurrency', - baseName: 'borrow_currency', - type: 'string', + "name": "borrowCurrency", + "baseName": "borrow_currency", + "type": "string" }, { - name: 'collateralCurrency', - baseName: 'collateral_currency', - type: 'string', + "name": "collateralCurrency", + "baseName": "collateral_currency", + "type": "string" }, { - name: 'initLtv', - baseName: 'init_ltv', - type: 'string', + "name": "initLtv", + "baseName": "init_ltv", + "type": "string" }, { - name: 'borrowTime', - baseName: 'borrow_time', - type: 'number', + "name": "borrowTime", + "baseName": "borrow_time", + "type": "number" }, { - name: 'repayTime', - baseName: 'repay_time', - type: 'number', + "name": "repayTime", + "baseName": "repay_time", + "type": "number" }, { - name: 'totalInterest', - baseName: 'total_interest', - type: 'string', + "name": "totalInterest", + "baseName": "total_interest", + "type": "string" }, { - name: 'beforeLeftPrincipal', - baseName: 'before_left_principal', - type: 'string', + "name": "beforeLeftPrincipal", + "baseName": "before_left_principal", + "type": "string" }, { - name: 'afterLeftPrincipal', - baseName: 'after_left_principal', - type: 'string', + "name": "afterLeftPrincipal", + "baseName": "after_left_principal", + "type": "string" }, { - name: 'beforeLeftCollateral', - baseName: 'before_left_collateral', - type: 'string', + "name": "beforeLeftCollateral", + "baseName": "before_left_collateral", + "type": "string" }, { - name: 'afterLeftCollateral', - baseName: 'after_left_collateral', - type: 'string', - }, - ]; + "name": "afterLeftCollateral", + "baseName": "after_left_collateral", + "type": "string" + } ]; static getAttributeTypeMap() { return RepayRecord.attributeTypeMap; } } + diff --git a/model/repayRecordCurrency.ts b/model/repayRecordCurrency.ts index 8b55c25..532abc3 100644 --- a/model/repayRecordCurrency.ts +++ b/model/repayRecordCurrency.ts @@ -9,68 +9,69 @@ * Do not edit the class manually. */ + export class RepayRecordCurrency { /** - * Currency - */ + * Currency + */ 'currency'?: string; /** - * Currency Index Price - */ + * Currency Index Price + */ 'indexPrice'?: string; /** - * Amount before the operation - */ + * Amount before the operation + */ 'beforeAmount'?: string; /** - * USDT Amount before the operation. - */ + * USDT Amount before the operation. + */ 'beforeAmountUsdt'?: string; /** - * Amount after the operation. - */ + * Amount after the operation. + */ 'afterAmount'?: string; /** - * USDT Amount after the operation. - */ + * USDT Amount after the operation. + */ 'afterAmountUsdt'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'indexPrice', - baseName: 'index_price', - type: 'string', + "name": "indexPrice", + "baseName": "index_price", + "type": "string" }, { - name: 'beforeAmount', - baseName: 'before_amount', - type: 'string', + "name": "beforeAmount", + "baseName": "before_amount", + "type": "string" }, { - name: 'beforeAmountUsdt', - baseName: 'before_amount_usdt', - type: 'string', + "name": "beforeAmountUsdt", + "baseName": "before_amount_usdt", + "type": "string" }, { - name: 'afterAmount', - baseName: 'after_amount', - type: 'string', + "name": "afterAmount", + "baseName": "after_amount", + "type": "string" }, { - name: 'afterAmountUsdt', - baseName: 'after_amount_usdt', - type: 'string', - }, - ]; + "name": "afterAmountUsdt", + "baseName": "after_amount_usdt", + "type": "string" + } ]; static getAttributeTypeMap() { return RepayRecordCurrency.attributeTypeMap; } } + diff --git a/model/repayRecordLeftInterest.ts b/model/repayRecordLeftInterest.ts index dfbec94..ebd4f09 100644 --- a/model/repayRecordLeftInterest.ts +++ b/model/repayRecordLeftInterest.ts @@ -9,68 +9,69 @@ * Do not edit the class manually. */ + export class RepayRecordLeftInterest { /** - * Currency - */ + * Currency + */ 'currency'?: string; /** - * Currency Index Price - */ + * Currency Index Price + */ 'indexPrice'?: string; /** - * Interest amount before repayment - */ + * Interest amount before repayment + */ 'beforeAmount'?: string; /** - * Converted value of interest before repayment in USDT - */ + * Converted value of interest before repayment in USDT + */ 'beforeAmountUsdt'?: string; /** - * Interest amount after repayment - */ + * Interest amount after repayment + */ 'afterAmount'?: string; /** - * Converted value of interest after repayment in USDT - */ + * Converted value of interest after repayment in USDT + */ 'afterAmountUsdt'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'indexPrice', - baseName: 'index_price', - type: 'string', + "name": "indexPrice", + "baseName": "index_price", + "type": "string" }, { - name: 'beforeAmount', - baseName: 'before_amount', - type: 'string', + "name": "beforeAmount", + "baseName": "before_amount", + "type": "string" }, { - name: 'beforeAmountUsdt', - baseName: 'before_amount_usdt', - type: 'string', + "name": "beforeAmountUsdt", + "baseName": "before_amount_usdt", + "type": "string" }, { - name: 'afterAmount', - baseName: 'after_amount', - type: 'string', + "name": "afterAmount", + "baseName": "after_amount", + "type": "string" }, { - name: 'afterAmountUsdt', - baseName: 'after_amount_usdt', - type: 'string', - }, - ]; + "name": "afterAmountUsdt", + "baseName": "after_amount_usdt", + "type": "string" + } ]; static getAttributeTypeMap() { return RepayRecordLeftInterest.attributeTypeMap; } } + diff --git a/model/repayRecordRepaidCurrency.ts b/model/repayRecordRepaidCurrency.ts index 5642ad0..a44e038 100644 --- a/model/repayRecordRepaidCurrency.ts +++ b/model/repayRecordRepaidCurrency.ts @@ -9,68 +9,69 @@ * Do not edit the class manually. */ + export class RepayRecordRepaidCurrency { /** - * Repayment currency - */ + * Repayment currency + */ 'currency'?: string; /** - * Currency Index Price - */ + * Currency Index Price + */ 'indexPrice'?: string; /** - * Repayment amount - */ + * Repayment amount + */ 'repaidAmount'?: string; /** - * Principal - */ + * Principal + */ 'repaidPrincipal'?: string; /** - * Interest - */ + * Interest + */ 'repaidInterest'?: string; /** - * Value of the repayment amount in USDT - */ + * Value of the repayment amount in USDT + */ 'repaidAmountUsdt'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'indexPrice', - baseName: 'index_price', - type: 'string', + "name": "indexPrice", + "baseName": "index_price", + "type": "string" }, { - name: 'repaidAmount', - baseName: 'repaid_amount', - type: 'string', + "name": "repaidAmount", + "baseName": "repaid_amount", + "type": "string" }, { - name: 'repaidPrincipal', - baseName: 'repaid_principal', - type: 'string', + "name": "repaidPrincipal", + "baseName": "repaid_principal", + "type": "string" }, { - name: 'repaidInterest', - baseName: 'repaid_interest', - type: 'string', + "name": "repaidInterest", + "baseName": "repaid_interest", + "type": "string" }, { - name: 'repaidAmountUsdt', - baseName: 'repaid_amount_usdt', - type: 'string', - }, - ]; + "name": "repaidAmountUsdt", + "baseName": "repaid_amount_usdt", + "type": "string" + } ]; static getAttributeTypeMap() { return RepayRecordRepaidCurrency.attributeTypeMap; } } + diff --git a/model/repayRecordTotalInterest.ts b/model/repayRecordTotalInterest.ts index 664d996..bee5d2c 100644 --- a/model/repayRecordTotalInterest.ts +++ b/model/repayRecordTotalInterest.ts @@ -9,50 +9,51 @@ * Do not edit the class manually. */ + export class RepayRecordTotalInterest { /** - * Currency - */ + * Currency + */ 'currency'?: string; /** - * Currency Index Price - */ + * Currency Index Price + */ 'indexPrice'?: string; /** - * Interest Amount - */ + * Interest Amount + */ 'amount'?: string; /** - * Interest amount converted to USDT - */ + * Interest amount converted to USDT + */ 'amountUsdt'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'indexPrice', - baseName: 'index_price', - type: 'string', + "name": "indexPrice", + "baseName": "index_price", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'amountUsdt', - baseName: 'amount_usdt', - type: 'string', - }, - ]; + "name": "amountUsdt", + "baseName": "amount_usdt", + "type": "string" + } ]; static getAttributeTypeMap() { return RepayRecordTotalInterest.attributeTypeMap; } } + diff --git a/model/repayRequest.ts b/model/repayRequest.ts deleted file mode 100644 index 1fbeedb..0000000 --- a/model/repayRequest.ts +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Gate API v4 - * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. - * - * Contact: support@mail.gate.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export class RepayRequest { - /** - * Currency pair - */ - 'currencyPair': string; - /** - * Loan currency - */ - 'currency': string; - /** - * Repay mode. all - repay all; partial - repay only some portion - */ - 'mode': RepayRequest.Mode; - /** - * Repay amount. Required in `partial` mode - */ - 'amount'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ - { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', - }, - { - name: 'currency', - baseName: 'currency', - type: 'string', - }, - { - name: 'mode', - baseName: 'mode', - type: 'RepayRequest.Mode', - }, - { - name: 'amount', - baseName: 'amount', - type: 'string', - }, - ]; - - static getAttributeTypeMap() { - return RepayRequest.attributeTypeMap; - } -} - -export namespace RepayRequest { - export enum Mode { - All = 'all', - Partial = 'partial', - } -} diff --git a/model/repayResp.ts b/model/repayResp.ts index 2bfb9df..2d5db6a 100644 --- a/model/repayResp.ts +++ b/model/repayResp.ts @@ -9,35 +9,36 @@ * Do not edit the class manually. */ + /** - * Repay - */ +* Repay +*/ export class RepayResp { /** - * Principal - */ + * Principal + */ 'repaidPrincipal'?: string; /** - * Interest - */ + * Interest + */ 'repaidInterest'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'repaidPrincipal', - baseName: 'repaid_principal', - type: 'string', + "name": "repaidPrincipal", + "baseName": "repaid_principal", + "type": "string" }, { - name: 'repaidInterest', - baseName: 'repaid_interest', - type: 'string', - }, - ]; + "name": "repaidInterest", + "baseName": "repaid_interest", + "type": "string" + } ]; static getAttributeTypeMap() { return RepayResp.attributeTypeMap; } } + diff --git a/model/repayment.ts b/model/repayment.ts deleted file mode 100644 index 0ec44b9..0000000 --- a/model/repayment.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Gate API v4 - * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. - * - * Contact: support@mail.gate.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export class Repayment { - /** - * Loan record ID - */ - 'id'?: string; - /** - * Repayment time - */ - 'createTime'?: string; - /** - * Repaid principal - */ - 'principal'?: string; - /** - * Repaid interest - */ - 'interest'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ - { - name: 'id', - baseName: 'id', - type: 'string', - }, - { - name: 'createTime', - baseName: 'create_time', - type: 'string', - }, - { - name: 'principal', - baseName: 'principal', - type: 'string', - }, - { - name: 'interest', - baseName: 'interest', - type: 'string', - }, - ]; - - static getAttributeTypeMap() { - return Repayment.attributeTypeMap; - } -} diff --git a/model/riskUnits.ts b/model/riskUnits.ts index b6dca07..e9a6c54 100644 --- a/model/riskUnits.ts +++ b/model/riskUnits.ts @@ -9,86 +9,87 @@ * Do not edit the class manually. */ + export class RiskUnits { /** - * 风险单元标志 - */ + * Risk unit flag + */ 'symbol'?: string; /** - * 现货对冲占用数量 - */ + * Spot hedging utilization + */ 'spotInUse'?: string; /** - * 风险单元的维持保证金 - */ + * Maintenance margin for risk unit + */ 'maintainMargin'?: string; /** - * 风险单元的起始保证金 - */ + * Initial margin for risk unit + */ 'initialMargin'?: string; /** - * 风险单元的 总 delta - */ + * Total Delta of risk unit + */ 'delta'?: string; /** - * 风险单元的 总 gamma - */ + * Total Gamma of risk unit + */ 'gamma'?: string; /** - * 风险单元的 总 theta - */ + * Total Theta of risk unit + */ 'theta'?: string; /** - * 风险单元的 总 vega - */ + * Total Vega of risk unit + */ 'vega'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'symbol', - baseName: 'symbol', - type: 'string', + "name": "symbol", + "baseName": "symbol", + "type": "string" }, { - name: 'spotInUse', - baseName: 'spot_in_use', - type: 'string', + "name": "spotInUse", + "baseName": "spot_in_use", + "type": "string" }, { - name: 'maintainMargin', - baseName: 'maintain_margin', - type: 'string', + "name": "maintainMargin", + "baseName": "maintain_margin", + "type": "string" }, { - name: 'initialMargin', - baseName: 'initial_margin', - type: 'string', + "name": "initialMargin", + "baseName": "initial_margin", + "type": "string" }, { - name: 'delta', - baseName: 'delta', - type: 'string', + "name": "delta", + "baseName": "delta", + "type": "string" }, { - name: 'gamma', - baseName: 'gamma', - type: 'string', + "name": "gamma", + "baseName": "gamma", + "type": "string" }, { - name: 'theta', - baseName: 'theta', - type: 'string', + "name": "theta", + "baseName": "theta", + "type": "string" }, { - name: 'vega', - baseName: 'vega', - type: 'string', - }, - ]; + "name": "vega", + "baseName": "vega", + "type": "string" + } ]; static getAttributeTypeMap() { return RiskUnits.attributeTypeMap; } } + diff --git a/model/savedAddress.ts b/model/savedAddress.ts index fc50e4d..5337e31 100644 --- a/model/savedAddress.ts +++ b/model/savedAddress.ts @@ -9,68 +9,69 @@ * Do not edit the class manually. */ + export class SavedAddress { /** - * Currency - */ + * Currency + */ 'currency'?: string; /** - * Chain name - */ + * Chain name + */ 'chain'?: string; /** - * Address - */ + * Address + */ 'address'?: string; /** - * Name - */ + * Name + */ 'name'?: string; /** - * Tag - */ + * Tag + */ 'tag'?: string; /** - * Whether to pass the verification 0-unverified, 1-verified - */ + * Whether to pass the verification 0-unverified, 1-verified + */ 'verified'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'chain', - baseName: 'chain', - type: 'string', + "name": "chain", + "baseName": "chain", + "type": "string" }, { - name: 'address', - baseName: 'address', - type: 'string', + "name": "address", + "baseName": "address", + "type": "string" }, { - name: 'name', - baseName: 'name', - type: 'string', + "name": "name", + "baseName": "name", + "type": "string" }, { - name: 'tag', - baseName: 'tag', - type: 'string', + "name": "tag", + "baseName": "tag", + "type": "string" }, { - name: 'verified', - baseName: 'verified', - type: 'string', - }, - ]; + "name": "verified", + "baseName": "verified", + "type": "string" + } ]; static getAttributeTypeMap() { return SavedAddress.attributeTypeMap; } } + diff --git a/model/smallBalance.ts b/model/smallBalance.ts index dbccc22..d107d93 100644 --- a/model/smallBalance.ts +++ b/model/smallBalance.ts @@ -9,53 +9,54 @@ * Do not edit the class manually. */ + /** - * Convert Small Balance - */ +* Convert Small Balance +*/ export class SmallBalance { /** - * Currency - */ + * Currency + */ 'currency'?: string; /** - * Available balance - */ + * Available balance + */ 'availableBalance'?: string; /** - * Estimated as BTC - */ + * Estimated as BTC + */ 'estimatedAsBtc'?: string; /** - * Estimated conversion to GT - */ + * Estimated conversion to GT + */ 'convertibleToGt'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'availableBalance', - baseName: 'available_balance', - type: 'string', + "name": "availableBalance", + "baseName": "available_balance", + "type": "string" }, { - name: 'estimatedAsBtc', - baseName: 'estimated_as_btc', - type: 'string', + "name": "estimatedAsBtc", + "baseName": "estimated_as_btc", + "type": "string" }, { - name: 'convertibleToGt', - baseName: 'convertible_to_gt', - type: 'string', - }, - ]; + "name": "convertibleToGt", + "baseName": "convertible_to_gt", + "type": "string" + } ]; static getAttributeTypeMap() { return SmallBalance.attributeTypeMap; } } + diff --git a/model/smallBalanceHistory.ts b/model/smallBalanceHistory.ts index 3e3ca84..7feb8f5 100644 --- a/model/smallBalanceHistory.ts +++ b/model/smallBalanceHistory.ts @@ -9,62 +9,63 @@ * Do not edit the class manually. */ + /** - * Convert Small Balance - */ +* Convert Small Balance +*/ export class SmallBalanceHistory { /** - * Order ID - */ + * Order ID + */ 'id'?: string; /** - * Currency - */ + * Currency + */ 'currency'?: string; /** - * amount - */ + * amount + */ 'amount'?: string; /** - * GT amount - */ + * GT amount + */ 'gtAmount'?: string; /** - * Exchange time (in seconds) - */ + * Exchange time (in seconds) + */ 'createTime'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'string', + "name": "id", + "baseName": "id", + "type": "string" }, { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'gtAmount', - baseName: 'gt_amount', - type: 'string', + "name": "gtAmount", + "baseName": "gt_amount", + "type": "string" }, { - name: 'createTime', - baseName: 'create_time', - type: 'number', - }, - ]; + "name": "createTime", + "baseName": "create_time", + "type": "number" + } ]; static getAttributeTypeMap() { return SmallBalanceHistory.attributeTypeMap; } } + diff --git a/model/spotAccount.ts b/model/spotAccount.ts index b319686..93bdef9 100644 --- a/model/spotAccount.ts +++ b/model/spotAccount.ts @@ -9,50 +9,51 @@ * Do not edit the class manually. */ + export class SpotAccount { /** - * Currency detail - */ + * Currency detail + */ 'currency'?: string; /** - * Available amount - */ + * Available amount + */ 'available'?: string; /** - * Locked amount, used in trading - */ + * Locked amount, used in trading + */ 'locked'?: string; /** - * 版本号 - */ + * Version number + */ 'updateId'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'available', - baseName: 'available', - type: 'string', + "name": "available", + "baseName": "available", + "type": "string" }, { - name: 'locked', - baseName: 'locked', - type: 'string', + "name": "locked", + "baseName": "locked", + "type": "string" }, { - name: 'updateId', - baseName: 'update_id', - type: 'number', - }, - ]; + "name": "updateId", + "baseName": "update_id", + "type": "number" + } ]; static getAttributeTypeMap() { return SpotAccount.attributeTypeMap; } } + diff --git a/model/spotAccountBook.ts b/model/spotAccountBook.ts index 49160b8..3f065e8 100644 --- a/model/spotAccountBook.ts +++ b/model/spotAccountBook.ts @@ -9,77 +9,78 @@ * Do not edit the class manually. */ + export class SpotAccountBook { /** - * Balance change record ID - */ + * Balance change record ID + */ 'id'?: string; /** - * The timestamp of the change (in milliseconds) - */ + * The timestamp of the change (in milliseconds) + */ 'time'?: number; /** - * Currency changed - */ + * Currency changed + */ 'currency'?: string; /** - * Amount changed. Positive value means transferring in, while negative out - */ + * Amount changed. Positive value means transferring in, while negative out + */ 'change'?: string; /** - * Balance after change - */ + * Balance after change + */ 'balance'?: string; /** - * Account book type. Please refer to [account book type](#accountbook-type) for more detail - */ + * Account book type. Please refer to [account book type](#accountbook-type) for more detail + */ 'type'?: string; /** - * Additional information - */ + * Additional information + */ 'text'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'string', + "name": "id", + "baseName": "id", + "type": "string" }, { - name: 'time', - baseName: 'time', - type: 'number', + "name": "time", + "baseName": "time", + "type": "number" }, { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'change', - baseName: 'change', - type: 'string', + "name": "change", + "baseName": "change", + "type": "string" }, { - name: 'balance', - baseName: 'balance', - type: 'string', + "name": "balance", + "baseName": "balance", + "type": "string" }, { - name: 'type', - baseName: 'type', - type: 'string', + "name": "type", + "baseName": "type", + "type": "string" }, { - name: 'text', - baseName: 'text', - type: 'string', - }, - ]; + "name": "text", + "baseName": "text", + "type": "string" + } ]; static getAttributeTypeMap() { return SpotAccountBook.attributeTypeMap; } } + diff --git a/model/spotFee.ts b/model/spotFee.ts index 4328ca9..cab84e2 100644 --- a/model/spotFee.ts +++ b/model/spotFee.ts @@ -9,104 +9,105 @@ * Do not edit the class manually. */ + export class SpotFee { /** - * User ID - */ + * User ID + */ 'userId'?: number; /** - * taker fee rate - */ + * taker fee rate + */ 'takerFee'?: string; /** - * maker fee rate - */ + * maker fee rate + */ 'makerFee'?: string; /** - * If GT deduction is enabled - */ + * If GT deduction is enabled + */ 'gtDiscount'?: boolean; /** - * Taker fee rate if using GT deduction. It will be 0 if GT deduction is disabled - */ + * Taker fee rate if using GT deduction. It will be 0 if GT deduction is disabled + */ 'gtTakerFee'?: string; /** - * Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled - */ + * Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled + */ 'gtMakerFee'?: string; /** - * Loan fee rate of margin lending - */ + * Loan fee rate of margin lending + */ 'loanFee'?: string; /** - * Point type. 0 - Initial version. 1 - new version since 202009 - */ + * Point type. 0 - Initial version. 1 - new version since 202009 + */ 'pointType'?: string; /** - * Currency pair - */ + * Currency pair + */ 'currencyPair'?: string; /** - * Deduction types for rates, 1 - GT deduction, 2 - Point card deduction, 3 - VIP rates - */ + * Deduction types for rates, 1 - GT deduction, 2 - Point card deduction, 3 - VIP rates + */ 'debitFee'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'userId', - baseName: 'user_id', - type: 'number', + "name": "userId", + "baseName": "user_id", + "type": "number" }, { - name: 'takerFee', - baseName: 'taker_fee', - type: 'string', + "name": "takerFee", + "baseName": "taker_fee", + "type": "string" }, { - name: 'makerFee', - baseName: 'maker_fee', - type: 'string', + "name": "makerFee", + "baseName": "maker_fee", + "type": "string" }, { - name: 'gtDiscount', - baseName: 'gt_discount', - type: 'boolean', + "name": "gtDiscount", + "baseName": "gt_discount", + "type": "boolean" }, { - name: 'gtTakerFee', - baseName: 'gt_taker_fee', - type: 'string', + "name": "gtTakerFee", + "baseName": "gt_taker_fee", + "type": "string" }, { - name: 'gtMakerFee', - baseName: 'gt_maker_fee', - type: 'string', + "name": "gtMakerFee", + "baseName": "gt_maker_fee", + "type": "string" }, { - name: 'loanFee', - baseName: 'loan_fee', - type: 'string', + "name": "loanFee", + "baseName": "loan_fee", + "type": "string" }, { - name: 'pointType', - baseName: 'point_type', - type: 'string', + "name": "pointType", + "baseName": "point_type", + "type": "string" }, { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" }, { - name: 'debitFee', - baseName: 'debit_fee', - type: 'number', - }, - ]; + "name": "debitFee", + "baseName": "debit_fee", + "type": "number" + } ]; static getAttributeTypeMap() { return SpotFee.attributeTypeMap; } } + diff --git a/model/spotInsuranceHistory.ts b/model/spotInsuranceHistory.ts index 920f6cb..c01db81 100644 --- a/model/spotInsuranceHistory.ts +++ b/model/spotInsuranceHistory.ts @@ -9,41 +9,42 @@ * Do not edit the class manually. */ + export class SpotInsuranceHistory { /** - * Currency - */ + * Currency + */ 'currency'?: string; /** - * 余额 - */ + * balance + */ 'balance'?: string; /** - * 创建时间,时间戳,毫秒级 - */ + * Creation time, timestamp, milliseconds + */ 'time'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'balance', - baseName: 'balance', - type: 'string', + "name": "balance", + "baseName": "balance", + "type": "string" }, { - name: 'time', - baseName: 'time', - type: 'number', - }, - ]; + "name": "time", + "baseName": "time", + "type": "number" + } ]; static getAttributeTypeMap() { return SpotInsuranceHistory.attributeTypeMap; } } + diff --git a/model/spotPricePutOrder.ts b/model/spotPricePutOrder.ts index f2567eb..253f5aa 100644 --- a/model/spotPricePutOrder.ts +++ b/model/spotPricePutOrder.ts @@ -9,75 +9,75 @@ * Do not edit the class manually. */ + export class SpotPricePutOrder { /** - * Order type,default to `limit` - limit : Limit Order - market : Market Order - */ + * Order type,default to `limit` - limit : Limit Order - market : Market Order + */ 'type'?: SpotPricePutOrder.Type; /** - * Order side - buy: buy side - sell: sell side - */ + * Order side - buy: buy side - sell: sell side + */ 'side': SpotPricePutOrder.Side; /** - * Order price - */ + * Order price + */ 'price': string; /** - * 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` - */ + * 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` + */ 'amount': string; /** - * Trading account type. Portfolio margin account must set to `cross_margin` - normal: spot trading - margin: margin trading - cross_margin: cross_margin trading - */ + * Trading account type. Portfolio margin account must set to `cross_margin` - normal: spot trading - margin: margin trading - cross_margin: cross_margin trading + */ 'account': SpotPricePutOrder.Account; /** - * time_in_force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - */ + * time_in_force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only + */ 'timeInForce'?: SpotPricePutOrder.TimeInForce; /** - * The source of the order, including: - web: web - api: api - app: app - */ + * The source of the order, including: - web: web - api: api - app: app + */ 'text'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'type', - baseName: 'type', - type: 'SpotPricePutOrder.Type', + "name": "type", + "baseName": "type", + "type": "SpotPricePutOrder.Type" }, { - name: 'side', - baseName: 'side', - type: 'SpotPricePutOrder.Side', + "name": "side", + "baseName": "side", + "type": "SpotPricePutOrder.Side" }, { - name: 'price', - baseName: 'price', - type: 'string', + "name": "price", + "baseName": "price", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'account', - baseName: 'account', - type: 'SpotPricePutOrder.Account', + "name": "account", + "baseName": "account", + "type": "SpotPricePutOrder.Account" }, { - name: 'timeInForce', - baseName: 'time_in_force', - type: 'SpotPricePutOrder.TimeInForce', + "name": "timeInForce", + "baseName": "time_in_force", + "type": "SpotPricePutOrder.TimeInForce" }, { - name: 'text', - baseName: 'text', - type: 'string', - }, - ]; + "name": "text", + "baseName": "text", + "type": "string" + } ]; static getAttributeTypeMap() { return SpotPricePutOrder.attributeTypeMap; @@ -86,20 +86,20 @@ export class SpotPricePutOrder { export namespace SpotPricePutOrder { export enum Type { - Limit = 'limit', - Market = 'market', + Limit = 'limit', + Market = 'market' } export enum Side { - Buy = 'buy', - Sell = 'sell', + Buy = 'buy', + Sell = 'sell' } export enum Account { - Normal = 'normal', - Margin = 'margin', - CrossMargin = 'cross_margin', + Normal = 'normal', + Margin = 'margin', + CrossMargin = 'cross_margin' } export enum TimeInForce { - Gtc = 'gtc', - Ioc = 'ioc', + Gtc = 'gtc', + Ioc = 'ioc' } } diff --git a/model/spotPriceTrigger.ts b/model/spotPriceTrigger.ts index 6bef20f..8f4f8cd 100644 --- a/model/spotPriceTrigger.ts +++ b/model/spotPriceTrigger.ts @@ -9,39 +9,39 @@ * Do not edit the class manually. */ + export class SpotPriceTrigger { /** - * Trigger price - */ + * Trigger price + */ 'price': string; /** - * 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 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': SpotPriceTrigger.Rule; /** - * How long (in seconds) to wait for the condition to be triggered before cancelling the order. - */ + * How long (in seconds) to wait for the condition to be triggered before cancelling the order. + */ 'expiration': number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'price', - baseName: 'price', - type: 'string', + "name": "price", + "baseName": "price", + "type": "string" }, { - name: 'rule', - baseName: 'rule', - type: 'SpotPriceTrigger.Rule', + "name": "rule", + "baseName": "rule", + "type": "SpotPriceTrigger.Rule" }, { - name: 'expiration', - baseName: 'expiration', - type: 'number', - }, - ]; + "name": "expiration", + "baseName": "expiration", + "type": "number" + } ]; static getAttributeTypeMap() { return SpotPriceTrigger.attributeTypeMap; @@ -50,7 +50,7 @@ export class SpotPriceTrigger { export namespace SpotPriceTrigger { export enum Rule { - GreaterThanOrEqualTo = '>=', - LessThanOrEqualTo = '<=', + GreaterThanOrEqualTo = '>=', + LessThanOrEqualTo = '<=' } } diff --git a/model/spotPriceTriggeredOrder.ts b/model/spotPriceTriggeredOrder.ts index fe02874..397bedf 100644 --- a/model/spotPriceTriggeredOrder.ts +++ b/model/spotPriceTriggeredOrder.ts @@ -13,100 +13,100 @@ import { SpotPricePutOrder } from './spotPricePutOrder'; import { SpotPriceTrigger } from './spotPriceTrigger'; /** - * Spot order detail - */ +* Spot order detail +*/ export class SpotPriceTriggeredOrder { 'trigger': SpotPriceTrigger; 'put': SpotPricePutOrder; /** - * Auto order ID - */ + * Auto order ID + */ 'id'?: number; /** - * User ID - */ + * User ID + */ 'user'?: number; /** - * Currency pair - */ + * Currency pair + */ 'market': string; /** - * Creation time - */ + * Creation time + */ 'ctime'?: number; /** - * Finished time - */ + * Finished time + */ 'ftime'?: number; /** - * ID of the newly created order on condition triggered - */ + * ID of the newly created order on condition triggered + */ 'firedOrderId'?: number; /** - * Status - open: open - cancelled: being manually cancelled - finish: successfully executed - failed: failed to execute - expired - expired - */ + * Status - open: open - cancelled: being manually cancelled - finish: successfully executed - failed: failed to execute - expired - expired + */ 'status'?: string; /** - * Additional remarks on how the order was finished - */ + * Additional remarks on how the order was finished + */ 'reason'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'trigger', - baseName: 'trigger', - type: 'SpotPriceTrigger', + "name": "trigger", + "baseName": "trigger", + "type": "SpotPriceTrigger" }, { - name: 'put', - baseName: 'put', - type: 'SpotPricePutOrder', + "name": "put", + "baseName": "put", + "type": "SpotPricePutOrder" }, { - name: 'id', - baseName: 'id', - type: 'number', + "name": "id", + "baseName": "id", + "type": "number" }, { - name: 'user', - baseName: 'user', - type: 'number', + "name": "user", + "baseName": "user", + "type": "number" }, { - name: 'market', - baseName: 'market', - type: 'string', + "name": "market", + "baseName": "market", + "type": "string" }, { - name: 'ctime', - baseName: 'ctime', - type: 'number', + "name": "ctime", + "baseName": "ctime", + "type": "number" }, { - name: 'ftime', - baseName: 'ftime', - type: 'number', + "name": "ftime", + "baseName": "ftime", + "type": "number" }, { - name: 'firedOrderId', - baseName: 'fired_order_id', - type: 'number', + "name": "firedOrderId", + "baseName": "fired_order_id", + "type": "number" }, { - name: 'status', - baseName: 'status', - type: 'string', + "name": "status", + "baseName": "status", + "type": "string" }, { - name: 'reason', - baseName: 'reason', - type: 'string', - }, - ]; + "name": "reason", + "baseName": "reason", + "type": "string" + } ]; static getAttributeTypeMap() { return SpotPriceTriggeredOrder.attributeTypeMap; } } + diff --git a/model/stpGroup.ts b/model/stpGroup.ts index 14f4a3d..25f9bda 100644 --- a/model/stpGroup.ts +++ b/model/stpGroup.ts @@ -9,50 +9,51 @@ * Do not edit the class manually. */ + export class StpGroup { /** - * STP Group ID - */ + * STP Group ID + */ 'id'?: number; /** - * STP Group name - */ + * STP Group name + */ 'name': string; /** - * Creator ID - */ + * Creator ID + */ 'creatorId'?: number; /** - * Creation time - */ + * Creation time + */ 'createTime'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'number', + "name": "id", + "baseName": "id", + "type": "number" }, { - name: 'name', - baseName: 'name', - type: 'string', + "name": "name", + "baseName": "name", + "type": "string" }, { - name: 'creatorId', - baseName: 'creator_id', - type: 'number', + "name": "creatorId", + "baseName": "creator_id", + "type": "number" }, { - name: 'createTime', - baseName: 'create_time', - type: 'number', - }, - ]; + "name": "createTime", + "baseName": "create_time", + "type": "number" + } ]; static getAttributeTypeMap() { return StpGroup.attributeTypeMap; } } + diff --git a/model/stpGroupUser.ts b/model/stpGroupUser.ts index fe433ff..8d1f390 100644 --- a/model/stpGroupUser.ts +++ b/model/stpGroupUser.ts @@ -9,41 +9,42 @@ * Do not edit the class manually. */ + export class StpGroupUser { /** - * User ID - */ + * User ID + */ 'userId'?: number; /** - * STP Group ID - */ + * STP Group ID + */ 'stpId'?: number; /** - * Creation time - */ + * Creation time + */ 'createTime'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'userId', - baseName: 'user_id', - type: 'number', + "name": "userId", + "baseName": "user_id", + "type": "number" }, { - name: 'stpId', - baseName: 'stp_id', - type: 'number', + "name": "stpId", + "baseName": "stp_id", + "type": "number" }, { - name: 'createTime', - baseName: 'create_time', - type: 'number', - }, - ]; + "name": "createTime", + "baseName": "create_time", + "type": "number" + } ]; static getAttributeTypeMap() { return StpGroupUser.attributeTypeMap; } } + diff --git a/model/structuredBuy.ts b/model/structuredBuy.ts index c9883c6..6b7785b 100644 --- a/model/structuredBuy.ts +++ b/model/structuredBuy.ts @@ -9,35 +9,36 @@ * Do not edit the class manually. */ + /** - * Dual Investment Purchase - */ +* Dual Investment Purchase +*/ export class StructuredBuy { /** - * Plan ID - */ + * Plan ID + */ 'pid'?: string; /** - * Purchase Amount - */ + * Purchase Amount + */ 'amount'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'pid', - baseName: 'pid', - type: 'string', + "name": "pid", + "baseName": "pid", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', - }, - ]; + "name": "amount", + "baseName": "amount", + "type": "string" + } ]; static getAttributeTypeMap() { return StructuredBuy.attributeTypeMap; } } + diff --git a/model/structuredGetProjectList.ts b/model/structuredGetProjectList.ts index 7790cf7..e821a99 100644 --- a/model/structuredGetProjectList.ts +++ b/model/structuredGetProjectList.ts @@ -9,125 +9,126 @@ * Do not edit the class manually. */ + /** - * Structured Products - */ +* Structured Products +*/ export class StructuredGetProjectList { /** - * Plan ID - */ + * Plan ID + */ 'id'?: number; /** - * 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 - */ + * 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 + */ 'type'?: string; /** - * name - */ + * name + */ 'nameEn'?: string; /** - * Investment Currency - */ + * Investment Currency + */ 'investmentCoin'?: string; /** - * Investment term - */ + * Investment term + */ 'investmentPeriod'?: string; /** - * Minimum annual rate - */ + * Minimum annual rate + */ 'minAnnualRate'?: string; /** - * Intermediate annual rate - */ + * Intermediate annual rate + */ 'midAnnualRate'?: string; /** - * Maximum annual rate - */ + * Maximum annual rate + */ 'maxAnnualRate'?: string; /** - * Watch market - */ + * Watch market + */ 'watchMarket'?: string; /** - * start time - */ + * start time + */ 'startTime'?: number; /** - * Finished time - */ + * Finished time + */ 'endTime'?: number; /** - * Status: `in_process`-in progress `will_begin`-will begin `wait_settlement`-waiting for settlement `done`-done - */ + * Status: `in_process`-in progress `will_begin`-will begin `wait_settlement`-waiting for settlement `done`-done + */ 'status'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'number', + "name": "id", + "baseName": "id", + "type": "number" }, { - name: 'type', - baseName: 'type', - type: 'string', + "name": "type", + "baseName": "type", + "type": "string" }, { - name: 'nameEn', - baseName: 'name_en', - type: 'string', + "name": "nameEn", + "baseName": "name_en", + "type": "string" }, { - name: 'investmentCoin', - baseName: 'investment_coin', - type: 'string', + "name": "investmentCoin", + "baseName": "investment_coin", + "type": "string" }, { - name: 'investmentPeriod', - baseName: 'investment_period', - type: 'string', + "name": "investmentPeriod", + "baseName": "investment_period", + "type": "string" }, { - name: 'minAnnualRate', - baseName: 'min_annual_rate', - type: 'string', + "name": "minAnnualRate", + "baseName": "min_annual_rate", + "type": "string" }, { - name: 'midAnnualRate', - baseName: 'mid_annual_rate', - type: 'string', + "name": "midAnnualRate", + "baseName": "mid_annual_rate", + "type": "string" }, { - name: 'maxAnnualRate', - baseName: 'max_annual_rate', - type: 'string', + "name": "maxAnnualRate", + "baseName": "max_annual_rate", + "type": "string" }, { - name: 'watchMarket', - baseName: 'watch_market', - type: 'string', + "name": "watchMarket", + "baseName": "watch_market", + "type": "string" }, { - name: 'startTime', - baseName: 'start_time', - type: 'number', + "name": "startTime", + "baseName": "start_time", + "type": "number" }, { - name: 'endTime', - baseName: 'end_time', - type: 'number', + "name": "endTime", + "baseName": "end_time", + "type": "number" }, { - name: 'status', - baseName: 'status', - type: 'string', - }, - ]; + "name": "status", + "baseName": "status", + "type": "string" + } ]; static getAttributeTypeMap() { return StructuredGetProjectList.attributeTypeMap; } } + diff --git a/model/structuredGetProjectListRequest.ts b/model/structuredGetProjectListRequest.ts deleted file mode 100644 index d68e434..0000000 --- a/model/structuredGetProjectListRequest.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Gate API v4 - * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. - * - * Contact: support@mail.gate.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Dual Investment order - */ -export class StructuredGetProjectListRequest { - /** - * Product Type, default to empty for querying all. `SharkFin2.0`-Shark Fin 2.0 `BullishSharkFin`-Bullish Shark Fin `BearishSharkFin`-Bearish Shark Fin `DoubleNoTouch`-Double No-Touch `RangeAccrual`-RangeAccrual `SnowBall`-Snow Ball - */ - 'type'?: string; - /** - * Status: default to empty for querying all. `in_process`-in progress `will_begin`-will begin `wait_settlement`-waiting for settlement `done`-done - */ - 'status'?: string; - /** - * Page number - */ - 'page'?: number; - /** - * Number of items returned in the list. Default is 100. - */ - 'limit'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ - { - name: 'type', - baseName: 'type', - type: 'string', - }, - { - name: 'status', - baseName: 'status', - type: 'string', - }, - { - name: 'page', - baseName: 'page', - type: 'number', - }, - { - name: 'limit', - baseName: 'limit', - type: 'number', - }, - ]; - - static getAttributeTypeMap() { - return StructuredGetProjectListRequest.attributeTypeMap; - } -} diff --git a/model/structuredOrderList.ts b/model/structuredOrderList.ts index fa4593f..488f9d0 100644 --- a/model/structuredOrderList.ts +++ b/model/structuredOrderList.ts @@ -9,80 +9,81 @@ * Do not edit the class manually. */ + /** - * Structured order - */ +* Structured order +*/ export class StructuredOrderList { /** - * Order ID - */ + * Order ID + */ 'id'?: number; /** - * Plan ID - */ + * Plan ID + */ 'pid'?: string; /** - * Locked coin - */ + * Locked coin + */ 'lockCoin'?: string; /** - * Locked amount - */ + * Locked amount + */ 'amount'?: string; /** - * Status: SUCCESS - SUCCESS FAILED - FAILED DONE - DONE - */ + * Status: SUCCESS - SUCCESS FAILED - FAILED DONE - DONE + */ 'status'?: string; /** - * Income - */ + * Income + */ 'income'?: string; /** - * Created time - */ + * Created time + */ 'createTime'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'number', + "name": "id", + "baseName": "id", + "type": "number" }, { - name: 'pid', - baseName: 'pid', - type: 'string', + "name": "pid", + "baseName": "pid", + "type": "string" }, { - name: 'lockCoin', - baseName: 'lock_coin', - type: 'string', + "name": "lockCoin", + "baseName": "lock_coin", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'status', - baseName: 'status', - type: 'string', + "name": "status", + "baseName": "status", + "type": "string" }, { - name: 'income', - baseName: 'income', - type: 'string', + "name": "income", + "baseName": "income", + "type": "string" }, { - name: 'createTime', - baseName: 'create_time', - type: 'number', - }, - ]; + "name": "createTime", + "baseName": "create_time", + "type": "number" + } ]; static getAttributeTypeMap() { return StructuredOrderList.attributeTypeMap; } } + diff --git a/model/structuredOrderListRequest.ts b/model/structuredOrderListRequest.ts deleted file mode 100644 index af95da4..0000000 --- a/model/structuredOrderListRequest.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Gate API v4 - * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. - * - * Contact: support@mail.gate.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Structured Request Parameters - */ -export class StructuredOrderListRequest { - /** - * start time - */ - 'from': number; - /** - * Finished time - */ - 'to': number; - /** - * Page number - */ - 'page'?: number; - /** - * Number of items returned in the list. Default is 100. - */ - 'limit'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ - { - name: 'from', - baseName: 'from', - type: 'number', - }, - { - name: 'to', - baseName: 'to', - type: 'number', - }, - { - name: 'page', - baseName: 'page', - type: 'number', - }, - { - name: 'limit', - baseName: 'limit', - type: 'number', - }, - ]; - - static getAttributeTypeMap() { - return StructuredOrderListRequest.attributeTypeMap; - } -} diff --git a/model/subAccount.ts b/model/subAccount.ts index 29e9777..217a72a 100644 --- a/model/subAccount.ts +++ b/model/subAccount.ts @@ -9,86 +9,87 @@ * Do not edit the class manually. */ + export class SubAccount { /** - * custom text - */ + * custom text + */ 'remark'?: string; /** - * Sub-account login name: Only letters, numbers and underscores are supported, and cannot contain other illegal characters - */ + * Sub-account login name: Only letters, numbers and underscores are supported, and cannot contain other illegal characters + */ 'loginName': string; /** - * The sub-account\'s password. (Default: the same as main account\'s password) - */ + * The sub-account\'s password. (Default: the same as main account\'s password) + */ 'password'?: string; /** - * The sub-account\'s email address. (Default: the same as main account\'s email address) - */ + * The sub-account\'s email address. (Default: the same as main account\'s email address) + */ 'email'?: string; /** - * State: 1-normal, 2-locked\" - */ + * State: 1-normal, 2-locked\" + */ 'state'?: number; /** - * \"Sub-account type: 1 - sub-account, 3 - cross margin account - */ + * \"Sub-account type: 1 - sub-account, 3 - cross margin account + */ 'type'?: number; /** - * The user id of the sub-account - */ + * The user id of the sub-account + */ 'userId'?: number; /** - * Created time - */ + * Created time + */ 'createTime'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'remark', - baseName: 'remark', - type: 'string', + "name": "remark", + "baseName": "remark", + "type": "string" }, { - name: 'loginName', - baseName: 'login_name', - type: 'string', + "name": "loginName", + "baseName": "login_name", + "type": "string" }, { - name: 'password', - baseName: 'password', - type: 'string', + "name": "password", + "baseName": "password", + "type": "string" }, { - name: 'email', - baseName: 'email', - type: 'string', + "name": "email", + "baseName": "email", + "type": "string" }, { - name: 'state', - baseName: 'state', - type: 'number', + "name": "state", + "baseName": "state", + "type": "number" }, { - name: 'type', - baseName: 'type', - type: 'number', + "name": "type", + "baseName": "type", + "type": "number" }, { - name: 'userId', - baseName: 'user_id', - type: 'number', + "name": "userId", + "baseName": "user_id", + "type": "number" }, { - name: 'createTime', - baseName: 'create_time', - type: 'number', - }, - ]; + "name": "createTime", + "baseName": "create_time", + "type": "number" + } ]; static getAttributeTypeMap() { return SubAccount.attributeTypeMap; } } + diff --git a/model/subAccountBalance.ts b/model/subAccountBalance.ts index 768af12..e8a31dd 100644 --- a/model/subAccountBalance.ts +++ b/model/subAccountBalance.ts @@ -9,32 +9,33 @@ * Do not edit the class manually. */ + export class SubAccountBalance { /** - * User ID - */ + * User ID + */ 'uid'?: string; /** - * Available balances of currencies - */ - 'available'?: { [key: string]: string }; + * Available balances of currencies + */ + 'available'?: { [key: string]: string; }; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'uid', - baseName: 'uid', - type: 'string', + "name": "uid", + "baseName": "uid", + "type": "string" }, { - name: 'available', - baseName: 'available', - type: '{ [key: string]: string; }', - }, - ]; + "name": "available", + "baseName": "available", + "type": "{ [key: string]: string; }" + } ]; static getAttributeTypeMap() { return SubAccountBalance.attributeTypeMap; } } + diff --git a/model/subAccountCrossMarginBalance.ts b/model/subAccountCrossMarginBalance.ts index f0c74bb..5116ded 100644 --- a/model/subAccountCrossMarginBalance.ts +++ b/model/subAccountCrossMarginBalance.ts @@ -13,30 +13,30 @@ import { SubCrossMarginAccount } from './subCrossMarginAccount'; export class SubAccountCrossMarginBalance { /** - * User ID - */ + * User ID + */ 'uid'?: string; /** - * 账户余额信息 - */ + * 账户余额信息 + */ 'available'?: SubCrossMarginAccount; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'uid', - baseName: 'uid', - type: 'string', + "name": "uid", + "baseName": "uid", + "type": "string" }, { - name: 'available', - baseName: 'available', - type: 'SubCrossMarginAccount', - }, - ]; + "name": "available", + "baseName": "available", + "type": "SubCrossMarginAccount" + } ]; static getAttributeTypeMap() { return SubAccountCrossMarginBalance.attributeTypeMap; } } + diff --git a/model/subAccountFuturesBalance.ts b/model/subAccountFuturesBalance.ts index dde790e..fcdaa43 100644 --- a/model/subAccountFuturesBalance.ts +++ b/model/subAccountFuturesBalance.ts @@ -13,30 +13,30 @@ import { FuturesAccount } from './futuresAccount'; export class SubAccountFuturesBalance { /** - * User ID - */ + * User ID + */ 'uid'?: string; /** - * Futures account balances - */ - 'available'?: { [key: string]: FuturesAccount }; + * Futures account balances + */ + 'available'?: { [key: string]: FuturesAccount; }; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'uid', - baseName: 'uid', - type: 'string', + "name": "uid", + "baseName": "uid", + "type": "string" }, { - name: 'available', - baseName: 'available', - type: '{ [key: string]: FuturesAccount; }', - }, - ]; + "name": "available", + "baseName": "available", + "type": "{ [key: string]: FuturesAccount; }" + } ]; static getAttributeTypeMap() { return SubAccountFuturesBalance.attributeTypeMap; } } + diff --git a/model/subAccountKey.ts b/model/subAccountKey.ts index aedbc9b..ff4d0ca 100644 --- a/model/subAccountKey.ts +++ b/model/subAccountKey.ts @@ -13,99 +13,99 @@ import { SubAccountKeyPerms } from './subAccountKeyPerms'; export class SubAccountKey { /** - * User ID - */ + * User ID + */ 'userId'?: string; /** - * Mode: 1 - classic 2 - portfolio account - */ + * Mode: 1 - classic 2 - portfolio account + */ 'mode'?: number; /** - * API key name - */ + * API key name + */ 'name'?: string; 'perms'?: Array; /** - * ip white list (list will be removed if no value is passed) - */ + * ip white list (list will be removed if no value is passed) + */ 'ipWhitelist'?: Array; /** - * API Key - */ + * API Key + */ 'key'?: string; /** - * State 1 - normal 2 - locked 3 - frozen - */ + * State 1 - normal 2 - locked 3 - frozen + */ 'state'?: number; /** - * Creation time - */ + * Creation time + */ 'createdAt'?: number; /** - * Last update time - */ + * Last update time + */ 'updatedAt'?: number; /** - * 最近使用时间 - */ + * Last access time + */ 'lastAccess'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'userId', - baseName: 'user_id', - type: 'string', + "name": "userId", + "baseName": "user_id", + "type": "string" }, { - name: 'mode', - baseName: 'mode', - type: 'number', + "name": "mode", + "baseName": "mode", + "type": "number" }, { - name: 'name', - baseName: 'name', - type: 'string', + "name": "name", + "baseName": "name", + "type": "string" }, { - name: 'perms', - baseName: 'perms', - type: 'Array', + "name": "perms", + "baseName": "perms", + "type": "Array" }, { - name: 'ipWhitelist', - baseName: 'ip_whitelist', - type: 'Array', + "name": "ipWhitelist", + "baseName": "ip_whitelist", + "type": "Array" }, { - name: 'key', - baseName: 'key', - type: 'string', + "name": "key", + "baseName": "key", + "type": "string" }, { - name: 'state', - baseName: 'state', - type: 'number', + "name": "state", + "baseName": "state", + "type": "number" }, { - name: 'createdAt', - baseName: 'created_at', - type: 'number', + "name": "createdAt", + "baseName": "created_at", + "type": "number" }, { - name: 'updatedAt', - baseName: 'updated_at', - type: 'number', + "name": "updatedAt", + "baseName": "updated_at", + "type": "number" }, { - name: 'lastAccess', - baseName: 'last_access', - type: 'number', - }, - ]; + "name": "lastAccess", + "baseName": "last_access", + "type": "number" + } ]; static getAttributeTypeMap() { return SubAccountKey.attributeTypeMap; } } + diff --git a/model/subAccountKeyPerms.ts b/model/subAccountKeyPerms.ts index 2d86cd1..8c2fbb6 100644 --- a/model/subAccountKeyPerms.ts +++ b/model/subAccountKeyPerms.ts @@ -9,32 +9,33 @@ * Do not edit the class manually. */ + export class SubAccountKeyPerms { /** - * 权限功能名称(不传值即为清空) - wallet: 钱包 - spot: 现货/杠杆 - futures: 永续合约 - delivery: 交割合约 - earn: 理财 - custody: 托管 - options: 期权 - account: 账户信息 - loan: 借贷 - margin: 杠杆 - unified: 统一账户 - copy: 跟单 - */ + * 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 + */ 'name'?: string; /** - * read only - */ + * read only + */ 'readOnly'?: boolean; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'name', - baseName: 'name', - type: 'string', + "name": "name", + "baseName": "name", + "type": "string" }, { - name: 'readOnly', - baseName: 'read_only', - type: 'boolean', - }, - ]; + "name": "readOnly", + "baseName": "read_only", + "type": "boolean" + } ]; static getAttributeTypeMap() { return SubAccountKeyPerms.attributeTypeMap; } } + diff --git a/model/subAccountMarginBalance.ts b/model/subAccountMarginBalance.ts index f6f8052..80d30c9 100644 --- a/model/subAccountMarginBalance.ts +++ b/model/subAccountMarginBalance.ts @@ -13,30 +13,30 @@ import { MarginAccount } from './marginAccount'; export class SubAccountMarginBalance { /** - * User ID - */ + * User ID + */ 'uid'?: string; /** - * Margin account balances - */ + * Margin account balances + */ 'available'?: Array; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'uid', - baseName: 'uid', - type: 'string', + "name": "uid", + "baseName": "uid", + "type": "string" }, { - name: 'available', - baseName: 'available', - type: 'Array', - }, - ]; + "name": "available", + "baseName": "available", + "type": "Array" + } ]; static getAttributeTypeMap() { return SubAccountMarginBalance.attributeTypeMap; } } + diff --git a/model/subAccountToSubAccount.ts b/model/subAccountToSubAccount.ts index d33adc9..5a2af54 100644 --- a/model/subAccountToSubAccount.ts +++ b/model/subAccountToSubAccount.ts @@ -9,77 +9,78 @@ * Do not edit the class manually. */ + export class SubAccountToSubAccount { /** - * Transfer currency name - */ + * Transfer currency name + */ 'currency': string; /** - * Transfer from the account. (deprecate, use `sub_account_from_type` and `sub_account_to_type` instead) - */ + * Transfer from the account. (deprecate, use `sub_account_from_type` and `sub_account_to_type` instead) + */ 'subAccountType'?: string; /** - * Transfer from the user id of the sub-account - */ + * Transfer from the user id of the sub-account + */ 'subAccountFrom': string; /** - * 转出的子账号交易账户, spot - 现货账户, futures - 永续合约账户, delivery - 交割合约账户 - */ + * The sub-account\'s outgoing trading account, spot - spot account, futures - perpetual contract account, delivery - delivery contract account. + */ 'subAccountFromType': string; /** - * Transfer to the user id of the sub-account - */ + * Transfer to the user id of the sub-account + */ 'subAccountTo': string; /** - * 转入的子账号交易账户, spot - 现货账户, futures - 永续合约账户, delivery - 交割合约账户 - */ + * The sub-account\'s incoming trading account, spot - spot account, futures - perpetual contract account, delivery - delivery contract account + */ 'subAccountToType': string; /** - * Transfer amount - */ + * Transfer amount + */ 'amount': string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'subAccountType', - baseName: 'sub_account_type', - type: 'string', + "name": "subAccountType", + "baseName": "sub_account_type", + "type": "string" }, { - name: 'subAccountFrom', - baseName: 'sub_account_from', - type: 'string', + "name": "subAccountFrom", + "baseName": "sub_account_from", + "type": "string" }, { - name: 'subAccountFromType', - baseName: 'sub_account_from_type', - type: 'string', + "name": "subAccountFromType", + "baseName": "sub_account_from_type", + "type": "string" }, { - name: 'subAccountTo', - baseName: 'sub_account_to', - type: 'string', + "name": "subAccountTo", + "baseName": "sub_account_to", + "type": "string" }, { - name: 'subAccountToType', - baseName: 'sub_account_to_type', - type: 'string', + "name": "subAccountToType", + "baseName": "sub_account_to_type", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', - }, - ]; + "name": "amount", + "baseName": "amount", + "type": "string" + } ]; static getAttributeTypeMap() { return SubAccountToSubAccount.attributeTypeMap; } } + diff --git a/model/subAccountTransfer.ts b/model/subAccountTransfer.ts index bbdfd7f..140ba9c 100644 --- a/model/subAccountTransfer.ts +++ b/model/subAccountTransfer.ts @@ -9,95 +9,96 @@ * Do not edit the class manually. */ + export class SubAccountTransfer { /** - * Transfer currency name - */ + * Transfer currency name + */ 'currency': string; /** - * Sub account user ID - */ + * Sub account user ID + */ 'subAccount': string; /** - * Transfer direction. to - transfer into sub account; from - transfer out from sub account - */ + * Transfer direction. to - transfer into sub account; from - transfer out from sub account + */ 'direction': string; /** - * Transfer amount - */ + * Transfer amount + */ 'amount': string; /** - * Main account user ID - */ + * Main account user ID + */ 'uid'?: string; /** - * 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. - */ + * 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. + */ 'clientOrderId'?: string; /** - * Transfer timestamp - */ + * Transfer timestamp + */ 'timest'?: string; /** - * Where the operation is initiated from - */ + * Where the operation is initiated from + */ 'source'?: string; /** - * 操作的子账号交易账户, spot - 现货账户, futures - 永续合约账户, delivery - 交割合约账户 - */ + * Target sub user\'s account. `spot` - spot account, `futures` - perpetual contract account, `delivery` - delivery account + */ 'subAccountType'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'subAccount', - baseName: 'sub_account', - type: 'string', + "name": "subAccount", + "baseName": "sub_account", + "type": "string" }, { - name: 'direction', - baseName: 'direction', - type: 'string', + "name": "direction", + "baseName": "direction", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'uid', - baseName: 'uid', - type: 'string', + "name": "uid", + "baseName": "uid", + "type": "string" }, { - name: 'clientOrderId', - baseName: 'client_order_id', - type: 'string', + "name": "clientOrderId", + "baseName": "client_order_id", + "type": "string" }, { - name: 'timest', - baseName: 'timest', - type: 'string', + "name": "timest", + "baseName": "timest", + "type": "string" }, { - name: 'source', - baseName: 'source', - type: 'string', + "name": "source", + "baseName": "source", + "type": "string" }, { - name: 'subAccountType', - baseName: 'sub_account_type', - type: 'string', - }, - ]; + "name": "subAccountType", + "baseName": "sub_account_type", + "type": "string" + } ]; static getAttributeTypeMap() { return SubAccountTransfer.attributeTypeMap; } } + diff --git a/model/subCrossMarginAccount.ts b/model/subCrossMarginAccount.ts index a5a731b..d2782d4 100644 --- a/model/subCrossMarginAccount.ts +++ b/model/subCrossMarginAccount.ts @@ -13,153 +13,153 @@ import { CrossMarginBalance1 } from './crossMarginBalance1'; export class SubCrossMarginAccount { /** - * User ID of the cross margin account. 0 means that the subaccount has not yet opened a cross margin account - */ + * User ID of the cross margin account. 0 means that the subaccount has not yet opened a cross margin account + */ 'userId'?: number; /** - * Whether account is locked - */ + * Whether account is locked + */ 'locked'?: boolean; - 'balances'?: { [key: string]: CrossMarginBalance1 }; + 'balances'?: { [key: string]: CrossMarginBalance1; }; /** - * Total account value in USDT, i.e., the sum of all currencies\' `(available+freeze)*price*discount` - */ + * Total account value in USDT, i.e., the sum of all currencies\' `(available+freeze)*price*discount` + */ 'total'?: string; /** - * Total borrowed value in USDT, i.e., the sum of all currencies\' `borrowed*price*discount` - */ + * Total borrowed value in USDT, i.e., the sum of all currencies\' `borrowed*price*discount` + */ 'borrowed'?: string; /** - * Total borrowed value in USDT * borrowed factor - */ + * Total borrowed value in USDT * borrowed factor + */ 'borrowedNet'?: string; /** - * Total net assets in USDT - */ + * Total net assets in USDT + */ 'net'?: string; /** - * Position leverage - */ + * Position leverage + */ 'leverage'?: string; /** - * Total unpaid interests in USDT, i.e., the sum of all currencies\' `interest*price*discount` - */ + * Total unpaid interests in USDT, i.e., the sum of all currencies\' `interest*price*discount` + */ 'interest'?: string; /** - * Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` - */ + * Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` + */ 'risk'?: string; /** - * Total initial margin - */ + * Total initial margin + */ 'totalInitialMargin'?: string; /** - * Total margin balance - */ + * Total margin balance + */ 'totalMarginBalance'?: string; /** - * Total maintenance margin - */ + * Total maintenance margin + */ 'totalMaintenanceMargin'?: string; /** - * Total initial margin rate - */ + * Total initial margin rate + */ 'totalInitialMarginRate'?: string; /** - * Total maintenance margin rate - */ + * Total maintenance margin rate + */ 'totalMaintenanceMarginRate'?: string; /** - * Total available margin - */ + * Total available margin + */ 'totalAvailableMargin'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'userId', - baseName: 'user_id', - type: 'number', + "name": "userId", + "baseName": "user_id", + "type": "number" }, { - name: 'locked', - baseName: 'locked', - type: 'boolean', + "name": "locked", + "baseName": "locked", + "type": "boolean" }, { - name: 'balances', - baseName: 'balances', - type: '{ [key: string]: CrossMarginBalance1; }', + "name": "balances", + "baseName": "balances", + "type": "{ [key: string]: CrossMarginBalance1; }" }, { - name: 'total', - baseName: 'total', - type: 'string', + "name": "total", + "baseName": "total", + "type": "string" }, { - name: 'borrowed', - baseName: 'borrowed', - type: 'string', + "name": "borrowed", + "baseName": "borrowed", + "type": "string" }, { - name: 'borrowedNet', - baseName: 'borrowed_net', - type: 'string', + "name": "borrowedNet", + "baseName": "borrowed_net", + "type": "string" }, { - name: 'net', - baseName: 'net', - type: 'string', + "name": "net", + "baseName": "net", + "type": "string" }, { - name: 'leverage', - baseName: 'leverage', - type: 'string', + "name": "leverage", + "baseName": "leverage", + "type": "string" }, { - name: 'interest', - baseName: 'interest', - type: 'string', + "name": "interest", + "baseName": "interest", + "type": "string" }, { - name: 'risk', - baseName: 'risk', - type: 'string', + "name": "risk", + "baseName": "risk", + "type": "string" }, { - name: 'totalInitialMargin', - baseName: 'total_initial_margin', - type: 'string', + "name": "totalInitialMargin", + "baseName": "total_initial_margin", + "type": "string" }, { - name: 'totalMarginBalance', - baseName: 'total_margin_balance', - type: 'string', + "name": "totalMarginBalance", + "baseName": "total_margin_balance", + "type": "string" }, { - name: 'totalMaintenanceMargin', - baseName: 'total_maintenance_margin', - type: 'string', + "name": "totalMaintenanceMargin", + "baseName": "total_maintenance_margin", + "type": "string" }, { - name: 'totalInitialMarginRate', - baseName: 'total_initial_margin_rate', - type: 'string', + "name": "totalInitialMarginRate", + "baseName": "total_initial_margin_rate", + "type": "string" }, { - name: 'totalMaintenanceMarginRate', - baseName: 'total_maintenance_margin_rate', - type: 'string', + "name": "totalMaintenanceMarginRate", + "baseName": "total_maintenance_margin_rate", + "type": "string" }, { - name: 'totalAvailableMargin', - baseName: 'total_available_margin', - type: 'string', - }, - ]; + "name": "totalAvailableMargin", + "baseName": "total_available_margin", + "type": "string" + } ]; static getAttributeTypeMap() { return SubCrossMarginAccount.attributeTypeMap; } } + diff --git a/model/subUserMode.ts b/model/subUserMode.ts index 34a119c..ee25b66 100644 --- a/model/subUserMode.ts +++ b/model/subUserMode.ts @@ -9,41 +9,42 @@ * Do not edit the class manually. */ + export class SubUserMode { /** - * User ID - */ + * User ID + */ 'userId'?: number; /** - * 是否是统一账户 - */ + * Is it a unified account? + */ 'isUnified'?: boolean; /** - * 统一账户模式: - `classic`: 经典账户模式 - `multi_currency`: 跨币种保证金模式 - `portfolio`: 组合保证金模式 - */ + * Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode + */ 'mode'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'userId', - baseName: 'user_id', - type: 'number', + "name": "userId", + "baseName": "user_id", + "type": "number" }, { - name: 'isUnified', - baseName: 'is_unified', - type: 'boolean', + "name": "isUnified", + "baseName": "is_unified", + "type": "boolean" }, { - name: 'mode', - baseName: 'mode', - type: 'string', - }, - ]; + "name": "mode", + "baseName": "mode", + "type": "string" + } ]; static getAttributeTypeMap() { return SubUserMode.attributeTypeMap; } } + diff --git a/model/systemTime.ts b/model/systemTime.ts index 23dbb9f..39e9797 100644 --- a/model/systemTime.ts +++ b/model/systemTime.ts @@ -9,23 +9,24 @@ * Do not edit the class manually. */ + export class SystemTime { /** - * Server current time(ms) - */ + * Server current time(ms) + */ 'serverTime'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'serverTime', - baseName: 'server_time', - type: 'number', - }, - ]; + "name": "serverTime", + "baseName": "server_time", + "type": "number" + } ]; static getAttributeTypeMap() { return SystemTime.attributeTypeMap; } } + diff --git a/model/ticker.ts b/model/ticker.ts index 7dbc654..be87160 100644 --- a/model/ticker.ts +++ b/model/ticker.ts @@ -9,167 +9,168 @@ * Do not edit the class manually. */ + export class Ticker { /** - * Currency pair - */ + * Currency pair + */ 'currencyPair'?: string; /** - * Last trading price - */ + * Last trading price + */ 'last'?: string; /** - * Recent lowest ask - */ + * Recent lowest ask + */ 'lowestAsk'?: string; /** - * 最新卖方最低价数量;批量查询时不存在;单个查询时存在,如果没有数据时为空 - */ + * 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 + */ 'lowestSize'?: string; /** - * Recent highest bid - */ + * Recent highest bid + */ 'highestBid'?: string; /** - * 最新买方最高价数量;批量查询时不存在;单个查询时存在,如果没有数据时为空 - */ + * 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 + */ 'highestSize'?: string; /** - * Change percentage in the last 24h - */ + * Change percentage in the last 24h + */ 'changePercentage'?: string; /** - * utc0 timezone, the percentage change in the last 24 hours - */ + * utc0 timezone, the percentage change in the last 24 hours + */ 'changeUtc0'?: string; /** - * utc8 timezone, the percentage change in the last 24 hours - */ + * utc8 timezone, the percentage change in the last 24 hours + */ 'changeUtc8'?: string; /** - * Base currency trade volume in the last 24h - */ + * Base currency trade volume in the last 24h + */ 'baseVolume'?: string; /** - * Quote currency trade volume in the last 24h - */ + * Quote currency trade volume in the last 24h + */ 'quoteVolume'?: string; /** - * Highest price in 24h - */ + * Highest price in 24h + */ 'high24h'?: string; /** - * Lowest price in 24h - */ + * Lowest price in 24h + */ 'low24h'?: string; /** - * ETF net value - */ + * ETF net value + */ 'etfNetValue'?: string; /** - * ETF previous net value at re-balancing time - */ + * ETF previous net value at re-balancing time + */ 'etfPreNetValue'?: string | null; /** - * ETF previous re-balancing time - */ + * ETF previous re-balancing time + */ 'etfPreTimestamp'?: number | null; /** - * ETF current leverage - */ + * ETF current leverage + */ 'etfLeverage'?: string | null; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" }, { - name: 'last', - baseName: 'last', - type: 'string', + "name": "last", + "baseName": "last", + "type": "string" }, { - name: 'lowestAsk', - baseName: 'lowest_ask', - type: 'string', + "name": "lowestAsk", + "baseName": "lowest_ask", + "type": "string" }, { - name: 'lowestSize', - baseName: 'lowest_size', - type: 'string', + "name": "lowestSize", + "baseName": "lowest_size", + "type": "string" }, { - name: 'highestBid', - baseName: 'highest_bid', - type: 'string', + "name": "highestBid", + "baseName": "highest_bid", + "type": "string" }, { - name: 'highestSize', - baseName: 'highest_size', - type: 'string', + "name": "highestSize", + "baseName": "highest_size", + "type": "string" }, { - name: 'changePercentage', - baseName: 'change_percentage', - type: 'string', + "name": "changePercentage", + "baseName": "change_percentage", + "type": "string" }, { - name: 'changeUtc0', - baseName: 'change_utc0', - type: 'string', + "name": "changeUtc0", + "baseName": "change_utc0", + "type": "string" }, { - name: 'changeUtc8', - baseName: 'change_utc8', - type: 'string', + "name": "changeUtc8", + "baseName": "change_utc8", + "type": "string" }, { - name: 'baseVolume', - baseName: 'base_volume', - type: 'string', + "name": "baseVolume", + "baseName": "base_volume", + "type": "string" }, { - name: 'quoteVolume', - baseName: 'quote_volume', - type: 'string', + "name": "quoteVolume", + "baseName": "quote_volume", + "type": "string" }, { - name: 'high24h', - baseName: 'high_24h', - type: 'string', + "name": "high24h", + "baseName": "high_24h", + "type": "string" }, { - name: 'low24h', - baseName: 'low_24h', - type: 'string', + "name": "low24h", + "baseName": "low_24h", + "type": "string" }, { - name: 'etfNetValue', - baseName: 'etf_net_value', - type: 'string', + "name": "etfNetValue", + "baseName": "etf_net_value", + "type": "string" }, { - name: 'etfPreNetValue', - baseName: 'etf_pre_net_value', - type: 'string', + "name": "etfPreNetValue", + "baseName": "etf_pre_net_value", + "type": "string" }, { - name: 'etfPreTimestamp', - baseName: 'etf_pre_timestamp', - type: 'number', + "name": "etfPreTimestamp", + "baseName": "etf_pre_timestamp", + "type": "number" }, { - name: 'etfLeverage', - baseName: 'etf_leverage', - type: 'string', - }, - ]; + "name": "etfLeverage", + "baseName": "etf_leverage", + "type": "string" + } ]; static getAttributeTypeMap() { return Ticker.attributeTypeMap; } } + diff --git a/model/totalBalance.ts b/model/totalBalance.ts index a7bdc80..fcf02c9 100644 --- a/model/totalBalance.ts +++ b/model/totalBalance.ts @@ -12,31 +12,31 @@ import { AccountBalance } from './accountBalance'; /** - * User\'s balance in all accounts - */ +* User\'s balance in all accounts +*/ export class TotalBalance { 'total'?: AccountBalance; /** - * 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 - */ - 'details'?: { [key: string]: AccountBalance }; + * 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 + */ + 'details'?: { [key: string]: AccountBalance; }; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'total', - baseName: 'total', - type: 'AccountBalance', + "name": "total", + "baseName": "total", + "type": "AccountBalance" }, { - name: 'details', - baseName: 'details', - type: '{ [key: string]: AccountBalance; }', - }, - ]; + "name": "details", + "baseName": "details", + "type": "{ [key: string]: AccountBalance; }" + } ]; static getAttributeTypeMap() { return TotalBalance.attributeTypeMap; } } + diff --git a/model/trade.ts b/model/trade.ts index d9a0050..81ecb77 100644 --- a/model/trade.ts +++ b/model/trade.ts @@ -9,156 +9,156 @@ * Do not edit the class manually. */ + export class Trade { /** - * Trade ID - */ + * Trade ID + */ 'id'?: string; /** - * Trading time - */ + * Trading time + */ 'createTime'?: string; /** - * Trading time, with millisecond precision - */ + * Trading time, with millisecond precision + */ 'createTimeMs'?: string; /** - * Currency pair - */ + * Currency pair + */ 'currencyPair'?: string; /** - * Order side - */ + * Order side + */ 'side'?: Trade.Side; /** - * Trade role. No value in public endpoints - */ + * Trade role. No value in public endpoints + */ 'role'?: Trade.Role; /** - * Trade amount - */ + * Trade amount + */ 'amount'?: string; /** - * Order price - */ + * Order price + */ 'price'?: string; /** - * Related order ID. No value in public endpoints - */ + * Related order ID. No value in public endpoints + */ 'orderId'?: string; /** - * Fee deducted. No value in public endpoints - */ + * Fee deducted. No value in public endpoints + */ 'fee'?: string; /** - * Fee currency unit. No value in public endpoints - */ + * Fee currency unit. No value in public endpoints + */ 'feeCurrency'?: string; /** - * Points used to deduct fee. No value in public endpoints - */ + * Points used to deduct fee. No value in public endpoints + */ 'pointFee'?: string; /** - * GT used to deduct fee. No value in public endpoints - */ + * GT used to deduct fee. No value in public endpoints + */ 'gtFee'?: string; /** - * The custom data that the user remarked when amending the order - */ + * The custom data that the user remarked when amending the order + */ 'amendText'?: string; /** - * Represents a unique and consecutive trade ID within a single market. It is used to track and identify trades in the specific market - */ + * Represents a unique and consecutive trade ID within a single market. It is used to track and identify trades in the specific market + */ 'sequenceId'?: string; /** - * User defined information. No value in public endpoints - */ + * User defined information. No value in public endpoints + */ 'text'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'string', + "name": "id", + "baseName": "id", + "type": "string" }, { - name: 'createTime', - baseName: 'create_time', - type: 'string', + "name": "createTime", + "baseName": "create_time", + "type": "string" }, { - name: 'createTimeMs', - baseName: 'create_time_ms', - type: 'string', + "name": "createTimeMs", + "baseName": "create_time_ms", + "type": "string" }, { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" }, { - name: 'side', - baseName: 'side', - type: 'Trade.Side', + "name": "side", + "baseName": "side", + "type": "Trade.Side" }, { - name: 'role', - baseName: 'role', - type: 'Trade.Role', + "name": "role", + "baseName": "role", + "type": "Trade.Role" }, { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'price', - baseName: 'price', - type: 'string', + "name": "price", + "baseName": "price", + "type": "string" }, { - name: 'orderId', - baseName: 'order_id', - type: 'string', + "name": "orderId", + "baseName": "order_id", + "type": "string" }, { - name: 'fee', - baseName: 'fee', - type: 'string', + "name": "fee", + "baseName": "fee", + "type": "string" }, { - name: 'feeCurrency', - baseName: 'fee_currency', - type: 'string', + "name": "feeCurrency", + "baseName": "fee_currency", + "type": "string" }, { - name: 'pointFee', - baseName: 'point_fee', - type: 'string', + "name": "pointFee", + "baseName": "point_fee", + "type": "string" }, { - name: 'gtFee', - baseName: 'gt_fee', - type: 'string', + "name": "gtFee", + "baseName": "gt_fee", + "type": "string" }, { - name: 'amendText', - baseName: 'amend_text', - type: 'string', + "name": "amendText", + "baseName": "amend_text", + "type": "string" }, { - name: 'sequenceId', - baseName: 'sequence_id', - type: 'string', + "name": "sequenceId", + "baseName": "sequence_id", + "type": "string" }, { - name: 'text', - baseName: 'text', - type: 'string', - }, - ]; + "name": "text", + "baseName": "text", + "type": "string" + } ]; static getAttributeTypeMap() { return Trade.attributeTypeMap; @@ -167,11 +167,11 @@ export class Trade { export namespace Trade { export enum Side { - Buy = 'buy', - Sell = 'sell', + Buy = 'buy', + Sell = 'sell' } export enum Role { - Taker = 'taker', - Maker = 'maker', + Taker = 'taker', + Maker = 'maker' } } diff --git a/model/tradeFee.ts b/model/tradeFee.ts index 7faca0a..31fda8d 100644 --- a/model/tradeFee.ts +++ b/model/tradeFee.ts @@ -9,131 +9,132 @@ * Do not edit the class manually. */ + export class TradeFee { /** - * User ID - */ + * User ID + */ 'userId'?: number; /** - * taker fee rate - */ + * taker fee rate + */ 'takerFee'?: string; /** - * maker fee rate - */ + * maker fee rate + */ 'makerFee'?: string; /** - * If GT deduction is enabled - */ + * If GT deduction is enabled + */ 'gtDiscount'?: boolean; /** - * Taker fee rate if using GT deduction. It will be 0 if GT deduction is disabled - */ + * Taker fee rate if using GT deduction. It will be 0 if GT deduction is disabled + */ 'gtTakerFee'?: string; /** - * Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled - */ + * Maker fee rate if using GT deduction. It will be 0 if GT deduction is disabled + */ 'gtMakerFee'?: string; /** - * Loan fee rate of margin lending - */ + * Loan fee rate of margin lending + */ 'loanFee'?: string; /** - * Point type. 0 - Initial version. 1 - new version since 202009 - */ + * Point type. 0 - Initial version. 1 - new version since 202009 + */ 'pointType'?: string; /** - * Futures trading taker fee - */ + * Futures trading taker fee + */ 'futuresTakerFee'?: string; /** - * Future trading maker fee - */ + * Future trading maker fee + */ 'futuresMakerFee'?: string; /** - * Delivery trading taker fee - */ + * Delivery trading taker fee + */ 'deliveryTakerFee'?: string; /** - * Delivery trading maker fee - */ + * Delivery trading maker fee + */ 'deliveryMakerFee'?: string; /** - * Deduction types for rates, 1 - GT deduction, 2 - Point card deduction, 3 - VIP rates - */ + * Deduction types for rates, 1 - GT deduction, 2 - Point card deduction, 3 - VIP rates + */ 'debitFee'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'userId', - baseName: 'user_id', - type: 'number', + "name": "userId", + "baseName": "user_id", + "type": "number" }, { - name: 'takerFee', - baseName: 'taker_fee', - type: 'string', + "name": "takerFee", + "baseName": "taker_fee", + "type": "string" }, { - name: 'makerFee', - baseName: 'maker_fee', - type: 'string', + "name": "makerFee", + "baseName": "maker_fee", + "type": "string" }, { - name: 'gtDiscount', - baseName: 'gt_discount', - type: 'boolean', + "name": "gtDiscount", + "baseName": "gt_discount", + "type": "boolean" }, { - name: 'gtTakerFee', - baseName: 'gt_taker_fee', - type: 'string', + "name": "gtTakerFee", + "baseName": "gt_taker_fee", + "type": "string" }, { - name: 'gtMakerFee', - baseName: 'gt_maker_fee', - type: 'string', + "name": "gtMakerFee", + "baseName": "gt_maker_fee", + "type": "string" }, { - name: 'loanFee', - baseName: 'loan_fee', - type: 'string', + "name": "loanFee", + "baseName": "loan_fee", + "type": "string" }, { - name: 'pointType', - baseName: 'point_type', - type: 'string', + "name": "pointType", + "baseName": "point_type", + "type": "string" }, { - name: 'futuresTakerFee', - baseName: 'futures_taker_fee', - type: 'string', + "name": "futuresTakerFee", + "baseName": "futures_taker_fee", + "type": "string" }, { - name: 'futuresMakerFee', - baseName: 'futures_maker_fee', - type: 'string', + "name": "futuresMakerFee", + "baseName": "futures_maker_fee", + "type": "string" }, { - name: 'deliveryTakerFee', - baseName: 'delivery_taker_fee', - type: 'string', + "name": "deliveryTakerFee", + "baseName": "delivery_taker_fee", + "type": "string" }, { - name: 'deliveryMakerFee', - baseName: 'delivery_maker_fee', - type: 'string', + "name": "deliveryMakerFee", + "baseName": "delivery_maker_fee", + "type": "string" }, { - name: 'debitFee', - baseName: 'debit_fee', - type: 'number', - }, - ]; + "name": "debitFee", + "baseName": "debit_fee", + "type": "number" + } ]; static getAttributeTypeMap() { return TradeFee.attributeTypeMap; } } + diff --git a/model/transactionID.ts b/model/transactionID.ts index 0267b28..147a889 100644 --- a/model/transactionID.ts +++ b/model/transactionID.ts @@ -9,23 +9,24 @@ * Do not edit the class manually. */ + export class TransactionID { /** - * Order id - */ + * Order id + */ 'txId'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'txId', - baseName: 'tx_id', - type: 'number', - }, - ]; + "name": "txId", + "baseName": "tx_id", + "type": "number" + } ]; static getAttributeTypeMap() { return TransactionID.attributeTypeMap; } } + diff --git a/model/transfer.ts b/model/transfer.ts index 9d175b5..f0a78b1 100644 --- a/model/transfer.ts +++ b/model/transfer.ts @@ -9,69 +9,69 @@ * Do not edit the class manually. */ + /** - * 转入转出账户列表: - `spot`: 现货账户 - `margin`: 杠杆账户 - `futures`: 永续合约账户 - `delivery`: 交割合约账户 - `options`: 期权账户 - */ +* Accounts available to transfer: - `spot`: spot account - `margin`: margin account - `futures`: perpetual futures account - `delivery`: delivery futures account - `options`: options account +*/ export class Transfer { /** - * Transfer currency. For futures account, `currency` can be set to `POINT` or settle currency - */ + * Transfer currency. For futures account, `currency` can be set to `POINT` or settle currency + */ 'currency': string; /** - * Account to transfer from - */ + * Account to transfer from + */ 'from': Transfer.From; /** - * Account to transfer to - */ + * Account to transfer to + */ 'to': Transfer.To; /** - * Transfer amount - */ + * Transfer amount + */ 'amount': string; /** - * Margin currency pair. Required if transfer from or to margin account - */ + * Margin currency pair. Required if transfer from or to margin account + */ 'currencyPair'?: string; /** - * Futures settle currency. Required if transferring from or to futures account - */ + * Futures settle currency. Required if transferring from or to futures account + */ 'settle'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'from', - baseName: 'from', - type: 'Transfer.From', + "name": "from", + "baseName": "from", + "type": "Transfer.From" }, { - name: 'to', - baseName: 'to', - type: 'Transfer.To', + "name": "to", + "baseName": "to", + "type": "Transfer.To" }, { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" }, { - name: 'settle', - baseName: 'settle', - type: 'string', - }, - ]; + "name": "settle", + "baseName": "settle", + "type": "string" + } ]; static getAttributeTypeMap() { return Transfer.attributeTypeMap; @@ -80,17 +80,17 @@ export class Transfer { export namespace Transfer { export enum From { - Spot = 'spot', - Margin = 'margin', - Futures = 'futures', - Delivery = 'delivery', - Options = 'options', + Spot = 'spot', + Margin = 'margin', + Futures = 'futures', + Delivery = 'delivery', + Options = 'options' } export enum To { - Spot = 'spot', - Margin = 'margin', - Futures = 'futures', - Delivery = 'delivery', - Options = 'options', + Spot = 'spot', + Margin = 'margin', + Futures = 'futures', + Delivery = 'delivery', + Options = 'options' } } diff --git a/model/inlineResponse200.ts b/model/transferOrderStatus.ts similarity index 51% rename from model/inlineResponse200.ts rename to model/transferOrderStatus.ts index ed32cf5..a6954ee 100644 --- a/model/inlineResponse200.ts +++ b/model/transferOrderStatus.ts @@ -9,32 +9,33 @@ * Do not edit the class manually. */ -export class InlineResponse200 { + +export class TransferOrderStatus { /** - * Order id - */ + * Order id + */ 'txId'?: string; /** - * 划转状态,PENDING - 处理中,SUCCESS - 划转成功,FAIL - 划转失败,PARTIAL_SUCCESS - 部分成功(子子划转时会出现此状态) - */ + * Transfer status, PENDING - in process, SUCCESS - successful transfer, FAIL - failed transfer, PARTIAL_SUCCESS - Partially successful (this status will appear when transferring between sub-subs) + */ 'status'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'txId', - baseName: 'tx_id', - type: 'string', + "name": "txId", + "baseName": "tx_id", + "type": "string" }, { - name: 'status', - baseName: 'status', - type: 'string', - }, - ]; + "name": "status", + "baseName": "status", + "type": "string" + } ]; static getAttributeTypeMap() { - return InlineResponse200.attributeTypeMap; + return TransferOrderStatus.attributeTypeMap; } } + diff --git a/model/triggerOrderResponse.ts b/model/triggerOrderResponse.ts index ba24f19..3f86e25 100644 --- a/model/triggerOrderResponse.ts +++ b/model/triggerOrderResponse.ts @@ -9,23 +9,24 @@ * Do not edit the class manually. */ + export class TriggerOrderResponse { /** - * Auto order ID - */ + * Auto order ID + */ 'id'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'number', - }, - ]; + "name": "id", + "baseName": "id", + "type": "number" + } ]; static getAttributeTypeMap() { return TriggerOrderResponse.attributeTypeMap; } } + diff --git a/model/triggerTime.ts b/model/triggerTime.ts index 56a3937..8976c9e 100644 --- a/model/triggerTime.ts +++ b/model/triggerTime.ts @@ -9,23 +9,24 @@ * Do not edit the class manually. */ + export class TriggerTime { /** - * Timestamp of the end of the countdown, in milliseconds - */ + * Timestamp of the end of the countdown, in milliseconds + */ 'triggerTime'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'triggerTime', - baseName: 'triggerTime', - type: 'number', - }, - ]; + "name": "triggerTime", + "baseName": "triggerTime", + "type": "number" + } ]; static getAttributeTypeMap() { return TriggerTime.attributeTypeMap; } } + diff --git a/model/uidPushOrder.ts b/model/uidPushOrder.ts index d28d3b6..ddc1d7d 100644 --- a/model/uidPushOrder.ts +++ b/model/uidPushOrder.ts @@ -9,95 +9,96 @@ * Do not edit the class manually. */ + export class UidPushOrder { /** - * Order ID - */ + * Order ID + */ 'id'?: number; /** - * 发起方用户ID - */ + * Initiator User ID + */ 'pushUid'?: number; /** - * 接收方用户ID - */ + * Recipient User ID + */ 'receiveUid'?: number; /** - * Currency name - */ + * Currency name + */ 'currency'?: string; /** - * 转账数量 - */ + * Transfer amount + */ 'amount'?: string; /** - * Creation time - */ + * Creation time + */ 'createTime'?: number; /** - * 提现状态: - CREATING: 创建中 - PENDING: 等待接收 (请联系对方在 Gate 官网接受转帐) - CANCELLING: 撤销中 - CANCELLED: 已撤销 - REFUSING: 拒绝中 - REFUSED: 已拒绝 - RECEIVING: 正在接收 - RECEIVED: 成功 - */ + * 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 + */ 'status'?: string; /** - * PENDING原因提示 - */ + * PENDING Reason Tips + */ 'message'?: string; /** - * 订单类型 - */ + * Order Type + */ 'transactionType'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'number', + "name": "id", + "baseName": "id", + "type": "number" }, { - name: 'pushUid', - baseName: 'push_uid', - type: 'number', + "name": "pushUid", + "baseName": "push_uid", + "type": "number" }, { - name: 'receiveUid', - baseName: 'receive_uid', - type: 'number', + "name": "receiveUid", + "baseName": "receive_uid", + "type": "number" }, { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'createTime', - baseName: 'create_time', - type: 'number', + "name": "createTime", + "baseName": "create_time", + "type": "number" }, { - name: 'status', - baseName: 'status', - type: 'string', + "name": "status", + "baseName": "status", + "type": "string" }, { - name: 'message', - baseName: 'message', - type: 'string', + "name": "message", + "baseName": "message", + "type": "string" }, { - name: 'transactionType', - baseName: 'transaction_type', - type: 'string', - }, - ]; + "name": "transactionType", + "baseName": "transaction_type", + "type": "string" + } ]; static getAttributeTypeMap() { return UidPushOrder.attributeTypeMap; } } + diff --git a/model/uidPushWithdrawal.ts b/model/uidPushWithdrawal.ts index 1c49cc5..83c354a 100644 --- a/model/uidPushWithdrawal.ts +++ b/model/uidPushWithdrawal.ts @@ -9,41 +9,42 @@ * Do not edit the class manually. */ + export class UidPushWithdrawal { /** - * 接收方uid - */ + * Recipient UID + */ 'receiveUid': number; /** - * Currency name - */ + * Currency name + */ 'currency': string; /** - * 转账数量 - */ + * Transfer amount + */ 'amount': string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'receiveUid', - baseName: 'receive_uid', - type: 'number', + "name": "receiveUid", + "baseName": "receive_uid", + "type": "number" }, { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', - }, - ]; + "name": "amount", + "baseName": "amount", + "type": "string" + } ]; static getAttributeTypeMap() { return UidPushWithdrawal.attributeTypeMap; } } + diff --git a/model/uidPushWithdrawalResp.ts b/model/uidPushWithdrawalResp.ts index 08c64fc..b9b4101 100644 --- a/model/uidPushWithdrawalResp.ts +++ b/model/uidPushWithdrawalResp.ts @@ -9,23 +9,24 @@ * Do not edit the class manually. */ + export class UidPushWithdrawalResp { /** - * Order ID - */ + * Order ID + */ 'id'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'number', - }, - ]; + "name": "id", + "baseName": "id", + "type": "number" + } ]; static getAttributeTypeMap() { return UidPushWithdrawalResp.attributeTypeMap; } } + diff --git a/model/uniCurrency.ts b/model/uniCurrency.ts index cc07802..255e90b 100644 --- a/model/uniCurrency.ts +++ b/model/uniCurrency.ts @@ -9,62 +9,63 @@ * Do not edit the class manually. */ + /** - * Currency detail - */ +* Currency detail +*/ export class UniCurrency { /** - * Currency name - */ + * Currency name + */ 'currency'?: string; /** - * The minimum lending amount, in the unit of the currency. - */ + * The minimum lending amount, in the unit of the currency. + */ 'minLendAmount'?: string; /** - * The total maximum lending amount, in USDT - */ + * The total maximum lending amount, in USDT + */ 'maxLendAmount'?: string; /** - * Maximum rate (Hourly) - */ + * Maximum rate (Hourly) + */ 'maxRate'?: string; /** - * Minimum rate (Hourly) - */ + * Minimum rate (Hourly) + */ 'minRate'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'minLendAmount', - baseName: 'min_lend_amount', - type: 'string', + "name": "minLendAmount", + "baseName": "min_lend_amount", + "type": "string" }, { - name: 'maxLendAmount', - baseName: 'max_lend_amount', - type: 'string', + "name": "maxLendAmount", + "baseName": "max_lend_amount", + "type": "string" }, { - name: 'maxRate', - baseName: 'max_rate', - type: 'string', + "name": "maxRate", + "baseName": "max_rate", + "type": "string" }, { - name: 'minRate', - baseName: 'min_rate', - type: 'string', - }, - ]; + "name": "minRate", + "baseName": "min_rate", + "type": "string" + } ]; static getAttributeTypeMap() { return UniCurrency.attributeTypeMap; } } + diff --git a/model/uniCurrencyInterest.ts b/model/uniCurrencyInterest.ts index 9227232..2875c09 100644 --- a/model/uniCurrencyInterest.ts +++ b/model/uniCurrencyInterest.ts @@ -9,32 +9,33 @@ * Do not edit the class manually. */ + export class UniCurrencyInterest { /** - * Currency - */ + * Currency + */ 'currency'?: string; /** - * Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment - */ + * Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment + */ 'interestStatus'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'interestStatus', - baseName: 'interest_status', - type: 'string', - }, - ]; + "name": "interestStatus", + "baseName": "interest_status", + "type": "string" + } ]; static getAttributeTypeMap() { return UniCurrencyInterest.attributeTypeMap; } } + diff --git a/model/uniCurrencyPair.ts b/model/uniCurrencyPair.ts index 3abb45b..604256e 100644 --- a/model/uniCurrencyPair.ts +++ b/model/uniCurrencyPair.ts @@ -9,53 +9,54 @@ * Do not edit the class manually. */ + /** - * Currency pair of the loan - */ +* Currency pair of the loan +*/ export class UniCurrencyPair { /** - * Currency pair - */ + * Currency pair + */ 'currencyPair'?: string; /** - * Minimum borrow amount of base currency - */ + * Minimum borrow amount of base currency + */ 'baseMinBorrowAmount'?: string; /** - * Minimum borrow amount of quote currency - */ + * Minimum borrow amount of quote currency + */ 'quoteMinBorrowAmount'?: string; /** - * Position leverage - */ + * Position leverage + */ 'leverage'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" }, { - name: 'baseMinBorrowAmount', - baseName: 'base_min_borrow_amount', - type: 'string', + "name": "baseMinBorrowAmount", + "baseName": "base_min_borrow_amount", + "type": "string" }, { - name: 'quoteMinBorrowAmount', - baseName: 'quote_min_borrow_amount', - type: 'string', + "name": "quoteMinBorrowAmount", + "baseName": "quote_min_borrow_amount", + "type": "string" }, { - name: 'leverage', - baseName: 'leverage', - type: 'string', - }, - ]; + "name": "leverage", + "baseName": "leverage", + "type": "string" + } ]; static getAttributeTypeMap() { return UniCurrencyPair.attributeTypeMap; } } + diff --git a/model/uniInterestMode.ts b/model/uniInterestMode.ts index 0ff97ea..88e365a 100644 --- a/model/uniInterestMode.ts +++ b/model/uniInterestMode.ts @@ -9,35 +9,36 @@ * Do not edit the class manually. */ + /** - * Lend & Earn interest reinvestment toggle - */ +* Lend & Earn interest reinvestment toggle +*/ export class UniInterestMode { /** - * Currency - */ + * Currency + */ 'currency': string; /** - * Interest toggle settings, true - interest reinvestment, false - regular dividend - */ + * Interest toggle settings, true - interest reinvestment, false - regular dividend + */ 'status': boolean; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'status', - baseName: 'status', - type: 'boolean', - }, - ]; + "name": "status", + "baseName": "status", + "type": "boolean" + } ]; static getAttributeTypeMap() { return UniInterestMode.attributeTypeMap; } } + diff --git a/model/uniInterestRecord.ts b/model/uniInterestRecord.ts index 48878b1..e1c2874 100644 --- a/model/uniInterestRecord.ts +++ b/model/uniInterestRecord.ts @@ -9,71 +9,72 @@ * Do not edit the class manually. */ + /** - * Interest Record - */ +* Interest Record +*/ export class UniInterestRecord { /** - * Status: 0 - fail, 1 - success - */ + * Status: 0 - fail, 1 - success + */ 'status'?: number; /** - * Currency - */ + * Currency + */ 'currency'?: string; /** - * Actual Rate - */ + * Actual Rate + */ 'actualRate'?: string; /** - * Interest - */ + * Interest + */ 'interest'?: string; /** - * Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment - */ + * Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment + */ 'interestStatus'?: string; /** - * Created time - */ + * Created time + */ 'createTime'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'status', - baseName: 'status', - type: 'number', + "name": "status", + "baseName": "status", + "type": "number" }, { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'actualRate', - baseName: 'actual_rate', - type: 'string', + "name": "actualRate", + "baseName": "actual_rate", + "type": "string" }, { - name: 'interest', - baseName: 'interest', - type: 'string', + "name": "interest", + "baseName": "interest", + "type": "string" }, { - name: 'interestStatus', - baseName: 'interest_status', - type: 'string', + "name": "interestStatus", + "baseName": "interest_status", + "type": "string" }, { - name: 'createTime', - baseName: 'create_time', - type: 'number', - }, - ]; + "name": "createTime", + "baseName": "create_time", + "type": "number" + } ]; static getAttributeTypeMap() { return UniInterestRecord.attributeTypeMap; } } + diff --git a/model/uniLend.ts b/model/uniLend.ts index 0347601..6d2e2e8 100644 --- a/model/uniLend.ts +++ b/model/uniLend.ts @@ -9,107 +9,108 @@ * Do not edit the class manually. */ + /** - * Loan record - */ +* Loan record +*/ export class UniLend { /** - * Currency - */ + * Currency + */ 'currency'?: string; /** - * Current amount - */ + * Current amount + */ 'currentAmount'?: string; /** - * Total amount - */ + * Total amount + */ 'amount'?: string; /** - * Lent amount - */ + * Lent amount + */ 'lentAmount'?: string; /** - * Frozen amount - */ + * Frozen amount + */ 'frozenAmount'?: string; /** - * Minimum interest rate - */ + * Minimum interest rate + */ 'minRate'?: string; /** - * Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment - */ + * Interest status: interest_dividend - regular dividend, interest_reinvest - interest reinvestment + */ 'interestStatus'?: string; /** - * Amount not reinvested - */ + * Amount not reinvested + */ 'reinvestLeftAmount'?: string; /** - * Created time of the lending order - */ + * Created time of the lending order + */ 'createTime'?: number; /** - * Upated time of the lending order - */ + * Upated time of the lending order + */ 'updateTime'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'currentAmount', - baseName: 'current_amount', - type: 'string', + "name": "currentAmount", + "baseName": "current_amount", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'lentAmount', - baseName: 'lent_amount', - type: 'string', + "name": "lentAmount", + "baseName": "lent_amount", + "type": "string" }, { - name: 'frozenAmount', - baseName: 'frozen_amount', - type: 'string', + "name": "frozenAmount", + "baseName": "frozen_amount", + "type": "string" }, { - name: 'minRate', - baseName: 'min_rate', - type: 'string', + "name": "minRate", + "baseName": "min_rate", + "type": "string" }, { - name: 'interestStatus', - baseName: 'interest_status', - type: 'string', + "name": "interestStatus", + "baseName": "interest_status", + "type": "string" }, { - name: 'reinvestLeftAmount', - baseName: 'reinvest_left_amount', - type: 'string', + "name": "reinvestLeftAmount", + "baseName": "reinvest_left_amount", + "type": "string" }, { - name: 'createTime', - baseName: 'create_time', - type: 'number', + "name": "createTime", + "baseName": "create_time", + "type": "number" }, { - name: 'updateTime', - baseName: 'update_time', - type: 'number', - }, - ]; + "name": "updateTime", + "baseName": "update_time", + "type": "number" + } ]; static getAttributeTypeMap() { return UniLend.attributeTypeMap; } } + diff --git a/model/uniLendInterest.ts b/model/uniLendInterest.ts index 5c0c26d..5b3f31e 100644 --- a/model/uniLendInterest.ts +++ b/model/uniLendInterest.ts @@ -9,32 +9,33 @@ * Do not edit the class manually. */ + export class UniLendInterest { /** - * Currency - */ + * Currency + */ 'currency'?: string; /** - * Interest - */ + * Interest + */ 'interest'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'interest', - baseName: 'interest', - type: 'string', - }, - ]; + "name": "interest", + "baseName": "interest", + "type": "string" + } ]; static getAttributeTypeMap() { return UniLendInterest.attributeTypeMap; } } + diff --git a/model/uniLendRecord.ts b/model/uniLendRecord.ts index cee78a8..23fc94a 100644 --- a/model/uniLendRecord.ts +++ b/model/uniLendRecord.ts @@ -9,80 +9,81 @@ * Do not edit the class manually. */ + /** - * Interest Record - */ +* Interest Record +*/ export class UniLendRecord { /** - * Currency name - */ + * Currency name + */ 'currency'?: string; /** - * current amount - */ + * current amount + */ 'amount'?: string; /** - * Last wallet amount - */ + * Last wallet amount + */ 'lastWalletAmount'?: string; /** - * Last lent amount - */ + * Last lent amount + */ 'lastLentAmount'?: string; /** - * Last frozen amount - */ + * Last frozen amount + */ 'lastFrozenAmount'?: string; /** - * Record type: lend - lend, redeem - redeem - */ + * Record type: lend - lend, redeem - redeem + */ 'type'?: string; /** - * Created time - */ + * Created time + */ 'createTime'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'lastWalletAmount', - baseName: 'last_wallet_amount', - type: 'string', + "name": "lastWalletAmount", + "baseName": "last_wallet_amount", + "type": "string" }, { - name: 'lastLentAmount', - baseName: 'last_lent_amount', - type: 'string', + "name": "lastLentAmount", + "baseName": "last_lent_amount", + "type": "string" }, { - name: 'lastFrozenAmount', - baseName: 'last_frozen_amount', - type: 'string', + "name": "lastFrozenAmount", + "baseName": "last_frozen_amount", + "type": "string" }, { - name: 'type', - baseName: 'type', - type: 'string', + "name": "type", + "baseName": "type", + "type": "string" }, { - name: 'createTime', - baseName: 'create_time', - type: 'number', - }, - ]; + "name": "createTime", + "baseName": "create_time", + "type": "number" + } ]; static getAttributeTypeMap() { return UniLendRecord.attributeTypeMap; } } + diff --git a/model/uniLoan.ts b/model/uniLoan.ts index fbdddb8..e693b20 100644 --- a/model/uniLoan.ts +++ b/model/uniLoan.ts @@ -9,71 +9,72 @@ * Do not edit the class manually. */ + /** - * Loan - */ +* Loan +*/ export class UniLoan { /** - * Currency - */ + * Currency + */ 'currency'?: string; /** - * Currency pair - */ + * Currency pair + */ 'currencyPair'?: string; /** - * amount - */ + * amount + */ 'amount'?: string; /** - * Loan type, platform - platform, margin - margin - */ + * Loan type, platform - platform, margin - margin + */ 'type'?: string; /** - * Created time - */ + * Created time + */ 'createTime'?: number; /** - * Updated time - */ + * Updated time + */ 'updateTime'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'type', - baseName: 'type', - type: 'string', + "name": "type", + "baseName": "type", + "type": "string" }, { - name: 'createTime', - baseName: 'create_time', - type: 'number', + "name": "createTime", + "baseName": "create_time", + "type": "number" }, { - name: 'updateTime', - baseName: 'update_time', - type: 'number', - }, - ]; + "name": "updateTime", + "baseName": "update_time", + "type": "number" + } ]; static getAttributeTypeMap() { return UniLoan.attributeTypeMap; } } + diff --git a/model/uniLoanInterestRecord.ts b/model/uniLoanInterestRecord.ts index 3c209ea..ab8e28b 100644 --- a/model/uniLoanInterestRecord.ts +++ b/model/uniLoanInterestRecord.ts @@ -9,80 +9,81 @@ * Do not edit the class manually. */ + /** - * Interest record - */ +* Interest record +*/ export class UniLoanInterestRecord { /** - * Currency name - */ + * Currency name + */ 'currency'?: string; /** - * Currency pair - */ + * Currency pair + */ 'currencyPair'?: string; /** - * Actual rate - */ + * Actual rate + */ 'actualRate'?: string; /** - * Interest - */ + * Interest + */ 'interest'?: string; /** - * Status: 0 - fail, 1 - success - */ + * Status: 0 - fail, 1 - success + */ 'status'?: number; /** - * Type, platform - platform,margin - margin - */ + * Type, platform - platform,margin - margin + */ 'type'?: string; /** - * Created time - */ + * Created time + */ 'createTime'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" }, { - name: 'actualRate', - baseName: 'actual_rate', - type: 'string', + "name": "actualRate", + "baseName": "actual_rate", + "type": "string" }, { - name: 'interest', - baseName: 'interest', - type: 'string', + "name": "interest", + "baseName": "interest", + "type": "string" }, { - name: 'status', - baseName: 'status', - type: 'number', + "name": "status", + "baseName": "status", + "type": "number" }, { - name: 'type', - baseName: 'type', - type: 'string', + "name": "type", + "baseName": "type", + "type": "string" }, { - name: 'createTime', - baseName: 'create_time', - type: 'number', - }, - ]; + "name": "createTime", + "baseName": "create_time", + "type": "number" + } ]; static getAttributeTypeMap() { return UniLoanInterestRecord.attributeTypeMap; } } + diff --git a/model/uniLoanRecord.ts b/model/uniLoanRecord.ts index eb9e1e2..e2d951d 100644 --- a/model/uniLoanRecord.ts +++ b/model/uniLoanRecord.ts @@ -9,62 +9,63 @@ * Do not edit the class manually. */ + /** - * Loan records - */ +* Loan records +*/ export class UniLoanRecord { /** - * type: borrow - borrow, repay - repay - */ + * type: borrow - borrow, repay - repay + */ 'type'?: string; /** - * Currency pair - */ + * Currency pair + */ 'currencyPair'?: string; /** - * Currency - */ + * Currency + */ 'currency'?: string; /** - * The amount of lending or repaying - */ + * The amount of lending or repaying + */ 'amount'?: string; /** - * Created time - */ + * Created time + */ 'createTime'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'type', - baseName: 'type', - type: 'string', + "name": "type", + "baseName": "type", + "type": "string" }, { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" }, { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'createTime', - baseName: 'create_time', - type: 'number', - }, - ]; + "name": "createTime", + "baseName": "create_time", + "type": "number" + } ]; static getAttributeTypeMap() { return UniLoanRecord.attributeTypeMap; } } + diff --git a/model/unifiedAccount.ts b/model/unifiedAccount.ts index 203ddea..e37855e 100644 --- a/model/unifiedAccount.ts +++ b/model/unifiedAccount.ts @@ -13,180 +13,180 @@ import { UnifiedBalance } from './unifiedBalance'; export class UnifiedAccount { /** - * User ID - */ + * User ID + */ 'userId'?: number; /** - * Time of the most recent refresh - */ + * Time of the most recent refresh + */ 'refreshTime'?: number; /** - * 账户是否被锁定,在跨币种保证金/组合保证金模式下有效,其他如单币种保证金模式下是false - */ + * Whether the account is locked, valid in cross-currency margin/combined margin mode, false in other modes such as single-currency margin mode + */ 'locked'?: boolean; - 'balances'?: { [key: string]: UnifiedBalance }; + 'balances'?: { [key: string]: UnifiedBalance; }; /** - * 折算成 USD 的账户总资产,即所有币种 `(available + freeze) * price` 之和,(已废弃,待下线字段,用unified_account_total代替) - */ + * 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) + */ 'total'?: string; /** - * 折算成 USD 的账户总借入数量,即所有币种(不包括点卡)的 `borrowed * price` 之和,在跨币种保证金/组合保证金模式下有效,其他如单币种保证金模式下是0 - */ + * 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. + */ 'borrowed'?: string; /** - * 总初始保证金,在跨币种保证金/组合保证金模式下有效,其他如单币种保证金模式下是0 - */ + * Total initial margin, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode + */ 'totalInitialMargin'?: string; /** - * 总保证金余额,在跨币种保证金/组合保证金模式下有效,其他如单币种保证金模式下是0 - */ + * Total margin balance, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode + */ 'totalMarginBalance'?: string; /** - * 总维持保证金,在跨币种保证金/组合保证金模式下有效,其他如单币种保证金模式下是0 - */ + * Total maintenance margin is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode + */ 'totalMaintenanceMargin'?: string; /** - * 总初始保证金率,在跨币种保证金/组合保证金模式下有效,其他如单币种保证金模式下是0 - */ + * Total initial margin rate, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode + */ 'totalInitialMarginRate'?: string; /** - * 总维持保证金率,在跨币种保证金/组合保证金模式下有效,其他如单币种保证金模式下是0 - */ + * Total maintenance margin rate, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode + */ 'totalMaintenanceMarginRate'?: string; /** - * 可用的保证金额度,在跨币种保证金/组合保证金模式下有效,其他如单币种保证金模式下是0 - */ + * Available margin amount, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode + */ 'totalAvailableMargin'?: string; /** - * 统一账户总资产,在单币种保证金/跨币种保证金/组合保证金模式模式下有效 - */ + * Unify the total account assets, valid in single currency margin/cross-currency margin/combined margin mode + */ 'unifiedAccountTotal'?: string; /** - * 统一账户总借贷,在跨币种保证金/组合保证金模式下有效,其他如单币种保证金模式下是0 - */ + * 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 + */ 'unifiedAccountTotalLiab'?: string; /** - * 统一账户总权益,在单币种保证金/跨币种保证金/组合保证金模式模式下有效 - */ + * Unify the total account equity, valid in single currency margin/cross-currency margin/combined margin mode + */ 'unifiedAccountTotalEquity'?: string; /** - * 实际杠杆,在跨币种保证金/组合保证金模式下有效 - */ + * Actual leverage, valid in cross-currency margin/combined margin mode + */ 'leverage'?: string; /** - * 总挂单损失,单位USDT,在跨币种保证金/组合保证金模式下有效,其他如单币种保证金模式下是0 - */ + * Total pending order loss, in USDT, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode + */ 'spotOrderLoss'?: string; /** - * 现货对冲状态, true - 启用,false - 未启用 - */ + * Spot hedging status, true - enabled, false - not enabled. + */ 'spotHedge'?: boolean; /** - * 是否将余币宝理财资金作为保证金 - */ + * Whether to use funds as margin + */ 'useFunding'?: boolean; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'userId', - baseName: 'user_id', - type: 'number', + "name": "userId", + "baseName": "user_id", + "type": "number" }, { - name: 'refreshTime', - baseName: 'refresh_time', - type: 'number', + "name": "refreshTime", + "baseName": "refresh_time", + "type": "number" }, { - name: 'locked', - baseName: 'locked', - type: 'boolean', + "name": "locked", + "baseName": "locked", + "type": "boolean" }, { - name: 'balances', - baseName: 'balances', - type: '{ [key: string]: UnifiedBalance; }', + "name": "balances", + "baseName": "balances", + "type": "{ [key: string]: UnifiedBalance; }" }, { - name: 'total', - baseName: 'total', - type: 'string', + "name": "total", + "baseName": "total", + "type": "string" }, { - name: 'borrowed', - baseName: 'borrowed', - type: 'string', + "name": "borrowed", + "baseName": "borrowed", + "type": "string" }, { - name: 'totalInitialMargin', - baseName: 'total_initial_margin', - type: 'string', + "name": "totalInitialMargin", + "baseName": "total_initial_margin", + "type": "string" }, { - name: 'totalMarginBalance', - baseName: 'total_margin_balance', - type: 'string', + "name": "totalMarginBalance", + "baseName": "total_margin_balance", + "type": "string" }, { - name: 'totalMaintenanceMargin', - baseName: 'total_maintenance_margin', - type: 'string', + "name": "totalMaintenanceMargin", + "baseName": "total_maintenance_margin", + "type": "string" }, { - name: 'totalInitialMarginRate', - baseName: 'total_initial_margin_rate', - type: 'string', + "name": "totalInitialMarginRate", + "baseName": "total_initial_margin_rate", + "type": "string" }, { - name: 'totalMaintenanceMarginRate', - baseName: 'total_maintenance_margin_rate', - type: 'string', + "name": "totalMaintenanceMarginRate", + "baseName": "total_maintenance_margin_rate", + "type": "string" }, { - name: 'totalAvailableMargin', - baseName: 'total_available_margin', - type: 'string', + "name": "totalAvailableMargin", + "baseName": "total_available_margin", + "type": "string" }, { - name: 'unifiedAccountTotal', - baseName: 'unified_account_total', - type: 'string', + "name": "unifiedAccountTotal", + "baseName": "unified_account_total", + "type": "string" }, { - name: 'unifiedAccountTotalLiab', - baseName: 'unified_account_total_liab', - type: 'string', + "name": "unifiedAccountTotalLiab", + "baseName": "unified_account_total_liab", + "type": "string" }, { - name: 'unifiedAccountTotalEquity', - baseName: 'unified_account_total_equity', - type: 'string', + "name": "unifiedAccountTotalEquity", + "baseName": "unified_account_total_equity", + "type": "string" }, { - name: 'leverage', - baseName: 'leverage', - type: 'string', + "name": "leverage", + "baseName": "leverage", + "type": "string" }, { - name: 'spotOrderLoss', - baseName: 'spot_order_loss', - type: 'string', + "name": "spotOrderLoss", + "baseName": "spot_order_loss", + "type": "string" }, { - name: 'spotHedge', - baseName: 'spot_hedge', - type: 'boolean', + "name": "spotHedge", + "baseName": "spot_hedge", + "type": "boolean" }, { - name: 'useFunding', - baseName: 'use_funding', - type: 'boolean', - }, - ]; + "name": "useFunding", + "baseName": "use_funding", + "type": "boolean" + } ]; static getAttributeTypeMap() { return UnifiedAccount.attributeTypeMap; } } + diff --git a/model/unifiedBalance.ts b/model/unifiedBalance.ts index cd38c35..7757bea 100644 --- a/model/unifiedBalance.ts +++ b/model/unifiedBalance.ts @@ -9,185 +9,186 @@ * Do not edit the class manually. */ + export class UnifiedBalance { /** - * 可用额度,在单币种保证金/跨币种保证金/组合保证金模式模式下有效,不同模式计算不一样 - */ + * Available amount is valid in single currency margin/cross-currency margin/combined margin mode, and the calculation is different in different modes + */ 'available'?: string; /** - * 被锁定的额度,在单币种保证金/跨币种保证金/组合保证金模式模式下有效 - */ + * The locked amount is valid in single currency margin/cross-currency margin/combined margin mode + */ 'freeze'?: string; /** - * 借入额度,在跨币种保证金/组合保证金模式下有效,其他如单币种保证金模式下是0 - */ + * Borrow limit, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode + */ 'borrowed'?: string; /** - * 负余额借贷,在跨币种保证金/组合保证金模式下有效,其他如单币种保证金模式下是0 - */ + * Negative balance loan is valid in cross-currency margin/combined margin mode, and is 0 in other modes such as single-currency margin mode + */ 'negativeLiab'?: string; /** - * 合约开仓借币(已废弃,待下线字段) - */ + * Contract opening position borrowing currency (abandoned, to be offline field) + */ 'futuresPosLiab'?: string; /** - * 权益,在单币种保证金/跨币种保证金/组合保证金模式模式下有效 - */ + * Equity, valid in single currency margin/cross currency margin/combined margin mode + */ 'equity'?: string; /** - * 总占用(已废弃,待下线字段) - */ + * Total occupancy (discarded, to be offline field) + */ 'totalFreeze'?: string; /** - * 总借款,在跨币种保证金/组合保证金模式下有效,其他如单币种保证金模式下是0 - */ + * Total borrowing, valid in cross-currency margin/combined margin mode, 0 in other modes such as single-currency margin mode + */ 'totalLiab'?: string; /** - * 现货对冲占用数量,在组合保证金模式下有效,其他如单币种、跨币种保证金模式下是0 - */ + * 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 + */ 'spotInUse'?: string; /** - * 余币宝理财数量,在余币宝理财作为统一账户保证金开关打开有效 - */ + * Uniloan financial management amount, effective when Uniloan financial management is turned on as a unified account margin switch + */ 'funding'?: string; /** - * 余币宝理财版本号 - */ + * Funding version + */ 'fundingVersion'?: string; /** - * 全仓余额,在单币种保证金模式下有效,其他如跨币种保证金/组合保证金模式下是0 - */ + * Full margin balance is valid in single currency margin mode, and is 0 in other modes such as cross currency margin/combined margin mode + */ 'crossBalance'?: string; /** - * 逐仓余额,在单币种保证金模式下有效,其他如跨币种保证金/组合保证金模式下是0 - */ + * Isolated margin balance is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode + */ 'isoBalance'?: string; /** - * 全仓初始保证金,在单币种保证金模式下有效,其他如跨币种保证金/组合保证金模式下是0 - */ + * 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 + */ 'im'?: string; /** - * 全仓维持保证金率,在单币种保证金模式下有效,其他如跨币种保证金/组合保证金模式下是0 - */ + * 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 + */ 'mm'?: string; /** - * 全仓初始保证金率,在单币种保证金模式下有效,其他如跨币种保证金/组合保证金模式下是0 - */ + * 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 + */ 'imr'?: string; /** - * 全仓维持保证金率,在单币种保证金模式下有效,其他如跨币种保证金/组合保证金模式下是0 - */ + * 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 + */ 'mmr'?: string; /** - * 全仓保证金余额,在单币种保证金模式下有效,其他如跨币种保证金/组合保证金模式下是0 - */ + * Full margin balance is valid in single currency margin mode and is 0 in other modes such as cross currency margin/combined margin mode + */ 'marginBalance'?: string; /** - * 全仓可用保证金,在单币种保证金模式下有效,其他如跨币种保证金/组合保证金模式下是0 - */ + * 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 + */ 'availableMargin'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'available', - baseName: 'available', - type: 'string', + "name": "available", + "baseName": "available", + "type": "string" }, { - name: 'freeze', - baseName: 'freeze', - type: 'string', + "name": "freeze", + "baseName": "freeze", + "type": "string" }, { - name: 'borrowed', - baseName: 'borrowed', - type: 'string', + "name": "borrowed", + "baseName": "borrowed", + "type": "string" }, { - name: 'negativeLiab', - baseName: 'negative_liab', - type: 'string', + "name": "negativeLiab", + "baseName": "negative_liab", + "type": "string" }, { - name: 'futuresPosLiab', - baseName: 'futures_pos_liab', - type: 'string', + "name": "futuresPosLiab", + "baseName": "futures_pos_liab", + "type": "string" }, { - name: 'equity', - baseName: 'equity', - type: 'string', + "name": "equity", + "baseName": "equity", + "type": "string" }, { - name: 'totalFreeze', - baseName: 'total_freeze', - type: 'string', + "name": "totalFreeze", + "baseName": "total_freeze", + "type": "string" }, { - name: 'totalLiab', - baseName: 'total_liab', - type: 'string', + "name": "totalLiab", + "baseName": "total_liab", + "type": "string" }, { - name: 'spotInUse', - baseName: 'spot_in_use', - type: 'string', + "name": "spotInUse", + "baseName": "spot_in_use", + "type": "string" }, { - name: 'funding', - baseName: 'funding', - type: 'string', + "name": "funding", + "baseName": "funding", + "type": "string" }, { - name: 'fundingVersion', - baseName: 'funding_version', - type: 'string', + "name": "fundingVersion", + "baseName": "funding_version", + "type": "string" }, { - name: 'crossBalance', - baseName: 'cross_balance', - type: 'string', + "name": "crossBalance", + "baseName": "cross_balance", + "type": "string" }, { - name: 'isoBalance', - baseName: 'iso_balance', - type: 'string', + "name": "isoBalance", + "baseName": "iso_balance", + "type": "string" }, { - name: 'im', - baseName: 'im', - type: 'string', + "name": "im", + "baseName": "im", + "type": "string" }, { - name: 'mm', - baseName: 'mm', - type: 'string', + "name": "mm", + "baseName": "mm", + "type": "string" }, { - name: 'imr', - baseName: 'imr', - type: 'string', + "name": "imr", + "baseName": "imr", + "type": "string" }, { - name: 'mmr', - baseName: 'mmr', - type: 'string', + "name": "mmr", + "baseName": "mmr", + "type": "string" }, { - name: 'marginBalance', - baseName: 'margin_balance', - type: 'string', + "name": "marginBalance", + "baseName": "margin_balance", + "type": "string" }, { - name: 'availableMargin', - baseName: 'available_margin', - type: 'string', - }, - ]; + "name": "availableMargin", + "baseName": "available_margin", + "type": "string" + } ]; static getAttributeTypeMap() { return UnifiedBalance.attributeTypeMap; } } + diff --git a/model/unifiedBorrowable.ts b/model/unifiedBorrowable.ts index 2e677a7..036cfe6 100644 --- a/model/unifiedBorrowable.ts +++ b/model/unifiedBorrowable.ts @@ -9,32 +9,33 @@ * Do not edit the class manually. */ + export class UnifiedBorrowable { /** - * Currency detail - */ + * Currency detail + */ 'currency'?: string; /** - * Max borrowable amount - */ + * Max borrowable amount + */ 'amount'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', - }, - ]; + "name": "amount", + "baseName": "amount", + "type": "string" + } ]; static getAttributeTypeMap() { return UnifiedBorrowable.attributeTypeMap; } } + diff --git a/model/unifiedDiscount.ts b/model/unifiedDiscount.ts index 215f2c7..9379d99 100644 --- a/model/unifiedDiscount.ts +++ b/model/unifiedDiscount.ts @@ -12,34 +12,34 @@ import { UnifiedDiscountTiers } from './unifiedDiscountTiers'; /** - * Currency discount tiers - */ +* Currency discount tiers +*/ export class UnifiedDiscount { /** - * Currency name - */ + * Currency name + */ 'currency'?: string; /** - * Tiered discount - */ + * Tiered discount + */ 'discountTiers'?: Array; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'discountTiers', - baseName: 'discount_tiers', - type: 'Array', - }, - ]; + "name": "discountTiers", + "baseName": "discount_tiers", + "type": "Array" + } ]; static getAttributeTypeMap() { return UnifiedDiscount.attributeTypeMap; } } + diff --git a/model/unifiedDiscountTiers.ts b/model/unifiedDiscountTiers.ts index 00a1472..fd839a4 100644 --- a/model/unifiedDiscountTiers.ts +++ b/model/unifiedDiscountTiers.ts @@ -9,59 +9,60 @@ * Do not edit the class manually. */ + export class UnifiedDiscountTiers { /** - * Tier - */ + * Tier + */ 'tier'?: string; /** - * Discount - */ + * Discount + */ 'discount'?: string; /** - * Lower limit - */ + * Lower limit + */ 'lowerLimit'?: string; /** - * Upper limit,+ indicates positive infinity - */ + * Upper limit,+ indicates positive infinity + */ 'upperLimit'?: string; /** - * Position leverage - */ + * Position leverage + */ 'leverage'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'tier', - baseName: 'tier', - type: 'string', + "name": "tier", + "baseName": "tier", + "type": "string" }, { - name: 'discount', - baseName: 'discount', - type: 'string', + "name": "discount", + "baseName": "discount", + "type": "string" }, { - name: 'lowerLimit', - baseName: 'lower_limit', - type: 'string', + "name": "lowerLimit", + "baseName": "lower_limit", + "type": "string" }, { - name: 'upperLimit', - baseName: 'upper_limit', - type: 'string', + "name": "upperLimit", + "baseName": "upper_limit", + "type": "string" }, { - name: 'leverage', - baseName: 'leverage', - type: 'string', - }, - ]; + "name": "leverage", + "baseName": "leverage", + "type": "string" + } ]; static getAttributeTypeMap() { return UnifiedDiscountTiers.attributeTypeMap; } } + diff --git a/model/unifiedHistoryLoanRate.ts b/model/unifiedHistoryLoanRate.ts index 9779262..e6987c7 100644 --- a/model/unifiedHistoryLoanRate.ts +++ b/model/unifiedHistoryLoanRate.ts @@ -13,48 +13,48 @@ import { UnifiedHistoryLoanRateRates } from './unifiedHistoryLoanRateRates'; export class UnifiedHistoryLoanRate { /** - * Currency name - */ + * Currency name + */ 'currency'?: string; /** - * 需要获取的上浮费率的vip等级 - */ + * The VIP level of the floating rate required + */ 'tier'?: string; /** - * vip等级对应的上浮费率 - */ + * VIP level corresponding floating rate + */ 'tierUpRate'?: string; /** - * 历史利率信息,每个整点小时一个数据,数组大小根据接口请求参数提供的page和limit参数确定,按照时间从近到远排序 - */ + * 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 + */ 'rates'?: Array; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'tier', - baseName: 'tier', - type: 'string', + "name": "tier", + "baseName": "tier", + "type": "string" }, { - name: 'tierUpRate', - baseName: 'tier_up_rate', - type: 'string', + "name": "tierUpRate", + "baseName": "tier_up_rate", + "type": "string" }, { - name: 'rates', - baseName: 'rates', - type: 'Array', - }, - ]; + "name": "rates", + "baseName": "rates", + "type": "Array" + } ]; static getAttributeTypeMap() { return UnifiedHistoryLoanRate.attributeTypeMap; } } + diff --git a/model/unifiedHistoryLoanRateRates.ts b/model/unifiedHistoryLoanRateRates.ts index ad03056..af036f5 100644 --- a/model/unifiedHistoryLoanRateRates.ts +++ b/model/unifiedHistoryLoanRateRates.ts @@ -9,32 +9,33 @@ * Do not edit the class manually. */ + export class UnifiedHistoryLoanRateRates { /** - * 该利率对应的整点小时时间戳,单位为毫秒 - */ + * The hourly timestamp corresponding to the interest rate, in milliseconds + */ 'time'?: number; /** - * 该整点小时的历史利率 - */ + * Historical interest rates for this hour + */ 'rate'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'time', - baseName: 'time', - type: 'number', + "name": "time", + "baseName": "time", + "type": "number" }, { - name: 'rate', - baseName: 'rate', - type: 'string', - }, - ]; + "name": "rate", + "baseName": "rate", + "type": "string" + } ]; static getAttributeTypeMap() { return UnifiedHistoryLoanRateRates.attributeTypeMap; } } + diff --git a/model/unifiedLeverageConfig.ts b/model/unifiedLeverageConfig.ts index 6f07168..53d19c1 100644 --- a/model/unifiedLeverageConfig.ts +++ b/model/unifiedLeverageConfig.ts @@ -9,77 +9,78 @@ * Do not edit the class manually. */ + export class UnifiedLeverageConfig { /** - * 当前杠杆倍数 - */ + * Current leverage ratio + */ 'currentLeverage'?: string; /** - * 最小可调杠杆倍数 - */ + * Minimum adjustable leverage ratio + */ 'minLeverage'?: string; /** - * 最大可调杠杆倍数 - */ + * Maximum adjustable leverage ratio + */ 'maxLeverage'?: string; /** - * 当前负债 - */ + * Current liabilities + */ 'debit'?: string; /** - * 可用保证金 - */ + * Available Margin + */ 'availableMargin'?: string; /** - * 当前选择杠杆可借 - */ + * The current leverage you can choose is + */ 'borrowable'?: string; /** - * 保证金最大可借、余币宝最大可借,两者取较小的值 - */ + * The maximum amount of margin that can be borrowed and the maximum amount of Uniloan that can be borrowed, whichever is smaller + */ 'exceptLeverageBorrowable'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currentLeverage', - baseName: 'current_leverage', - type: 'string', + "name": "currentLeverage", + "baseName": "current_leverage", + "type": "string" }, { - name: 'minLeverage', - baseName: 'min_leverage', - type: 'string', + "name": "minLeverage", + "baseName": "min_leverage", + "type": "string" }, { - name: 'maxLeverage', - baseName: 'max_leverage', - type: 'string', + "name": "maxLeverage", + "baseName": "max_leverage", + "type": "string" }, { - name: 'debit', - baseName: 'debit', - type: 'string', + "name": "debit", + "baseName": "debit", + "type": "string" }, { - name: 'availableMargin', - baseName: 'available_margin', - type: 'string', + "name": "availableMargin", + "baseName": "available_margin", + "type": "string" }, { - name: 'borrowable', - baseName: 'borrowable', - type: 'string', + "name": "borrowable", + "baseName": "borrowable", + "type": "string" }, { - name: 'exceptLeverageBorrowable', - baseName: 'except_leverage_borrowable', - type: 'string', - }, - ]; + "name": "exceptLeverageBorrowable", + "baseName": "except_leverage_borrowable", + "type": "string" + } ]; static getAttributeTypeMap() { return UnifiedLeverageConfig.attributeTypeMap; } } + diff --git a/model/unifiedLeverageSetting.ts b/model/unifiedLeverageSetting.ts index f2bc498..891289c 100644 --- a/model/unifiedLeverageSetting.ts +++ b/model/unifiedLeverageSetting.ts @@ -9,35 +9,36 @@ * Do not edit the class manually. */ + /** - * 借贷币种杠杆倍数 - */ +* Loan currency leverage +*/ export class UnifiedLeverageSetting { /** - * Currency name - */ + * Currency name + */ 'currency': string; /** - * 倍数 - */ + * multiple + */ 'leverage': string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'leverage', - baseName: 'leverage', - type: 'string', - }, - ]; + "name": "leverage", + "baseName": "leverage", + "type": "string" + } ]; static getAttributeTypeMap() { return UnifiedLeverageSetting.attributeTypeMap; } } + diff --git a/model/unifiedLoan.ts b/model/unifiedLoan.ts index 05897c2..1d68097 100644 --- a/model/unifiedLoan.ts +++ b/model/unifiedLoan.ts @@ -9,60 +9,60 @@ * Do not edit the class manually. */ + /** - * Borrow or repay - */ +* Borrow or repay +*/ export class UnifiedLoan { /** - * Currency - */ + * Currency + */ 'currency': string; /** - * type: borrow - borrow, repay - repay - */ + * type: borrow - borrow, repay - repay + */ 'type': UnifiedLoan.Type; /** - * The amount of lending or repaying - */ + * The amount of lending or repaying + */ 'amount': string; /** - * Full repayment is solely for repayment operations. When set to \'true,\' it overrides the \'amount,\' allowing for direct full repayment. - */ + * Full repayment is solely for repayment operations. When set to \'true,\' it overrides the \'amount,\' allowing for direct full repayment. + */ 'repaidAll'?: boolean; /** - * User defined custom ID - */ + * User defined custom ID + */ 'text'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'type', - baseName: 'type', - type: 'UnifiedLoan.Type', + "name": "type", + "baseName": "type", + "type": "UnifiedLoan.Type" }, { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'repaidAll', - baseName: 'repaid_all', - type: 'boolean', + "name": "repaidAll", + "baseName": "repaid_all", + "type": "boolean" }, { - name: 'text', - baseName: 'text', - type: 'string', - }, - ]; + "name": "text", + "baseName": "text", + "type": "string" + } ]; static getAttributeTypeMap() { return UnifiedLoan.attributeTypeMap; @@ -71,7 +71,7 @@ export class UnifiedLoan { export namespace UnifiedLoan { export enum Type { - Borrow = 'borrow', - Repay = 'repay', + Borrow = 'borrow', + Repay = 'repay' } } diff --git a/model/unifiedLoanRecord.ts b/model/unifiedLoanRecord.ts index bca2ff4..d663474 100644 --- a/model/unifiedLoanRecord.ts +++ b/model/unifiedLoanRecord.ts @@ -9,89 +9,90 @@ * Do not edit the class manually. */ + /** - * Loan records - */ +* Loan records +*/ export class UnifiedLoanRecord { /** - * id - */ + * id + */ 'id'?: number; /** - * type: borrow - borrow, repay - repay - */ + * type: borrow - borrow, repay - repay + */ 'type'?: string; /** - * Repayment type: none - no repayment type, manual_repay - manual repayment, auto_repay - automatic repayment, cancel_auto_repay - automatic repayment after cancellation - */ + * Repayment type: none - no repayment type, manual_repay - manual repayment, auto_repay - automatic repayment, cancel_auto_repay - automatic repayment after cancellation + */ 'repaymentType'?: string; /** - * 借款类型, 查询借款记录时返回,manual_borrow - 手动还款 , auto_borrow - 自动还款 - */ + * Loan type, returned when querying loan records. manual_borrow - Manual repayment , auto_borrow - Automatic repayment + */ 'borrowType'?: string; /** - * Currency pair - */ + * Currency pair + */ 'currencyPair'?: string; /** - * Currency - */ + * Currency + */ 'currency'?: string; /** - * The amount of lending or repaying - */ + * The amount of lending or repaying + */ 'amount'?: string; /** - * Created time - */ + * Created time + */ 'createTime'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'number', + "name": "id", + "baseName": "id", + "type": "number" }, { - name: 'type', - baseName: 'type', - type: 'string', + "name": "type", + "baseName": "type", + "type": "string" }, { - name: 'repaymentType', - baseName: 'repayment_type', - type: 'string', + "name": "repaymentType", + "baseName": "repayment_type", + "type": "string" }, { - name: 'borrowType', - baseName: 'borrow_type', - type: 'string', + "name": "borrowType", + "baseName": "borrow_type", + "type": "string" }, { - name: 'currencyPair', - baseName: 'currency_pair', - type: 'string', + "name": "currencyPair", + "baseName": "currency_pair", + "type": "string" }, { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'createTime', - baseName: 'create_time', - type: 'number', - }, - ]; + "name": "createTime", + "baseName": "create_time", + "type": "number" + } ]; static getAttributeTypeMap() { return UnifiedLoanRecord.attributeTypeMap; } } + diff --git a/model/unifiedMarginTiers.ts b/model/unifiedMarginTiers.ts index cdaf575..50073c8 100644 --- a/model/unifiedMarginTiers.ts +++ b/model/unifiedMarginTiers.ts @@ -12,34 +12,34 @@ import { MarginTiers } from './marginTiers'; /** - * 统一账户借贷保证金梯度 - */ +* Unified margin tiers +*/ export class UnifiedMarginTiers { /** - * Currency name - */ + * Currency name + */ 'currency'?: string; /** - * 阶梯式保证金 - */ + * Margin tiers + */ 'marginTiers'?: Array; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'marginTiers', - baseName: 'margin_tiers', - type: 'Array', - }, - ]; + "name": "marginTiers", + "baseName": "margin_tiers", + "type": "Array" + } ]; static getAttributeTypeMap() { return UnifiedMarginTiers.attributeTypeMap; } } + diff --git a/model/unifiedMode.ts b/model/unifiedMode.ts deleted file mode 100644 index e717ded..0000000 --- a/model/unifiedMode.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Gate API v4 - * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. - * - * Contact: support@mail.gate.io - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export class UnifiedMode { - /** - * Portfolio mode - cross_margin : cross margin - usdt_futures : usdt futures - */ - 'mode': string; - /** - * Is it enabled? - */ - 'enabled': boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ - { - name: 'mode', - baseName: 'mode', - type: 'string', - }, - { - name: 'enabled', - baseName: 'enabled', - type: 'boolean', - }, - ]; - - static getAttributeTypeMap() { - return UnifiedMode.attributeTypeMap; - } -} diff --git a/model/unifiedModeSet.ts b/model/unifiedModeSet.ts index 6bc1460..7b1709c 100644 --- a/model/unifiedModeSet.ts +++ b/model/unifiedModeSet.ts @@ -13,27 +13,27 @@ import { UnifiedSettings } from './unifiedSettings'; export class UnifiedModeSet { /** - * 统一账户模式: - `classic`: 经典账户模式 - `multi_currency`: 跨币种保证金模式 - `portfolio`: 组合保证金模式 - `single_currency`: 单币种保证金模式 - */ + * Unified account mode: - `classic`: Classic account mode - `multi_currency`: Multi-currency margin mode - `portfolio`: Portfolio margin mode - `single_currency`: Single Currency Margin Model + */ 'mode': string; 'settings'?: UnifiedSettings; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'mode', - baseName: 'mode', - type: 'string', + "name": "mode", + "baseName": "mode", + "type": "string" }, { - name: 'settings', - baseName: 'settings', - type: 'UnifiedSettings', - }, - ]; + "name": "settings", + "baseName": "settings", + "type": "UnifiedSettings" + } ]; static getAttributeTypeMap() { return UnifiedModeSet.attributeTypeMap; } } + diff --git a/model/unifiedPortfolioInput.ts b/model/unifiedPortfolioInput.ts index be8441e..6360fc2 100644 --- a/model/unifiedPortfolioInput.ts +++ b/model/unifiedPortfolioInput.ts @@ -17,79 +17,79 @@ import { MockSpotBalance } from './mockSpotBalance'; import { MockSpotOrder } from './mockSpotOrder'; /** - * 组合保证金计算器输入 - */ +* Input for the portfolio margin calculator. +*/ export class UnifiedPortfolioInput { /** - * 现货 - */ + * Spot + */ 'spotBalances'?: Array; /** - * 现货订单 - */ + * Spot orders + */ 'spotOrders'?: Array; /** - * 合约仓位 - */ + * Futures positions + */ 'futuresPositions'?: Array; /** - * 合约订单 - */ + * Futures order + */ 'futuresOrders'?: Array; /** - * 期权仓位 - */ + * Options positions + */ 'optionsPositions'?: Array; /** - * 期权订单 - */ + * Option orders + */ 'optionsOrders'?: Array; /** - * 是否开启现货对冲 - */ + * Whether to enable spot hedging. + */ 'spotHedge'?: boolean; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'spotBalances', - baseName: 'spot_balances', - type: 'Array', + "name": "spotBalances", + "baseName": "spot_balances", + "type": "Array" }, { - name: 'spotOrders', - baseName: 'spot_orders', - type: 'Array', + "name": "spotOrders", + "baseName": "spot_orders", + "type": "Array" }, { - name: 'futuresPositions', - baseName: 'futures_positions', - type: 'Array', + "name": "futuresPositions", + "baseName": "futures_positions", + "type": "Array" }, { - name: 'futuresOrders', - baseName: 'futures_orders', - type: 'Array', + "name": "futuresOrders", + "baseName": "futures_orders", + "type": "Array" }, { - name: 'optionsPositions', - baseName: 'options_positions', - type: 'Array', + "name": "optionsPositions", + "baseName": "options_positions", + "type": "Array" }, { - name: 'optionsOrders', - baseName: 'options_orders', - type: 'Array', + "name": "optionsOrders", + "baseName": "options_orders", + "type": "Array" }, { - name: 'spotHedge', - baseName: 'spot_hedge', - type: 'boolean', - }, - ]; + "name": "spotHedge", + "baseName": "spot_hedge", + "type": "boolean" + } ]; static getAttributeTypeMap() { return UnifiedPortfolioInput.attributeTypeMap; } } + diff --git a/model/unifiedPortfolioOutput.ts b/model/unifiedPortfolioOutput.ts index 86929d4..bb88838 100644 --- a/model/unifiedPortfolioOutput.ts +++ b/model/unifiedPortfolioOutput.ts @@ -12,52 +12,52 @@ import { MockRiskUnit } from './mockRiskUnit'; /** - * 组合保证金计算器输出 - */ +* The output of the portfolio margin calculator. +*/ export class UnifiedPortfolioOutput { /** - * 总维持保证金,只包含risk unit的仓位的组合保证金计算结果,不包含借币保证金。如果存在借币,实际还会产生常规的借币保证金要求。 - */ + * 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. + */ 'maintainMarginTotal'?: string; /** - * 总起始保证金,为以下三个组合的最大计算结果:仓位、仓位+正delta挂单、仓位+负delta挂单 - */ + * Total initial margin, calculated as the maximum of the following three combinations: position, position + positive delta orders, position + negative delta orders. + */ 'initialMarginTotal'?: string; /** - * 计算时间 - */ + * Calculate time + */ 'calculateTime'?: number; /** - * 风险单元 - */ + * Risk unit + */ 'riskUnit'?: Array; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'maintainMarginTotal', - baseName: 'maintain_margin_total', - type: 'string', + "name": "maintainMarginTotal", + "baseName": "maintain_margin_total", + "type": "string" }, { - name: 'initialMarginTotal', - baseName: 'initial_margin_total', - type: 'string', + "name": "initialMarginTotal", + "baseName": "initial_margin_total", + "type": "string" }, { - name: 'calculateTime', - baseName: 'calculate_time', - type: 'number', + "name": "calculateTime", + "baseName": "calculate_time", + "type": "number" }, { - name: 'riskUnit', - baseName: 'risk_unit', - type: 'Array', - }, - ]; + "name": "riskUnit", + "baseName": "risk_unit", + "type": "Array" + } ]; static getAttributeTypeMap() { return UnifiedPortfolioOutput.attributeTypeMap; } } + diff --git a/model/unifiedRiskUnits.ts b/model/unifiedRiskUnits.ts index 926bcb3..6ed629d 100644 --- a/model/unifiedRiskUnits.ts +++ b/model/unifiedRiskUnits.ts @@ -13,39 +13,39 @@ import { RiskUnits } from './riskUnits'; export class UnifiedRiskUnits { /** - * User ID - */ + * User ID + */ 'userId'?: number; /** - * 现货对冲状态, true - 启用,false - 未启用 - */ + * Spot hedging status, true - enabled, false - not enabled. + */ 'spotHedge'?: boolean; /** - * 风险单元 - */ + * Risk unit + */ 'riskUnits'?: Array; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'userId', - baseName: 'user_id', - type: 'number', + "name": "userId", + "baseName": "user_id", + "type": "number" }, { - name: 'spotHedge', - baseName: 'spot_hedge', - type: 'boolean', + "name": "spotHedge", + "baseName": "spot_hedge", + "type": "boolean" }, { - name: 'riskUnits', - baseName: 'risk_units', - type: 'Array', - }, - ]; + "name": "riskUnits", + "baseName": "risk_units", + "type": "Array" + } ]; static getAttributeTypeMap() { return UnifiedRiskUnits.attributeTypeMap; } } + diff --git a/model/unifiedSettings.ts b/model/unifiedSettings.ts index 5e97f00..68a6069 100644 --- a/model/unifiedSettings.ts +++ b/model/unifiedSettings.ts @@ -9,50 +9,51 @@ * Do not edit the class manually. */ + export class UnifiedSettings { /** - * USDT合约开关。跨币种保证金模式下只能打开不能关闭 - */ + * USDT contract switch. In cross-currency margin mode, it can only be turned on and not off + */ 'usdtFutures'?: boolean; /** - * 现货对冲开关。 - */ + * Spot hedging switch. + */ 'spotHedge'?: boolean; /** - * 余币宝开关,当mode为跨币种保证金模式时,是否将余币宝理财资金作为保证金 - */ + * switch, when the mode is cross-currency margin mode, whether to use Uniloan financial funds as margin + */ 'useFunding'?: boolean; /** - * 期权开关。跨币种保证金模式下只能打开不能关闭 - */ + * Option switch. In cross-currency margin mode, it can only be turned on and not off + */ 'options'?: boolean; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'usdtFutures', - baseName: 'usdt_futures', - type: 'boolean', + "name": "usdtFutures", + "baseName": "usdt_futures", + "type": "boolean" }, { - name: 'spotHedge', - baseName: 'spot_hedge', - type: 'boolean', + "name": "spotHedge", + "baseName": "spot_hedge", + "type": "boolean" }, { - name: 'useFunding', - baseName: 'use_funding', - type: 'boolean', + "name": "useFunding", + "baseName": "use_funding", + "type": "boolean" }, { - name: 'options', - baseName: 'options', - type: 'boolean', - }, - ]; + "name": "options", + "baseName": "options", + "type": "boolean" + } ]; static getAttributeTypeMap() { return UnifiedSettings.attributeTypeMap; } } + diff --git a/model/unifiedTransferable.ts b/model/unifiedTransferable.ts index 7f1d75e..23cd07b 100644 --- a/model/unifiedTransferable.ts +++ b/model/unifiedTransferable.ts @@ -9,32 +9,33 @@ * Do not edit the class manually. */ + export class UnifiedTransferable { /** - * Currency detail - */ + * Currency detail + */ 'currency'?: string; /** - * The maximum amount that can be transferred out - */ + * The maximum amount that can be transferred out + */ 'amount'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', - }, - ]; + "name": "amount", + "baseName": "amount", + "type": "string" + } ]; static getAttributeTypeMap() { return UnifiedTransferable.attributeTypeMap; } } + diff --git a/model/userLtvInfo.ts b/model/userLtvInfo.ts index 7db21f6..feafa8e 100644 --- a/model/userLtvInfo.ts +++ b/model/userLtvInfo.ts @@ -9,80 +9,81 @@ * Do not edit the class manually. */ + /** - * User\'s currency statistics data - */ +* User\'s currency statistics data +*/ export class UserLtvInfo { /** - * Collateral - */ + * Collateral + */ 'collateralCurrency'?: string; /** - * Borrowed currency - */ + * Borrowed currency + */ 'borrowCurrency'?: string; /** - * The initial collateralization rate - */ + * The initial collateralization rate + */ 'initLtv'?: string; /** - * Warning collateralization ratio - */ + * Warning collateralization ratio + */ 'alertLtv'?: string; /** - * The liquidation collateralization rate - */ + * The liquidation collateralization rate + */ 'liquidateLtv'?: string; /** - * Minimum borrowable amount for the loan currency - */ + * Minimum borrowable amount for the loan currency + */ 'minBorrowAmount'?: string; /** - * Remaining borrowable amount for the loan currency - */ + * Remaining borrowable amount for the loan currency + */ 'leftBorrowableAmount'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'collateralCurrency', - baseName: 'collateral_currency', - type: 'string', + "name": "collateralCurrency", + "baseName": "collateral_currency", + "type": "string" }, { - name: 'borrowCurrency', - baseName: 'borrow_currency', - type: 'string', + "name": "borrowCurrency", + "baseName": "borrow_currency", + "type": "string" }, { - name: 'initLtv', - baseName: 'init_ltv', - type: 'string', + "name": "initLtv", + "baseName": "init_ltv", + "type": "string" }, { - name: 'alertLtv', - baseName: 'alert_ltv', - type: 'string', + "name": "alertLtv", + "baseName": "alert_ltv", + "type": "string" }, { - name: 'liquidateLtv', - baseName: 'liquidate_ltv', - type: 'string', + "name": "liquidateLtv", + "baseName": "liquidate_ltv", + "type": "string" }, { - name: 'minBorrowAmount', - baseName: 'min_borrow_amount', - type: 'string', + "name": "minBorrowAmount", + "baseName": "min_borrow_amount", + "type": "string" }, { - name: 'leftBorrowableAmount', - baseName: 'left_borrowable_amount', - type: 'string', - }, - ]; + "name": "leftBorrowableAmount", + "baseName": "left_borrowable_amount", + "type": "string" + } ]; static getAttributeTypeMap() { return UserLtvInfo.attributeTypeMap; } } + diff --git a/model/userSub.ts b/model/userSub.ts index 13052eb..48e2f26 100644 --- a/model/userSub.ts +++ b/model/userSub.ts @@ -9,50 +9,51 @@ * Do not edit the class manually. */ + export class UserSub { /** - * User ID - */ + * User ID + */ 'uid'?: number; /** - * 用户所属体系(partner / referral),为空表示不属于任何体系 - */ + * The system to which the user belongs (partner referral). If empty, it means not belonging to any system. + */ 'belong'?: string; /** - * 类型(0-不在体系 1-直接下级代理 2-间接下级代理 3-直接直客 4-间接直客 5-普通用户) - */ + * 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) + */ 'type'?: number; /** - * 邀请人用户ID - */ + * Inviter user ID + */ 'refUid'?: number; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'uid', - baseName: 'uid', - type: 'number', + "name": "uid", + "baseName": "uid", + "type": "number" }, { - name: 'belong', - baseName: 'belong', - type: 'string', + "name": "belong", + "baseName": "belong", + "type": "string" }, { - name: 'type', - baseName: 'type', - type: 'number', + "name": "type", + "baseName": "type", + "type": "number" }, { - name: 'refUid', - baseName: 'ref_uid', - type: 'number', - }, - ]; + "name": "refUid", + "baseName": "ref_uid", + "type": "number" + } ]; static getAttributeTypeMap() { return UserSub.attributeTypeMap; } } + diff --git a/model/userSubRelation.ts b/model/userSubRelation.ts index 984877b..1b22b4a 100644 --- a/model/userSubRelation.ts +++ b/model/userSubRelation.ts @@ -13,21 +13,21 @@ import { UserSub } from './userSub'; export class UserSubRelation { /** - * 下级关系列表 - */ + * Subordinate relationship list + */ 'list'?: Array; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'list', - baseName: 'list', - type: 'Array', - }, - ]; + "name": "list", + "baseName": "list", + "type": "Array" + } ]; static getAttributeTypeMap() { return UserSubRelation.attributeTypeMap; } } + diff --git a/model/userTotalAmount.ts b/model/userTotalAmount.ts index 16c404c..54f5202 100644 --- a/model/userTotalAmount.ts +++ b/model/userTotalAmount.ts @@ -9,35 +9,36 @@ * Do not edit the class manually. */ + /** - * Total borrowed amount and pledged collateral amount by the user - */ +* Total borrowed amount and pledged collateral amount by the user +*/ export class UserTotalAmount { /** - * Total borrowing amount, calculated in USDT - */ + * Total borrowing amount, calculated in USDT + */ 'borrowAmount'?: string; /** - * Total collateral amount, calculated in USDT - */ + * Total collateral amount, calculated in USDT + */ 'collateralAmount'?: string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'borrowAmount', - baseName: 'borrow_amount', - type: 'string', + "name": "borrowAmount", + "baseName": "borrow_amount", + "type": "string" }, { - name: 'collateralAmount', - baseName: 'collateral_amount', - type: 'string', - }, - ]; + "name": "collateralAmount", + "baseName": "collateral_amount", + "type": "string" + } ]; static getAttributeTypeMap() { return UserTotalAmount.attributeTypeMap; } } + diff --git a/model/withdrawStatus.ts b/model/withdrawStatus.ts index 7c1b4c5..e967ff0 100644 --- a/model/withdrawStatus.ts +++ b/model/withdrawStatus.ts @@ -9,122 +9,123 @@ * Do not edit the class manually. */ + export class WithdrawStatus { /** - * Currency - */ + * Currency + */ 'currency'?: string; /** - * Currency name - */ + * Currency name + */ 'name'?: string; /** - * Currency Chinese name - */ + * Currency Chinese name + */ 'nameCn'?: string; /** - * Deposits fee - */ + * Deposits fee + */ 'deposit'?: string; /** - * Withdrawal fee rate percentage - */ + * Withdrawal fee rate percentage + */ 'withdrawPercent'?: string; /** - * Fixed withdrawal fee - */ + * Fixed withdrawal fee + */ 'withdrawFix'?: string; /** - * Daily allowed withdrawal amount - */ + * Daily allowed withdrawal amount + */ 'withdrawDayLimit'?: string; /** - * Minimum withdrawal amount - */ + * Minimum withdrawal amount + */ 'withdrawAmountMini'?: string; /** - * Daily withdrawal amount left - */ + * Daily withdrawal amount left + */ 'withdrawDayLimitRemain'?: string; /** - * Maximum amount for each withdrawal - */ + * Maximum amount for each withdrawal + */ 'withdrawEachtimeLimit'?: string; /** - * Fixed withdrawal fee on multiple chains - */ - 'withdrawFixOnChains'?: { [key: string]: string }; + * Fixed withdrawal fee on multiple chains + */ + 'withdrawFixOnChains'?: { [key: string]: string; }; /** - * Percentage withdrawal fee on multiple chains - */ - 'withdrawPercentOnChains'?: { [key: string]: string }; + * Percentage withdrawal fee on multiple chains + */ + 'withdrawPercentOnChains'?: { [key: string]: string; }; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'name', - baseName: 'name', - type: 'string', + "name": "name", + "baseName": "name", + "type": "string" }, { - name: 'nameCn', - baseName: 'name_cn', - type: 'string', + "name": "nameCn", + "baseName": "name_cn", + "type": "string" }, { - name: 'deposit', - baseName: 'deposit', - type: 'string', + "name": "deposit", + "baseName": "deposit", + "type": "string" }, { - name: 'withdrawPercent', - baseName: 'withdraw_percent', - type: 'string', + "name": "withdrawPercent", + "baseName": "withdraw_percent", + "type": "string" }, { - name: 'withdrawFix', - baseName: 'withdraw_fix', - type: 'string', + "name": "withdrawFix", + "baseName": "withdraw_fix", + "type": "string" }, { - name: 'withdrawDayLimit', - baseName: 'withdraw_day_limit', - type: 'string', + "name": "withdrawDayLimit", + "baseName": "withdraw_day_limit", + "type": "string" }, { - name: 'withdrawAmountMini', - baseName: 'withdraw_amount_mini', - type: 'string', + "name": "withdrawAmountMini", + "baseName": "withdraw_amount_mini", + "type": "string" }, { - name: 'withdrawDayLimitRemain', - baseName: 'withdraw_day_limit_remain', - type: 'string', + "name": "withdrawDayLimitRemain", + "baseName": "withdraw_day_limit_remain", + "type": "string" }, { - name: 'withdrawEachtimeLimit', - baseName: 'withdraw_eachtime_limit', - type: 'string', + "name": "withdrawEachtimeLimit", + "baseName": "withdraw_eachtime_limit", + "type": "string" }, { - name: 'withdrawFixOnChains', - baseName: 'withdraw_fix_on_chains', - type: '{ [key: string]: string; }', + "name": "withdrawFixOnChains", + "baseName": "withdraw_fix_on_chains", + "type": "{ [key: string]: string; }" }, { - name: 'withdrawPercentOnChains', - baseName: 'withdraw_percent_on_chains', - type: '{ [key: string]: string; }', - }, - ]; + "name": "withdrawPercentOnChains", + "baseName": "withdraw_percent_on_chains", + "type": "{ [key: string]: string; }" + } ]; static getAttributeTypeMap() { return WithdrawStatus.attributeTypeMap; } } + diff --git a/model/withdrawalRecord.ts b/model/withdrawalRecord.ts index 27abbbc..8b5fe62 100644 --- a/model/withdrawalRecord.ts +++ b/model/withdrawalRecord.ts @@ -9,120 +9,120 @@ * Do not edit the class manually. */ + export class WithdrawalRecord { /** - * Record ID - */ + * Record ID + */ 'id'?: string; /** - * Hash record of the withdrawal - */ + * Hash record of the withdrawal + */ 'txid'?: string; /** - * 区块编号 - */ + * 区块编号 + */ 'blockNumber'?: string; /** - * Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) - */ + * Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) + */ 'withdrawOrderId'?: string; /** - * Operation time - */ + * Operation time + */ 'timestamp'?: string; /** - * Currency amount - */ + * Currency amount + */ 'amount': string; /** - * fee - */ + * fee + */ 'fee'?: string; /** - * Currency name - */ + * Currency name + */ 'currency': string; /** - * Withdrawal address. Required for withdrawals - */ + * Withdrawal address. Required for withdrawals + */ 'address'?: string; /** - * Additional remarks with regards to the withdrawal - */ + * Additional remarks with regards to the withdrawal + */ 'memo'?: string; /** - * 交易状态 - DONE: 完成 (block_number > 0 才算真的上链完成) - CANCEL: 已取消 - REQUEST: 请求中 - MANUAL: 待人工审核 - BCODE: 充值码操作 - EXTPEND: 已经发送等待确认 - FAIL: 链上失败等待确认 - INVALID: 无效订单 - VERIFY: 验证中 - PROCES: 处理中 - PEND: 处理中 - DMOVE: 待人工审核 - SPLITPEND: cny提现大于5w,自动分单 - */ + * 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 - SPLITPEND: cny withdrawal is greater than 50,000, orders will be split automatically + */ 'status'?: WithdrawalRecord.Status; /** - * Name of the chain used in withdrawals - */ + * Name of the chain used in withdrawals + */ 'chain': string; static discriminator: string | undefined = undefined; - static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - name: 'id', - baseName: 'id', - type: 'string', + "name": "id", + "baseName": "id", + "type": "string" }, { - name: 'txid', - baseName: 'txid', - type: 'string', + "name": "txid", + "baseName": "txid", + "type": "string" }, { - name: 'blockNumber', - baseName: 'block_number', - type: 'string', + "name": "blockNumber", + "baseName": "block_number", + "type": "string" }, { - name: 'withdrawOrderId', - baseName: 'withdraw_order_id', - type: 'string', + "name": "withdrawOrderId", + "baseName": "withdraw_order_id", + "type": "string" }, { - name: 'timestamp', - baseName: 'timestamp', - type: 'string', + "name": "timestamp", + "baseName": "timestamp", + "type": "string" }, { - name: 'amount', - baseName: 'amount', - type: 'string', + "name": "amount", + "baseName": "amount", + "type": "string" }, { - name: 'fee', - baseName: 'fee', - type: 'string', + "name": "fee", + "baseName": "fee", + "type": "string" }, { - name: 'currency', - baseName: 'currency', - type: 'string', + "name": "currency", + "baseName": "currency", + "type": "string" }, { - name: 'address', - baseName: 'address', - type: 'string', + "name": "address", + "baseName": "address", + "type": "string" }, { - name: 'memo', - baseName: 'memo', - type: 'string', + "name": "memo", + "baseName": "memo", + "type": "string" }, { - name: 'status', - baseName: 'status', - type: 'WithdrawalRecord.Status', + "name": "status", + "baseName": "status", + "type": "WithdrawalRecord.Status" }, { - name: 'chain', - baseName: 'chain', - type: 'string', - }, - ]; + "name": "chain", + "baseName": "chain", + "type": "string" + } ]; static getAttributeTypeMap() { return WithdrawalRecord.attributeTypeMap; @@ -131,18 +131,18 @@ export class WithdrawalRecord { export namespace WithdrawalRecord { export enum Status { - DONE = 'DONE', - CANCEL = 'CANCEL', - REQUEST = 'REQUEST', - MANUAL = 'MANUAL', - BCODE = 'BCODE', - EXTPEND = 'EXTPEND', - FAIL = 'FAIL', - INVALID = 'INVALID', - VERIFY = 'VERIFY', - PROCES = 'PROCES', - PEND = 'PEND', - DMOVE = 'DMOVE', - SPLITPEND = 'SPLITPEND', + DONE = 'DONE', + CANCEL = 'CANCEL', + REQUEST = 'REQUEST', + MANUAL = 'MANUAL', + BCODE = 'BCODE', + EXTPEND = 'EXTPEND', + FAIL = 'FAIL', + INVALID = 'INVALID', + VERIFY = 'VERIFY', + PROCES = 'PROCES', + PEND = 'PEND', + DMOVE = 'DMOVE', + SPLITPEND = 'SPLITPEND' } } diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index c187820..0000000 --- a/package-lock.json +++ /dev/null @@ -1,2274 +0,0 @@ -{ - "name": "gate-api", - "version": "5.90.1", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "gate-api", - "version": "5.90.1", - "license": "Unlicense", - "dependencies": { - "@types/node": "^8.10.48", - "axios": "^0.21.1", - "json-bigint": "^1.0.0" - }, - "devDependencies": { - "@typescript-eslint/eslint-plugin": "^3.7.0", - "@typescript-eslint/parser": "^3.7.0", - "eslint": "^7.5.0", - "eslint-config-prettier": "^6.11.0", - "eslint-plugin-prettier": "^3.1.4", - "prettier": "^2.0.5", - "rewire": "^3.0.2", - "typescript": "^3.7.9" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.10.4" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", - "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.25.9.tgz", - "integrity": "sha512-llL88JShoCsth8fF8R4SJnIn+WLvR6ccFxu1H3FlMhDontdcmZWf2HgIZ7AIqV3Xcck1idlohrN4EUBQz6klbw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.25.9", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", - "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^13.9.0", - "ignore": "^4.0.6", - "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", - "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", - "deprecated": "Use @eslint/config-array instead", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.0", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "deprecated": "Use @eslint/object-schema instead", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@types/eslint-visitor-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "8.10.66", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", - "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==", - "license": "MIT" - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.10.1.tgz", - "integrity": "sha512-PQg0emRtzZFWq6PxBcdxRH3QIQiyFO3WCVpRL3fgj5oQS3CDs3AeAKfv4DxNhzn8ITdNJGJ4D3Qw8eAJf3lXeQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/experimental-utils": "3.10.1", - "debug": "^4.1.1", - "functional-red-black-tree": "^1.0.1", - "regexpp": "^3.0.0", - "semver": "^7.3.2", - "tsutils": "^3.17.1" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^3.0.0", - "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/experimental-utils": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.10.1.tgz", - "integrity": "sha512-DewqIgscDzmAfd5nOGe4zm6Bl7PKtMG2Ad0KG8CUZAHlXfAKTF9Ol5PXhiMh39yRL2ChRH1cuuUGOcVyyrhQIw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/types": "3.10.1", - "@typescript-eslint/typescript-estree": "3.10.1", - "eslint-scope": "^5.0.0", - "eslint-utils": "^2.0.0" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-3.10.1.tgz", - "integrity": "sha512-Ug1RcWcrJP02hmtaXVS3axPPTTPnZjupqhgj+NnZ6BCkwSImWk/283347+x9wN+lqOdK9Eo3vsyiyDHgsmiEJw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "3.10.1", - "@typescript-eslint/types": "3.10.1", - "@typescript-eslint/typescript-estree": "3.10.1", - "eslint-visitor-keys": "^1.1.0" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/types": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-3.10.1.tgz", - "integrity": "sha512-+3+FCUJIahE9q0lDi1WleYzjCwJs5hIsbugIgnbB+dSCYUxl8L6PwmsyOPFZde2hc1DlTo/xnkOgiTLSyAbHiQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.10.1.tgz", - "integrity": "sha512-QbcXOuq6WYvnB3XPsZpIwztBoquEYLXh2MtwVU+kO8jgYCiv4G5xrSP/1wg4tkvrEE+esZVquIPX/dxPlePk1w==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "3.10.1", - "@typescript-eslint/visitor-keys": "3.10.1", - "debug": "^4.1.1", - "glob": "^7.1.6", - "is-glob": "^4.0.1", - "lodash": "^4.17.15", - "semver": "^7.3.2", - "tsutils": "^3.17.1" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-3.10.1.tgz", - "integrity": "sha512-9JgC82AaQeglebjZMgYR5wgmfUdUc+EitGUUMW8u2nDckaeimzW+VsoLV6FoimPv2id3VQzfjwBxEMVz08ameQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^1.1.0" - }, - "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "license": "MIT", - "dependencies": { - "follow-redirects": "^1.14.0" - } - }, - "node_modules/babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha512-XqYMR2dfdGMW+hd0IUZ2PwK+fGeFkOxZJ0wY+JaQAHzt1Zx8LcvpiZD2NiGkEG8qx0CfkAOr5xt76d1e8vG90g==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - } - }, - "node_modules/babel-code-frame/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/babel-code-frame/node_modules/ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/babel-code-frame/node_modules/chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/babel-code-frame/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/babel-code-frame/node_modules/js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha512-RjTcuD4xjtthQkaWH7dFlH85L+QaVtSoOyGdZ3g6HFhS9dFNDfLyqgm2NFe2X6cQpeFmt0452FJjFG5UameExg==", - "dev": true, - "license": "MIT" - }, - "node_modules/babel-code-frame/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/babel-code-frame/node_modules/supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/babel-core": { - "version": "6.26.3", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", - "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-code-frame": "^6.26.0", - "babel-generator": "^6.26.0", - "babel-helpers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-register": "^6.26.0", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "convert-source-map": "^1.5.1", - "debug": "^2.6.9", - "json5": "^0.5.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.4", - "path-is-absolute": "^1.0.1", - "private": "^0.1.8", - "slash": "^1.0.0", - "source-map": "^0.5.7" - } - }, - "node_modules/babel-core/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/babel-core/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true, - "license": "MIT" - }, - "node_modules/babel-generator": { - "version": "6.26.1", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", - "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" - } - }, - "node_modules/babel-helpers": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", - "integrity": "sha512-n7pFrqQm44TCYvrCDb0MqabAF+JUBq+ijBvNMUxpkLjJaAu32faIexewMumrH5KLLJ1HDyT0PTEqRyAe/GwwuQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "node_modules/babel-messages": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", - "integrity": "sha512-Bl3ZiA+LjqaMtNYopA9TYE9HP1tQ+E5dLxE0XrAzcIJeK2UqF0/EaqXwBn9esd4UmTfEab+P+UYQ1GnioFIb/w==", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-runtime": "^6.22.0" - } - }, - "node_modules/babel-plugin-transform-es2015-block-scoping": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", - "integrity": "sha512-YiN6sFAQ5lML8JjCmr7uerS5Yc/EMbgg9G8ZNmk2E3nYX4ckHR01wrkeeMijEf5WHNK5TW0Sl0Uu3pv3EdOJWw==", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" - } - }, - "node_modules/babel-register": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", - "integrity": "sha512-veliHlHX06wjaeY8xNITbveXSiI+ASFnOqvne/LaIJIqOWi2Ogmj91KOugEz/hoh/fwMhXNBJPCv8Xaz5CyM4A==", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-core": "^6.26.0", - "babel-runtime": "^6.26.0", - "core-js": "^2.5.0", - "home-or-tmp": "^2.0.0", - "lodash": "^4.17.4", - "mkdirp": "^0.5.1", - "source-map-support": "^0.4.15" - } - }, - "node_modules/babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==", - "dev": true, - "license": "MIT", - "dependencies": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, - "node_modules/babel-template": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", - "integrity": "sha512-PCOcLFW7/eazGUKIoqH97sO9A2UYMahsn/yRQ7uOk37iutwjq7ODtcTNF+iFDSHNfkctqsLRjLP7URnOx0T1fg==", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" - } - }, - "node_modules/babel-traverse": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha512-iSxeXx7apsjCHe9c7n8VtRXGzI2Bk1rBSOJgCCjfyXb6v1aCqE1KSEpq/8SXuVN8Ka/Rh1WDTF0MDzkvTA4MIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" - } - }, - "node_modules/babel-traverse/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/babel-traverse/node_modules/globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/babel-traverse/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true, - "license": "MIT" - }, - "node_modules/babel-types": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha512-zhe3V/26rCWsEZK8kZN+HaQj5yQ1CilTObixFzKW1UWjqG7618Twz6YEsCnjfg5gBcJh02DrpCkS9h98ZqDY+g==", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" - } - }, - "node_modules/babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", - "dev": true, - "license": "MIT", - "bin": { - "babylon": "bin/babylon.js" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/bignumber.js": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", - "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "license": "MIT" - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" - }, - "node_modules/convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true, - "license": "MIT" - }, - "node_modules/core-js": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", - "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", - "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.", - "dev": true, - "hasInstallScript": true, - "license": "MIT" - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/detect-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", - "integrity": "sha512-BDKtmHlOzwI7iRuEkhzsnPoi5ypEhWAJB5RvHWe1kMr06js3uK5B3734i3ui5Yd+wOJV1cpE4JnivPD283GU/A==", - "dev": true, - "license": "MIT", - "dependencies": { - "repeating": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/enquirer": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", - "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-colors": "^4.1.1", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "7.32.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", - "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", - "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.3", - "@humanwhocodes/config-array": "^0.5.0", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "enquirer": "^2.3.5", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.1.2", - "globals": "^13.6.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", - "strip-json-comments": "^3.1.0", - "table": "^6.0.9", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-config-prettier": { - "version": "6.15.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz", - "integrity": "sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-stdin": "^6.0.0" - }, - "bin": { - "eslint-config-prettier-check": "bin/cli.js" - }, - "peerDependencies": { - "eslint": ">=3.14.1" - } - }, - "node_modules/eslint-plugin-prettier": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.1.tgz", - "integrity": "sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g==", - "dev": true, - "license": "MIT", - "dependencies": { - "prettier-linter-helpers": "^1.0.0" - }, - "engines": { - "node": ">=6.0.0" - }, - "peerDependencies": { - "eslint": ">=5.0.0", - "prettier": ">=1.13.0" - }, - "peerDependenciesMeta": { - "eslint-config-prettier": { - "optional": true - } - } - }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^1.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10" - } - }, - "node_modules/espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/esquery": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-diff": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", - "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-uri": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz", - "integrity": "sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fastify" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fastify" - } - ], - "license": "BSD-3-Clause" - }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", - "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", - "dev": true, - "license": "ISC" - }, - "node_modules/follow-redirects": { - "version": "1.15.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", - "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "license": "MIT", - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true, - "license": "ISC" - }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true, - "license": "MIT" - }, - "node_modules/get-stdin": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", - "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-ansi/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/home-or-tmp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", - "integrity": "sha512-ycURW7oUxE2sNiPVw1HVEFsW+ecOpJ5zaj7eC0RlwhibhRBod20muUN8qu/gzx956YrLolVvs1MTXwKgC2rVEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dev": true, - "license": "MIT", - "dependencies": { - "loose-envify": "^1.0.0" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-finite": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", - "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "license": "ISC" - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsesc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha512-Mke0DA0QjUWuJlhsE0ZPPhYiJkRap642SmI/4ztCFaUs6V2AiH1sfecc+57NgaryfAA2VR3v6O+CSjC1jZJKOA==", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - } - }, - "node_modules/json-bigint": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", - "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", - "license": "MIT", - "dependencies": { - "bignumber.js": "^9.0.0" - } - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha512-4xrs1aW+6N5DalkqSVA8fxh458CXvR99WU8WLKmq4v8eWAL86Xo3BVqyd3SkA9wEVjCMqyvvRRkshAdOnBp5rw==", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - } - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", - "dev": true, - "license": "MIT" - }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true, - "license": "MIT" - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, - "license": "ISC" - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/prettier-linter-helpers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", - "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-diff": "^1.1.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/private": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", - "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true, - "license": "MIT" - }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha512-ZqtSMuVybkISo2OWvqvm7iHSWngvdaW3IpsT9/uP8v4gMi591LY6h35wdOfvQdWCKFWZWm2Y1Opp4kV7vQKT6A==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-finite": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/rewire": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rewire/-/rewire-3.0.2.tgz", - "integrity": "sha512-ejkkt3qYnsQ38ifc9llAAzuHiGM7kR8N5/mL3aHWgmWwet0OMFcmJB8aTsMV2PBHCWxNVTLCeRfBpEa8X2+1fw==", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-core": "^6.26.0", - "babel-plugin-transform-es2015-block-scoping": "^6.26.0" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha512-3TYDR7xWt4dIqV2JauJr+EJeW356RXijHeUlO+8djJ+uBXPn8/2dpzBc8yQhh583sVvc9CvFAeQVgijsH+PNNg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", - "dev": true, - "license": "MIT", - "dependencies": { - "source-map": "^0.5.6" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/table": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/table/-/table-6.9.0.tgz", - "integrity": "sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "ajv": "^8.0.1", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/table/node_modules/ajv": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", - "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/table/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true, - "license": "MIT" - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true, - "license": "MIT" - }, - "node_modules/to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha512-lxrWP8ejsq+7E3nNjwYmUBMAgjMTZoTI+sdBOpvNyijeDLa29LUn9QaoXAHv4+Z578hbmHHJKZknzxVtvo77og==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha512-WZGXGstmCWgeevgTL54hrCuw1dyMQIzWy7ZfqRJfSmJZBwklI15egmQytFP6bPidmw3M8d5yEowl1niq4vmqZw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true, - "license": "0BSD" - }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/typescript": { - "version": "3.9.10", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", - "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/v8-compile-cache": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz", - "integrity": "sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==", - "dev": true, - "license": "MIT" - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, - "license": "ISC" - } - } -} diff --git a/package.json b/package.json index cfaa5f3..36c5f01 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gate-api", - "version": "5.90.1", + "version": "6.91.0", "description": "NodeJS client for gate-api", "repository": "gateio/gateapi-nodejs", "main": "dist/api.js",