UNPKG

@binance/connector-typescript

Version:

This is a lightweight library that works as a connector to the Binance public API.

1 lines 548 kB
{"version":3,"sources":["../src/modules/restful/convert/types.ts","../src/modules/restful/dualInvestment/types.ts","../src/modules/restful/margin/types.ts","../src/modules/restful/market/types.ts","../src/modules/restful/portfolioMargin/types.ts","../src/modules/restful/simpleEarn/types.ts","../src/modules/restful/stream/types.ts","../src/modules/restful/subAccount/types.ts","../src/modules/restful/trade/types.ts","../src/modules/restful/wallet/types.ts","../src/modules/websocket/websocketAPI/account/types.ts","../src/modules/websocket/websocketAPI/market/types.ts","../src/modules/websocket/websocketAPI/trade/types.ts","../src/modules/websocket/websocketAPI/userData/methods.ts","../src/modules/websocket/websocketStream/methods.ts","../src/helpers/utils.ts","../package.json","../src/helpers/constants.ts","../src/setters/mixinBase.ts","../src/modules/restful/convert/convert.ts","../src/modules/restful/dualInvestment/dualInvestment.ts","../src/modules/restful/margin/margin.ts","../src/modules/restful/market/market.ts","../src/modules/restful/portfolioMargin/portfolioMargin.ts","../src/modules/restful/simpleEarn/simpleEarn.ts","../src/modules/restful/stream/stream.ts","../src/modules/restful/subAccount/subAccount.ts","../src/modules/restful/trade/trade.ts","../src/modules/restful/wallet/wallet.ts","../src/modules/websocket/websocketAPI/account/account.ts","../src/modules/websocket/websocketAPI/market/market.ts","../src/modules/websocket/websocketAPI/trade/trade.ts","../src/modules/websocket/websocketAPI/userData/userData.ts","../src/modules/websocket/websocketBase/websocketBase.ts","../src/modules/websocket/websocketStream/stream.ts","../src/modules/enum.ts","../src/helpers/logger.ts","../src/spot.ts","../src/websocketAPI.ts","../src/websocketStream.ts"],"sourcesContent":["import { ConvertOrderStatus, ValidTime, WalletType } from '../../enum';\n\nexport interface listAllConvertPairsOptions {\n fromAsset?: string;\n toAsset?: string;\n recvWindow?: number;\n}\n\nexport interface listAllConvertPairsResponse {\n fromAsset: string;\n toAsset: string;\n fromAssetMinAmount: string;\n fromAssetMaxAmount: string;\n toAssetMinAmount: string;\n toAssetMaxAmount: string;\n}\n\nexport interface getOrderQuantityPrecisionPerAssetOptions {\n recvWindow?: number;\n}\n\nexport interface getOrderQuantityPrecisionPerAssetResponse {\n asset: string;\n fraction: number;\n}\n\nexport interface sendQuoteRequestOptions {\n fromAmount?: number;\n toAmount?: number;\n walletType?: WalletType;\n validTime?: ValidTime;\n recvWindow?: number;\n}\n\nexport interface sendQuoteRequestResponse {\n quoteId: string;\n ratio: string;\n inverseRatio: string;\n validTimestamp: number;\n toAmount: string;\n fromAmount: string;\n}\n\nexport interface acceptQuoteOptions {\n recvWindow?: number;\n}\n\nexport interface acceptQuoteResponse {\n orderId: string;\n createTime: number;\n orderStatus: ConvertOrderStatus;\n}\n\nexport interface orderStatusOptions {\n orderId?: string;\n quoteId?: string;\n recvWindow?: number;\n}\n\nexport interface orderStatusResponse {\n orderId: bigint;\n orderStatus: ConvertOrderStatus;\n fromAsset: string;\n fromAmount: string;\n toAsset: string;\n toAmount: string;\n ratio: string;\n inverseRatio: string;\n createTime: number;\n}\n\nexport interface getConvertTradeHistoryOptions {\n limit?: number;\n recvWindow?: number;\n}\n\nexport interface getConvertTradeHistoryResponse {\n list: getConvertTradeHistoryList[];\n startTime: number;\n endTime: number;\n limit: number;\n moreData: boolean;\n}\n\nexport interface getConvertTradeHistoryList {\n quoteId: string;\n orderId: bigint;\n orderStatus: string;\n fromAsset: string;\n fromAmount: string;\n toAsset: string;\n toAmount: string;\n ratio: string;\n inverseRatio: string;\n createTime: number;\n}\n\nexport interface queryLimitOpenOrdersOptions {\n recvWindow?: number;\n}\n\nexport interface queryLimitOpenOrdersResponse {\n list: queryLimitOpenOrdersList[];\n}\n\nexport interface queryLimitOpenOrdersList {\n quoteId: string;\n orderId: number;\n orderStatus: ConvertOrderStatus;\n fromAsset: string;\n fromAmount: string;\n toAsset: string;\n toAmount: string;\n ratio: string;\n inverseRatio: string;\n createTime: number;\n expiredTimestamp: number;\n}\n\nexport interface placeLimitOrderOptions {\n baseAmount?: number;\n quoteAmount?: number;\n walletType?: WalletType;\n recvWindow?: number;\n}\n\nexport interface placeLimitOrderResponse {\n orderId: number;\n status: string;\n}\n\nexport interface cancelLimitOrderOptions {\n recvWindow?: number;\n}\n\nexport interface cancelLimitOrderResponse {\n orderId: number;\n status: string;\n}\n","import { OptionType, AutoCompoundPlan, DualInvestmentPurchaseStatus } from '../../enum';\nexport interface DualInvestmentMethods {\n getDualInvestmentProductList(optionType: OptionType, exercisedCoin: string, investCoin: string, options?: getDualInvestmentProductListOptions): Promise<getDualInvestmentProductListResponse>;\n subscribeDualInvestmentProducts(id: string, orderId: string, depositAmount: number, autoCompoundPlan: AutoCompoundPlan, options?: subscribeDualInvestmentProductsOptions): Promise<subscribeDualInvestmentProductsResponse>;\n getDualInvestmentPositions(options?: getDualInvestmentPositionsOptions): Promise<getDualInvestmentPositionsResponse>;\n checkDualInvestmentAccounts(options?: checkDualInvestmentAccountsOptions): Promise<checkDualInvestmentAccountsResponse>;\n changeAutoCompoundStatus(positionId: number, autoCompoundPlan: AutoCompoundPlan, options?: changeAutoCompoundStatusOptions): Promise<changeAutoCompoundStatusResponse>;\n}\n\nexport interface getDualInvestmentProductListOptions {\n pageSize?: number;\n pageIndex?: number;\n recvWindow?: number;\n}\n\nexport interface getDualInvestmentProductListResponse {\n total: number;\n list: getDualInvestmentProductListList[];\n}\n\ninterface getDualInvestmentProductListList {\n id: string;\n investCoin: string;\n exercisedCoin: string;\n strikePrice: string;\n duration: number;\n settleDate: number;\n purchaseDecimal: number;\n purchaseEndTime: number;\n canPurchase: boolean;\n apr: string;\n orderId: number;\n minAmount: string;\n maxAmount: string;\n createTimestamp: number;\n optionType: OptionType;\n isAutoCompoundEnable: boolean;\n autoCompoundPlanList: AutoCompoundPlan[];\n}\n\nexport interface subscribeDualInvestmentProductsOptions {\n recvWindow?: number;\n}\n\nexport interface subscribeDualInvestmentProductsResponse {\n positionId: number;\n investCoin: string;\n exercisedCoin: string;\n subscriptionAmount: string;\n duration: number;\n autoCompoundPlan: AutoCompoundPlan;\n strikePrice: string;\n settleDate: number;\n purchaseStatus: DualInvestmentPurchaseStatus;\n apr: string;\n orderId: number;\n purchaseTime: number;\n optionType: OptionType;\n}\n\nexport interface getDualInvestmentPositionsOptions {\n status?: DualInvestmentPurchaseStatus;\n pageSize?: number;\n pageIndex?: number;\n recvWindow?: number;\n}\n\nexport interface getDualInvestmentPositionsResponse {\n total: number;\n list: getDualInvestmentPositionsList[];\n}\n\ninterface getDualInvestmentPositionsList {\n id: string;\n investCoin: string;\n exercisedCoin: string;\n subscriptionAmount: string;\n strikePrice: string;\n duration: number;\n settleDate: number;\n purchaseStatus: DualInvestmentPurchaseStatus;\n apr: string;\n orderId: number;\n purchaseEndTime: number;\n optionType: OptionType;\n autoCompoundPlan: AutoCompoundPlan;\n}\n\nexport interface checkDualInvestmentAccountsOptions {\n recvWindow?: number;\n}\n\nexport interface checkDualInvestmentAccountsResponse {\n totalAmountInBTC: string;\n totalAmountInUSDT: string;\n}\n\nexport interface changeAutoCompoundStatusOptions {\n recvWindow?: number;\n}\n\nexport interface changeAutoCompoundStatusResponse {\n positionId: string;\n autoCompoundPlan: AutoCompoundPlan;\n}\n","import {\n OrderType,\n OrderStatus,\n OrderListOrderStatus,\n MarginArchive,\n OrderListStatusType,\n IsIsolatedMargin,\n Side,\n NewOrderRespType,\n SideEffectType,\n TimeInForce,\n StopLimitTimeInForce,\n SpotBNBBurn,\n InterestBNBBurn,\n GetCrossMargingTransferHistoryType,\n SelfTradePreventionMode,\n MarginStatus,\n MarginInterestHistory,\n MarginLevelStatus,\n CrossMarginAccountType,\n CrossMarginTrans,\n OrderListAboveBelowType\n} from '../../enum';\n\nexport interface getAllMarginAssetsOptions {\n asset?: string;\n}\n\nexport interface getAllMarginAssetsResponse {\n assetFullName: string;\n assetName: string;\n isBorrowable: boolean;\n isMortgageable: boolean;\n userMinBorrow: string;\n userMinRepay: string;\n delistTime: number;\n}\n\nexport interface getAllCrossMarginPairsOptions {\n symbol?: string;\n}\n\nexport interface getAllCrossMarginPairsResponse {\n base: string;\n id: bigint;\n isBuyAllowed: boolean;\n isMarginTrade: boolean;\n isSellAllowed: boolean;\n quote: string;\n symbol: string;\n delistTime?: number;\n}\n\nexport interface getMarginPriceIndexResponse {\n calcTime: number;\n price: string;\n symbol: string;\n}\n\nexport interface marginAccountNewOrderOptions {\n isIsolated?: IsIsolatedMargin;\n quantity?: number;\n quoteOrderQty?: number;\n price?: number;\n stopPrice?: number;\n newClientOrderId?: string;\n icebergQty?: number;\n newOrderRespType?: NewOrderRespType;\n sideEffectType?: SideEffectType;\n timeInForce?: TimeInForce;\n selfTradePreventionMode?: SelfTradePreventionMode;\n autoRepayAtCancel?: boolean;\n recvWindow?: number;\n}\n\nexport interface marginAccountNewOrderResponse {\n symbol: string;\n orderId: number;\n clientOrderId: string;\n isIsolated: boolean;\n transactTime: number;\n price?: string;\n origQty?: string;\n executedQty?: string;\n cummulativeQuoteQty?: string;\n status?: OrderStatus;\n timeInForce?: TimeInForce;\n type?: OrderType;\n side?: Side;\n selfTradePreventionMode?: SelfTradePreventionMode;\n fills?: marginAccountNewOrderFills[];\n}\n\nexport interface marginAccountNewOrderFills {\n price: string;\n qty: string;\n commission: string;\n commissionAsset: string;\n}\n\nexport interface marginAccountCancelOrderOptions {\n isIsolated?: IsIsolatedMargin;\n orderId?: number;\n origClientOrderId?: string;\n newClientOrderId?: string;\n recvWindow?: number;\n}\n\nexport interface marginAccountCancelOrderResponse {\n symbol: string;\n isIsolated: boolean;\n orderId: number;\n origClientOrderId: string;\n clientOrderId: string;\n price: string;\n origQty: string;\n executedQty: string;\n cummulativeQuoteQty: string;\n status: OrderStatus;\n timeInForce: TimeInForce;\n type: OrderType;\n side: Side;\n}\n\nexport interface marginAccountCancelAllOpenOrdersOnASymbolOptions {\n isIsolated?: IsIsolatedMargin;\n recvWindow?: number;\n}\n\nexport interface marginAccountCancelAllOpenOrdersOnASymbolResponse {\n symbol: string;\n isIsolated: boolean;\n origClientOrderId: string;\n orderId: number;\n orderListId: number;\n clientOrderId: string;\n price: string;\n origQty: string;\n executedQty: string;\n cummulativeQuoteQty: string;\n status: OrderStatus;\n timeInForce: TimeInForce;\n type: OrderType;\n side: Side;\n selfTradePreventionMode: SelfTradePreventionMode;\n}\n\nexport interface adjustCrossMarginMaxLeverageResponse {\n success: boolean;\n}\n\nexport interface getCrossMarginTransferHistoryOptions {\n asset?: string;\n type?: GetCrossMargingTransferHistoryType;\n startTime?: number;\n endTime?: number;\n current?: number;\n size?: number;\n isolatedSymbol?: string;\n archived?: MarginArchive;\n recvWindow?: number;\n}\n\nexport interface getCrossMarginTransferHistoryResponse {\n rows: getCrossMarginTransferHistoryRows[];\n total: number;\n}\n\nexport interface getCrossMarginTransferHistoryRows {\n amount: string;\n asset: string;\n status: MarginStatus;\n timestamp: number;\n txId: number;\n type: GetCrossMargingTransferHistoryType;\n transFrom?: CrossMarginTrans;\n transTo?: CrossMarginTrans;\n fromSymbol?: string;\n toSymbol?: string;\n}\n\n\nexport interface getInterestHistoryOptions {\n asset?: string;\n isolatedSymbol?: string;\n startTime?: number;\n endTime?: number;\n current?: number;\n size?: number;\n archived?: MarginArchive;\n recvWindow?: number;\n}\n\nexport interface getInterestHistoryResponse {\n rows: getInterestHistoryRows[];\n total: number;\n}\n\nexport interface getInterestHistoryRows {\n txId: bigint;\n interestAccuredTime: number;\n asset: string;\n rawAsset: string;\n principal: string;\n interest: string;\n interestRate: string;\n type: MarginInterestHistory,\n isolatedSymbol: string;\n}\n\nexport interface getForceLiquidationRecordOptions {\n startTime?: number;\n endTime?: number;\n isolatedSymbol?: string;\n current?: number;\n size?: number;\n recvWindow?: number;\n}\n\nexport interface getForceLiquidationRecordResponse {\n rows: getForceLiquidationRecordRows[];\n total: number;\n}\n\nexport interface getForceLiquidationRecordRows {\n avgPrice: string;\n executedQty: string;\n orderId: number;\n price: string;\n qty: string;\n side: Side;\n symbol: string;\n timeInForce: TimeInForce;\n isIsolated: boolean;\n updatedTime: number;\n}\n\nexport interface getCrossMarginAccountDetailsOptions {\n recvWindow?: number;\n}\n\nexport interface getCrossMarginAccountDetailsResponse {\n created: boolean;\n borrowEnabled: boolean;\n marginLevel: string;\n collateralMarginLevel: string;\n totalAssetOfBtc: string;\n totalLiabilityOfBtc: string;\n totalNetAssetOfBtc: string;\n TotalCollateralValueInUSDT: string;\n tradeEnabled: boolean;\n transferInEnabled: boolean;\n transferOutEnabled: boolean;\n accountType: CrossMarginAccountType;\n userAssets: getCrossMarginAccountDetailsUserassets[];\n}\n\nexport interface getCrossMarginAccountDetailsUserassets {\n asset: string;\n borrowed: string;\n free: string;\n interest: string;\n locked: string;\n netAsset: string;\n}\n\nexport interface getMarginAccountOrderOptions {\n isIsolated?: IsIsolatedMargin;\n orderId?: number;\n origClientOrderId?: string;\n recvWindow?: number;\n}\n\nexport interface getMarginAccountOrderResponse {\n clientOrderId: string;\n cummulativeQuoteQty: string;\n executedQty: string;\n icebergQty: string;\n isWorking: boolean;\n orderId: number;\n origQty: string;\n price: string;\n side: Side;\n status: OrderStatus;\n stopPrice: string;\n symbol: string;\n isIsolated: boolean;\n time: number;\n timeInForce: TimeInForce;\n type: OrderType;\n selfTradePreventionMode: SelfTradePreventionMode;\n updateTime: number;\n}\n\nexport interface getMarginAccountOpenOrdersOptions {\n symbol?: string;\n isIsolated?: IsIsolatedMargin;\n recvWindow?: number;\n}\n\nexport interface getMarginAccountOpenOrdersResponse {\n clientOrderId: string;\n cummulativeQuoteQty: string;\n executedQty: string;\n icebergQty: string;\n isWorking: boolean;\n orderId: number;\n origQty: string;\n price: string;\n side: Side;\n status: OrderStatus;\n stopPrice: string;\n symbol: string;\n isIsolated: boolean;\n time: number;\n timeInForce: TimeInForce;\n type: OrderType;\n selfTradePreventionMode: SelfTradePreventionMode;\n updateTime: number;\n}\n\nexport interface getMarginAccountAllOrdersOptions {\n isIsolated?: IsIsolatedMargin;\n orderId?: number;\n startTime?: number;\n endTime?: number;\n limit?: number;\n recvWindow?: number;\n}\n\nexport interface getMarginAccountAllOrdersResponse {\n clientOrderId: string;\n cummulativeQuoteQty: string;\n executedQty: string;\n icebergQty: string;\n isWorking: boolean;\n orderId: number;\n origQty: string;\n price: string;\n side: Side;\n status: OrderStatus;\n stopPrice: string;\n symbol: string;\n isIsolated: boolean;\n time: number;\n timeInForce: TimeInForce;\n type: OrderType;\n selfTradePreventionMode: SelfTradePreventionMode;\n updateTime: number;\n}\n\nexport interface marginAccountNewOcoOptions {\n isIsolated?: IsIsolatedMargin;\n listClientOrderId?: string;\n limitClientOrderId?: string;\n limitIcebergQty?: number;\n stopClientOrderId?: string;\n stopLimitPrice?: number;\n stopIcebergQty?: number;\n stopLimitTimeInForce?: StopLimitTimeInForce;\n newOrderRespType?: NewOrderRespType;\n sideEffectType?: SideEffectType;\n selfTradePreventionMode?: SelfTradePreventionMode;\n autoRepayAtCancel?: boolean;\n recvWindow?: number;\n}\n\nexport interface marginAccountNewOcoResponse {\n orderListId: number;\n contingencyType: string;\n listStatusType: string;\n listOrderStatus: string;\n listClientOrderId: string;\n transactionTime: number;\n symbol: string;\n marginBuyBorrowAmount: string;\n marginBuyBorrowAsset: string;\n isIsolated: boolean;\n orders: marginAccountNewOcoOrders[];\n orderReports: marginAccountNewOcoOrderreports[];\n}\n\nexport interface marginAccountNewOcoOrders {\n symbol: string;\n orderId: number;\n clientOrderId: string;\n}\n\nexport interface marginAccountNewOcoOrderreports {\n symbol: string;\n orderId: number;\n orderListId: number;\n clientOrderId: string;\n transactTime: number;\n price: string;\n origQty: string;\n executedQty: string;\n cummulativeQuoteQty: string;\n status: OrderStatus;\n timeInForce: TimeInForce;\n type: OrderType;\n side: Side;\n stopPrice: string;\n selfTradePreventionMode: SelfTradePreventionMode;\n}\n\nexport interface marginAccountCancelOcoOptions {\n isIsolated?: IsIsolatedMargin;\n orderListId?: number;\n listClientOrderId?: string;\n newClientOrderId?: string;\n recvWindow?: number;\n}\n\nexport interface marginAccountCancelOcoResponse {\n orderListId: number;\n contingencyType: string;\n listStatusType: OrderListStatusType;\n listOrderStatus: OrderListOrderStatus;\n listClientOrderId: string;\n transactionTime: number;\n symbol: string;\n isIsolated: boolean;\n orders: marginAccountCancelOcoOrders[];\n orderReports: marginAccountCancelOcoOrderReports[];\n}\n\nexport interface marginAccountCancelOcoOrders {\n symbol: string;\n orderId: number;\n clientOrderId: string;\n}\n\nexport interface marginAccountCancelOcoOrderReports {\n symbol: string;\n origClientOrderId: string;\n orderId: number;\n orderListId: number;\n clientOrderId: string;\n price: string;\n origQty: string;\n executedQty: string;\n cummulativeQuoteQty: string;\n status: OrderStatus;\n timeInForce: TimeInForce;\n type: OrderType;\n side: Side;\n stopPrice: string;\n selfTradePreventionMode: SelfTradePreventionMode;\n}\n\nexport interface getMarginAccountOcoOptions {\n isIsolated?: IsIsolatedMargin;\n symbol?: string;\n orderListId?: number;\n origClientOrderId?: string;\n recvWindow?: number;\n}\n\nexport interface getMarginAccountOcoResponse {\n orderListId: number;\n contingencyType: string;\n listStatusType: OrderListStatusType;\n listOrderStatus: OrderListOrderStatus;\n listClientOrderId: string;\n transactionTime: number;\n symbol: string;\n isIsolated: boolean;\n orders: getMarginAccountOcoOrders[];\n}\n\nexport interface getMarginAccountOcoOrders {\n symbol: string;\n orderId: number;\n clientOrderId: string;\n}\n\nexport interface getMarginAccountAllOcoOptions {\n isIsolated?: IsIsolatedMargin;\n symbol?: string;\n fromId?: string;\n startTime?: number;\n endTime?: number;\n limit?: number;\n recvWindow?: number;\n}\n\nexport interface getMarginAccountAllOcoResponse {\n orderListId: number;\n contingencyType: string;\n listStatusType: OrderListStatusType;\n listOrderStatus: OrderListOrderStatus;\n listClientOrderId: string;\n transactionTime: number;\n symbol: string;\n isIsolated: boolean;\n orders: getMarginAccountAllOcoOrders[];\n}\n\nexport interface getMarginAccountAllOcoOrders {\n symbol: string;\n orderId: number;\n clientOrderId: string;\n}\n\nexport interface getMarginAccountOpenOcoOptions {\n isIsolated?: IsIsolatedMargin;\n symbol?: string;\n recvWindow?: number;\n}\n\nexport interface getMarginAccountOpenOcoResponse {\n orderListId: number;\n contingencyType: string;\n listStatusType: OrderListStatusType;\n listOrderStatus: OrderListOrderStatus;\n listClientOrderId: string;\n transactionTime: number;\n symbol: string;\n isIsolated: boolean;\n orders: getMarginAccountOpenOcoOrders[];\n}\n\n\nexport interface getMarginAccountOpenOcoOrders {\n symbol: string;\n orderId: number;\n clientOrderId: string;\n}\n\nexport interface getMarginAccountTradeListOptions {\n isIsolated?: IsIsolatedMargin;\n orderId?: number;\n startTime?: number;\n endTime?: number;\n fromId?: number;\n limit?: number;\n recvWindow?: number;\n}\n\nexport interface getMarginAccountTradeListResponse {\n commission: string;\n commissionAsset: string;\n id: number;\n isBestMatch: boolean;\n isBuyer: boolean;\n isMaker: boolean;\n orderId: number;\n price: string;\n qty: string;\n symbol: string;\n isIsolated: boolean;\n time: number;\n}\n\nexport interface getMaxBorrowOptions {\n isolatedSymbol?: string;\n recvWindow?: number;\n}\n\nexport interface getMaxBorrowResponse {\n amount: string;\n borrowLimit: string;\n}\n\nexport interface getMaxTransferoutAmountOptions {\n isolatedSymbol?: string;\n recvWindow?: number;\n}\n\nexport interface getMaxTransferoutAmountResponse {\n amount: string;\n}\n\nexport interface getSummaryOfMarginAccountOptions {\n recvWindow?: number;\n}\n\nexport interface getSummaryOfMarginAccountResponse {\n normalBar: string;\n marginCallBar: string;\n forceLiquidationBar: string;\n}\n\nexport interface getIsolatedMarginAccountInfoOptions {\n symbols?: string;\n recvWindow?: number;\n}\n\nexport interface getIsolatedMarginAccountInfoResponse {\n assets: getIsolatedMarginAccountInfoAssets[];\n totalAssetOfBtc?: string;\n totalLiabilityOfBtc?: string;\n totalNetAssetOfBtc?: string;\n}\n\nexport interface getIsolatedMarginAccountInfoBaseasset {\n asset: string\n borrowEnabled: boolean\n borrowed: string\n free: string\n interest: string\n locked: string\n netAsset: string\n netAssetOfBtc: string\n repayEnabled: boolean\n totalAsset: string\n}\n\nexport interface getIsolatedMarginAccountInfoQuoteasset {\n asset: string\n borrowEnabled: boolean\n borrowed: string\n free: string\n interest: string\n locked: string\n netAsset: string\n netAssetOfBtc: string\n repayEnabled: boolean\n totalAsset: string\n}\n\nexport interface getIsolatedMarginAccountInfoAssets {\n baseAsset: getIsolatedMarginAccountInfoBaseasset;\n quoteAsset: getIsolatedMarginAccountInfoQuoteasset;\n symbol: string;\n isolatedCreated: boolean;\n enabled: boolean;\n marginLevel: string;\n marginLevelStatus: MarginLevelStatus;\n marginRatio: string;\n indexPrice: string;\n liquidatePrice: string;\n liquidateRate: string;\n tradeEnabled: boolean;\n}\n\nexport interface disableIsolatedMarginAccountOptions {\n recvWindow?: number;\n}\n\nexport interface disableIsolatedMarginAccountResponse {\n success: boolean;\n symbol: string;\n}\n\nexport interface enableIsolatedMarginAccountOptions {\n recvWindow?: number;\n}\n\nexport interface enableIsolatedMarginAccountResponse {\n success: boolean;\n symbol: string;\n}\n\nexport interface getEnabledIsolatedMarginAccountLimitOptions {\n recvWindow?: number;\n}\n\nexport interface getEnabledIsolatedMarginAccountLimitResponse {\n enabledAccount: number;\n maxAccount: number;\n}\n\nexport interface getAllIsolatedMarginSymbolOptions {\n symbol?: string;\n recvWindow?: number;\n}\n\nexport interface getAllIsolatedMarginSymbolResponse {\n symbol: string;\n base: string;\n quote: string;\n isMarginTrade: boolean;\n isBuyAllowed: boolean;\n isSellAllowed: boolean;\n}\n\nexport interface toggleBnbBurnOnSpotTradeAndMarginInterestOptions {\n spotBNBBurn?: SpotBNBBurn;\n interestBNBBurn?: InterestBNBBurn;\n recvWindow?: number;\n}\n\nexport interface toggleBnbBurnOnSpotTradeAndMarginInterestResponse {\n spotBNBBurn: boolean;\n interestBNBBurn: boolean;\n}\n\nexport interface getBnbBurnStatusOptions {\n recvWindow?: number;\n}\n\nexport interface getBnbBurnStatusResponse {\n spotBNBBurn: boolean;\n interestBNBBurn: boolean;\n}\n\nexport interface marginInterestRateHistoryOptions {\n vipLevel?: number;\n startTime?: number;\n endTime?: number;\n recvWindow?: number;\n}\n\nexport interface marginInterestRateHistoryResponse {\n asset: string;\n dailyInterestRate: string;\n timestamp: number;\n vipLevel: number;\n}\n\nexport interface getCrossMarginFeeDataOptions {\n vipLevel?: number;\n coin?: string;\n recvWindow?: number;\n}\n\nexport interface getCrossMarginFeeDataResponse {\n vipLevel: number;\n coin: string;\n transferIn: boolean;\n borrowable: boolean;\n dailyInterest: string;\n yearlyInterest: string;\n borrowLimit: string;\n marginablePairs: string[];\n}\n\nexport interface getIsolatedMarginFeeDataOptions {\n vipLevel?: number;\n symbol?: string;\n recvWindow?: number;\n}\n\nexport interface getIsolatedMarginFeeDataResponse {\n vipLevel: number;\n symbol: string;\n leverage: string;\n data: getIsolatedMarginFeeDataData[];\n}\n\nexport interface getIsolatedMarginFeeDataData {\n coin: string;\n dailyInterest: string;\n borrowLimit: string;\n}\n\nexport interface getIsolatedMarginTierDataOptions {\n tier?: number;\n recvWindow?: number;\n}\n\nexport interface getIsolatedMarginTierDataResponse {\n symbol: string;\n tier: number;\n effectiveMultiple: string;\n initialRiskRatio: string;\n liquidationRiskRatio: string;\n baseAssetMaxBorrowable: string;\n quoteAssetMaxBorrowable: string;\n}\n\nexport interface getCurrentMarginOrderCountUsageOptions {\n isIsolated?: IsIsolatedMargin;\n symbol?: string;\n recvWindow?: number;\n}\n\nexport interface getCurrentMarginOrderCountUsageResponse {\n rateLimitType: string;\n interval: string;\n intervalNum: number;\n limit: number;\n count: number;\n}\n\nexport interface crossMarginCollateralRatioResponse {\n collaterals: crossMarginCollateralRatioCollaterals[];\n assetNames: string[];\n}\n\nexport interface crossMarginCollateralRatioCollaterals {\n minUsdValue: string;\n maxUsdValue?: string;\n discountRate: string;\n}\n\nexport interface getSmallLiabilityExchangeCoinListOptions {\n recvWindow?: number;\n}\n\nexport interface getSmallLiabilityExchangeCoinListResponse {\n asset: string;\n interest: string;\n principal: string;\n liabilityAsset: string;\n liabilityQty: string;\n}\n\nexport interface smallLiabilityExchangeOptions {\n assetNames?: string;\n}\n\nexport interface smallLiabilityExchangeResponse {\n asset: string;\n interest: string;\n principal: string;\n liabilityAsset: string;\n liabilityQty: string;\n}\n\n\nexport interface getSmallLiabilityExchangeHistoryOptions {\n startTime?: number;\n endTime?: number;\n recvWindow?: number;\n}\n\nexport interface getSmallLiabilityExchangeHistoryResponse {\n total: number;\n rows: getSmallLiabilityExchangeHistoryRows[];\n}\n\nexport interface getSmallLiabilityExchangeHistoryRows {\n asset: string;\n amount: string;\n targetAsset: string;\n targetAmount: string;\n bizType: string;\n timestamp: number;\n}\n\nexport interface getFutureHoulyInterestRateResponse {\n asset: string;\n nextHourlyInterestRate: string;\n}\n\nexport interface getTokensOrSymbolsDelistScheduleForCrossMarginAndIsolatedMarginOptions {\n recvWindow?: number;\n}\n\nexport interface getTokensOrSymbolsDelistScheduleForCrossMarginAndIsolatedMarginResponse {\n delistTime: number;\n crossMarginAssets: string[];\n isolatedMarginSymbols: string[];\n}\n\nexport interface getMarginAvailableInventoryOptions {\n recvWindow?: number;\n}\n\nexport interface getMarginAvailableInventoryResponse {\n assets: { [key: string]: string };\n updateTime: number;\n}\n\nexport interface marginManualLiquidationOptions {\n symbol?: string;\n recvWindow?: number;\n}\n\nexport interface marginManualLiquidationResponse {\n asset: string;\n interest: string;\n principal: string;\n liabilityAsset: string;\n liabilityQty: number;\n}\n\nexport interface marginAccountNewOtoOptions {\n isIsolated?: string;\n listClientOrderId?: string;\n newOrderRespType?: NewOrderRespType;\n sideEffectType?: SideEffectType;\n selfTradePreventionMode?: string;\n autoRepayAtCancel?: boolean;\n workingClientOrderId?: string;\n workingIcebergQty?: number;\n workingTimeInForce?: TimeInForce;\n pendingClientOrderId?: string;\n pendingPrice?: number;\n pendingStopPrice?: number;\n pendingTrailingDelta?: number;\n pendingIcebergQty?: number;\n pendingTimeInForce?: TimeInForce;\n recvWindow?: number;\n}\n\nexport interface marginAccountNewOtoResponse {\n orderListId: number;\n contingencyType: string;\n listStatusType: OrderListStatusType;\n listOrderStatus: OrderListOrderStatus;\n listClientOrderId: string;\n transactionTime: number;\n symbol: string;\n isIsolated: boolean;\n orders: marginAccountOrders[];\n orderReports: marginAccountOrderReports[];\n}\n\nexport interface marginAccountOrders {\n symbol: string;\n orderId: number;\n clientOrderId: string;\n}\n\nexport interface marginAccountOrderReports {\n symbol: string;\n orderId: number;\n orderListId: number;\n clientOrderId: string;\n transactTime: number;\n price: string;\n origQty: string;\n executedQty: string;\n cummulativeQuoteQty: string;\n status: OrderStatus;\n timeInForce: TimeInForce;\n type: OrderType;\n side: Side;\n stopPrice?: string;\n selfTradePreventionMode: SelfTradePreventionMode;\n}\n\nexport interface marginAccountNewOtocoOptions {\n isIsolated?: string;\n sideEffectType?: SideEffectType;\n autoRepayAtCancel?: boolean;\n listClientOrderId?: string;\n newOrderRespType?: NewOrderRespType;\n selfTradePreventionMode?: string;\n workingClientOrderId?: string;\n workingIcebergQty?: number;\n workingTimeInForce?: TimeInForce;\n pendingAboveClientOrderId?: string;\n pendingAbovePrice?: number;\n pendingAboveStopPrice?: number;\n pendingAboveTrailingDelta?: number;\n pendingAboveIcebergQty?: number;\n pendingAboveTimeInForce?: TimeInForce;\n pendingBelowType?: OrderListAboveBelowType;\n pendingBelowClientOrderId?: string;\n pendingBelowPrice?: number;\n pendingBelowStopPrice?: number;\n pendingBelowTrailingDelta?: number;\n pendingBelowIcebergQty?: number;\n pendingBelowTimeInForce?: TimeInForce;\n recvWindow?: number;\n}\n\nexport interface marginAccountNewOtocoResponse {\n orderListId: number;\n contingencyType: string;\n listStatusType: OrderListStatusType;\n listOrderStatus: OrderListOrderStatus;\n listClientOrderId: string;\n transactionTime: number;\n symbol: string;\n isIsolated: boolean;\n orders: marginAccountOrders[];\n orderReports: marginAccountOrderReports[];\n}\n\nexport interface getLeverageBracketResponse {\n assetNames: string[];\n rank: number;\n brackets: leverageBracket[];\n}\n\nexport interface leverageBracket {\n leverage: number;\n maxDebt: number;\n maintenanceMarginRate: number;\n initialMarginRate: number;\n fastNum: number;\n}\n\nexport interface marginAccountBorrowRepayOptions {\n recvWindow?: number;\n}\n\nexport interface marginAccountBorrowRepayResponse {\n tranId: number;\n}\n\nexport interface getBorrowRepayRecordsOptions {\n asset?: string;\n isolatedSymbol?: string;\n txId?: number;\n startTime?: number;\n endTime?: number;\n current?: number;\n size?: number;\n recvWindow?: number;\n}\n\nexport interface getBorrowRepayRecordsResponse {\n rows: BorrowRepayRecordsRow[];\n total: number;\n}\n\nexport interface BorrowRepayRecordsRow {\n isolatedSymbol: string;\n amount: string;\n asset: string;\n interest: string;\n principal: string;\n status: MarginStatus;\n timestamp: number;\n txId: number;\n}","import { SymbolStatus } from '../../enum';\n\nexport interface checkServerTimeResponse {\n serverTime: number;\n}\n\nexport interface exchangeInformationOptions {\n symbol?: string;\n symbols?: string[];\n permissions?: string[];\n showPermissionSets?: boolean;\n symbolStatus?: SymbolStatus;\n}\n\nexport interface exchangeInformationResponse {\n timezone: string;\n serverTime: number;\n rateLimits: exchangeInformationRatelimits[];\n exchangeFilters: exchangefilters[] | [Record<string, never>];\n symbols: exchangeInformationSymbols[];\n}\n\nexport interface exchangeInformationRatelimits {\n rateLimitType: 'REQUEST_WEIGHT' | 'ORDERS' | 'RAW_REQUESTS';\n interval: 'SECOND' | 'MINUTE' | 'DAY';\n intervalNum: number;\n limit: number;\n}\n\nexport interface exchangefilters {\n filterType: string;\n maxNumOrders: number;\n}\n\nexport interface exchangeInformationSymbols {\n symbol: string;\n status: string;\n baseAsset: string;\n baseAssetPrecision: number;\n quoteAsset: string;\n quoteAssetPrecision: number;\n baseCommissionPrecision: number;\n quoteCommissionPrecision: number;\n orderTypes: string[];\n icebergAllowed: boolean;\n ocoAllowed: boolean;\n otoAllowed: boolean;\n quoteOrderQtyMarketAllowed: boolean;\n allowTrailingStop: boolean;\n cancelReplaceAllowed: boolean;\n isSpotTradingAllowed: boolean;\n isMarginTradingAllowed: boolean;\n filters: filters[];\n permissions: string[];\n permissionSets: string[][];\n defaultSelfTradePreventionMode: string;\n allowedSelfTradePreventionModes: string[];\n}\n\nexport interface orderBookOptions {\n limit?: number;\n}\n\nexport interface orderBookResponse {\n lastUpdateId: number;\n bids: string[][];\n asks: string[][];\n}\n\nexport interface recentTradesListOptions {\n limit?: number;\n}\n\nexport interface recentTradesListResponse {\n id: number;\n price: string;\n qty: string;\n quoteQty: string;\n time: number;\n isBuyerMaker: boolean;\n isBestMatch: boolean;\n}\n\nexport interface oldTradeLookupOptions {\n limit?: number;\n fromId?: number;\n}\n\nexport interface oldTradeLookupResponse {\n id: number;\n price: string;\n qty: string;\n quoteQty: string;\n time: number;\n isBuyerMaker: boolean;\n isBestMatch: boolean;\n}\n\nexport interface compressedAggregateTradesListOptions {\n fromId?: number;\n startTime?: number;\n endTime?: number;\n limit?: number;\n}\n\nexport interface compressedAggregateTradesListResponse {\n a: number;\n p: string;\n q: string;\n f: number;\n l: number;\n T: number;\n m: boolean;\n M: boolean;\n}\n\nexport interface klineCandlestickDataOptions {\n startTime?: number;\n endTime?: number;\n timeZone?: string;\n limit?: number;\n}\n\nexport type klineCandlestickDataResponse = (string | number)[]\n\nexport interface uiklinesOptions {\n startTime?: number;\n endTime?: number;\n timeZone?: string;\n limit?: number;\n}\n\nexport type uiklinesResponse = (number | string)[]\n\nexport interface currentAveragePriceResponse {\n mins: number;\n price: string;\n closeTime: number;\n}\n\nexport interface ticker24hrOptions {\n symbol?: string;\n symbols?: string[];\n type?: 'FULL' | 'MINI';\n}\n\nexport interface ticker24hrResponse {\n symbol: string;\n priceChange: string;\n priceChangePercent: string;\n prevClosePrice: string;\n lastPrice: string;\n bidPrice: string;\n bidQty: string;\n askPrice: string;\n askQty: string;\n openPrice: string;\n highPrice: string;\n lowPrice: string;\n volume: string;\n quoteVolume: string;\n openTime: number;\n closeTime: number;\n firstId: number;\n lastId: number;\n count: number;\n}\n\nexport interface symbolPriceTickerOptions {\n symbol?: string;\n symbols?: string[];\n}\n\nexport interface symbolPriceTickerResponse {\n symbol: string;\n price: string;\n}\n\nexport interface symbolOrderBookTickerOptions {\n symbol?: string;\n symbols?: string[];\n}\n\nexport interface symbolOrderBookTickerResponse {\n symbol: string;\n bidPrice: string;\n bidQty: string;\n askPrice: string;\n askQty: string;\n}\n\nexport interface rollingWindowPriceChangeStatisticsOptions {\n symbol?: string;\n symbols?: string[];\n windowSize?: string;\n type?: 'FULL' | 'MINI';\n}\n\nexport interface rollingWindowPriceChangeStatisticsResponse {\n symbol: string;\n priceChange: string;\n priceChangePercent: string;\n weightedAvgPrice: string;\n openPrice: string;\n highPrice: string;\n lowPrice: string;\n lastPrice: string;\n volume: string;\n quoteVolume: string;\n openTime: number;\n closeTime: number;\n firstId: number;\n lastId: number;\n count: number;\n}\n\ntype filters = priceFilter | percentPrice | percentPriceBySide | lotSize | minNotional | notional | iceBergParts | marketLotSize | maxNumOrders | maxNumAlgoOrders | maxNumIcebergOrders | maxPosition | trailingDelta | exchangeMaxNumOrders | exchangeMaxNumAlgoOrders | exchangeMaxNumIcebergOrders;\n\nexport interface exchangeMaxNumOrders {\n filterType: 'EXCHANGE_MAX_NUM_ORDERS';\n maxNumOrders: number;\n}\n\nexport interface exchangeMaxNumAlgoOrders {\n filterType: 'EXCHANGE_MAX_NUM_ALGO_ORDERS';\n maxNumAlgoOrders: number;\n}\n\nexport interface exchangeMaxNumIcebergOrders {\n filterType: 'EXCHANGE_MAX_NUM_ICEBERG_ORDERS';\n maxNumIcebergOrders: number;\n}\n\nexport interface lotSize {\n filterType: 'LOT_SIZE';\n minQty: string;\n maxQty: string;\n stepSize: string;\n}\n\nexport interface marketLotSize {\n filterType: 'MARKET_LOT_SIZE';\n minQty: string;\n maxQty: string;\n stepSize: string;\n}\n\nexport interface maxNumAlgoOrders {\n filterType: 'MAX_NUM_ALGO_ORDERS';\n maxNumAlgoOrders: number;\n}\n\nexport interface maxNumOrders {\n filterType: 'MAX_NUM_ORDERS';\n maxNumOrders: number;\n}\n\nexport interface maxNumIcebergOrders {\n filterType: 'MAX_NUM_ICEBERG_ORDERS';\n maxNumIcebergOrders: number;\n}\n\nexport interface maxPosition {\n filterType: 'MAX_POSITION';\n maxPosition: string;\n}\n\nexport interface minNotional {\n filterType: 'MIN_NOTIONAL';\n minNotional: string;\n applyToMarket: boolean;\n avgPriceMins: number;\n}\n\nexport interface notional {\n filterType: 'NOTIONAL';\n minNotional: string;\n applyMinToMarket: boolean;\n maxNotional: string;\n applyMaxToMarket: boolean;\n avgPriceMins: number;\n}\n\nexport interface percentPrice {\n filterType: 'PERCENT_PRICE';\n multiplierUp: string;\n multiplierDown: string;\n avgPriceMins: number;\n}\n\nexport interface percentPriceBySide {\n filterType: 'PERCENT_PRICE_BY_SIDE';\n bidMultiplierUp: string;\n bidMultiplierDown: string;\n askMultiplierUp: string;\n askMultiplierDown: string;\n avgPriceMins: number;\n}\n\nexport interface priceFilter {\n filterType: 'PRICE_FILTER';\n minPrice: string;\n maxPrice: string;\n tickSize: string;\n}\n\nexport interface iceBergParts {\n filterType: 'ICEBERG_PARTS';\n limit: number;\n}\n\nexport interface trailingDelta {\n filterType: 'TRAILING_DELTA';\n minTrailingAboveDelta: number;\n maxTrailingAboveDelta: number;\n minTrailingBelowDelta: number;\n maxTrailingBelowDelta: number;\n}\n\nexport interface tradingDayTickerOptions {\n symbol?: string;\n symbols?: string[];\n timeZone?: string;\n type?: 'FULL' | 'MINI';\n}\n\nexport interface tradingDayTickerResponse {\n symbol: string;\n priceChange: string;\n priceChangePercent: string;\n weightedAvgPrice: string;\n openPrice: string;\n highPrice: string;\n lowPrice: string;\n lastPrice: string;\n volume: string;\n quoteVolume: string;\n openTime: number;\n closeTime: number;\n firstId: number;\n lastId: number;\n count: number;\n}","import { PortfolioAccountStatus, PortfolioAccountType, PortfolioMarginFrom } from '../../enum';\n\nexport interface portfolioMarginAccountOptions {\n recvWindow?: number;\n}\n\nexport interface portfolioMarginAccountResponse {\n uniMMR: string;\n accountEquity: string;\n actualEquity: string;\n accountMaintMargin: string;\n accountStatus: PortfolioAccountStatus;\n accountType: PortfolioAccountType;\n}\n\nexport interface portfolioMarginCollateralRateResponse {\n asset: string;\n collateralRate: string;\n}\n\nexport interface getTieredCollateralRateOptions {\n recvWindow?: number;\n}\n\nexport interface getTieredCollateralRateResponse {\n asset: string;\n collateralInfo: collateralInfo[];\n}\n\nexport interface collateralInfo {\n tierFloor: string;\n tierCap: string;\n collateralRate: string;\n cum: string;\n}\n\nexport interface portfolioMarginBankruptcyLoanAmountOptions {\n recvWindow?: number;\n}\n\nexport interface portfolioMarginBankruptcyLoanAmountResponse {\n asset: string;\n amount: string;\n}\n\nexport interface portfolioMarginBankruptcyLoanRepayOptions {\n from?: PortfolioMarginFrom;\n recvWindow?: number;\n}\n\nexport interface portfolioMarginBankruptcyLoanRepayResponse {\n tranId: number;\n}\n\nexport interface getClassicPortfolioMarginNegativeBalanceInterestHistoryOptions {\n asset?: string;\n startTime?: number;\n endTime?: number;\n size?: number;\n recvWindow?: number;\n}\n\nexport interface getClassicPortfolioMarginNegativeBalanceInterestHistoryResponse {\n asset: string;\n interest: string;\n interestAccruedTime: number;\n interestRate: string;\n principal: string;\n}\n\nexport interface getSpanAccountInfoOptions {\n recvWindow?: number;\n}\n\nexport interface getSpanAccountInfoResponse {\n uniMMR: string;\n accountEquity: string;\n actualEquity: string;\n accountMaintMargin: string;\n riskUnitMMList: riskUnitMMList[];\n marginMM: string;\n otherMM: string;\n accountStatus: string;\n accountType: string;\n}\n\nexport interface riskUnitMMList{\n asset: string;\n uniMaintainUsd: string;\n}\n\nexport interface getAccountBalanceOptions {\n asset?: string;\n recvWindow?: number;\n}\n\nexport interface getAccountBalanceResponse {\n asset: string;\n totalWalletBalance: string;\n crossMarginAsset: string;\n crossMarginBorrowed: string;\n crossMarginFree: string;\n crossMarginInterest: string;\n crossMarginLocked: string;\n umWalletBalance: string;\n umUnrealizedPNL: string;\n cmWalletBalance: string;\n cmUnrealizedPNL: string;\n updateTime: number;\n negativeBalance: string;\n optionWalletBalance: string;\n optionEquity: string;\n}\n\nexport interface getPortfolioMarginAssetIndexPriceOptions{\n asset: string;\n}\n\nexport interface getPortfolioMarginAssetIndexPriceResponse {\n asset: string;\n assetIndexPrice: string;\n time: number;\n}\n\nexport interface fundAutocollectionOptions {\n recvWindow?: number;\n}\n\nexport interface fundAutocollectionResponse {\n msg: string;\n}\n\nexport interface fundCollectionByAssetOptions {\n recvWindow?: number;\n}\n\nexport interface fundCollectionByAssetResponse {\n msg: string;\n}\n\nexport interface bnbTransferOptions {\n recvWindow?: number;\n}\n\nexport interface bnbTransferResponse {\n tranId: number;\n}\n\nexport interface changeAutorepayfuturesStatusOptions {\n recvWindow?: number;\n}\n\nexport interface changeAutorepayfuturesStatusResponse {\n msg: string;\n}\n\nexport interface getAutorepayfuturesStatusOptions {\n recvWindow?: number;\n}\n\nexport interface getAutorepayfuturesStatusResponse {\n autoRepay: boolean;\n}\n\nexport interface repayFuturesNegativeBalanceOptions {\n recvWindow?: number;\n}\n\nexport interface repayFuturesNegativeBalanceResponse {\n msg: string;\n}\n\nexport interface getPortfolioMarginAssetLeverageResponse {\n asset: string;\n leverage: number;\n}\n","import {\n RedeemDestAccount,\n SimpleEarnDestAccount,\n SimpleEarnFlexibleRewards,\n SimpleEarnLockedRedemption,\n SimpleEarnSourceAccount,\n SimpleEarnStatus,\n SimpleEarnType,\n SubscribeSourceAccount\n} from '../../enum';\n\nexport interface getSimpleEarnFlexibleProductListOptions {\n asset?: string;\n current?: number;\n size?: number;\n recvWindow?: number;\n}\n\nexport interface getSimpleEarnFlexibleProductListResponse {\n rows: getSimpleEarnFlexibleProductListRows[];\n total: number;\n}\n\nexport interface getSimpleEarnFlexibleProductListRows {\n asset: string;\n latestAnnualPercentageRate: string;\n tierAnnualPercentageRate: tierAnnualPercentageRate;\n airDropPercentageRate: string;\n canPurchase: boolean;\n canRedeem: boolean;\n isSoldOut: boolean;\n hot: boolean;\n minPurchaseAmount: string;\n productId: string;\n subscriptionStartTime: string;\n status: SimpleEarnStatus;\n}\n\nexport interface getSimpleEarnLockedProductListOptions {\n asset?: string;\n current?: number;\n size?: number;\n recvWindow?: number;\n}\n\nexport interface getSimpleEarnLockedProductListResponse {\n rows: getSimpleEarnLockedProductListRows[];\n total: number;\n}\n\nexport interface getSimpleEarnLockedProductListRows {\n projectId: string;\n detail: lockedProductDetails;\n quota: lockedProductQuota;\n}\n\nexport interface lockedProductDetails {\n asset: string;\n rewardAsset: string;\n duration: number;\n renewable: boolean;\n isSoldOut: boolean;\n apr: string;\n status: string;\n subscriptionStartTime: string;\n extraRewardAsset: string;\n extraRewardAPR: string;\n}\n\nexport interface lockedProductQuota {\n totalPersonalQuota: string;\n minimum: string;\n}\n\nexport interface subscribeFlexibleProductOptions {\n autoSubscribe?: boolean;\n sourceAccount?: SubscribeSourceAccount;\n recvWindow?: number;\n}\n\nexport interface subscribeFlexibleProductResponse {\n purchaseId: number;\n success: boolean;\n}\n\nexport interface subscribeLockedProductOptions {\n autoSubscribe?: boolean;\n sourceAccount?: SubscribeSourceAccount;\n recvWindow?: number;\n}\n\nexport interface subscribeLockedProductResponse {\n purchaseId: number;\n positionId: string;\n success: boolean;\n}\n\nexport interface redeemFlexibleProductOptions {\n redeemAll?: boolean;\n amount?: number;\n destAccount?: RedeemDestAccount;\n recvWindow?: number;\n}\n\nexport interface redeemFlexibleProductResponse {\n redeemId: number;\n success: boolean;\n}\n\nexport interface redeemLockedProductOptions {\n recvWindow?: number;\n}\n\nexport interface redeemLockedProductResponse {\n redeemId: number;\n success: boolean;\n}\n\nexport interface getFlexibleProductPositionOptions {\n asset?: string;\n productId?: string;\n current?: number;\n size?: number;\n recvWindow?: number;\n}\n\nexport interface getFlexibleProductPositionResponse {\n rows: getFlexibleProductPositionRows[];\n total: number;\n}\n\nexport interface getFlexibleProductPositionRows {\n totalAmount: string;\n tierAnnualPercentageRate: tierAnnualPercentageRate;\n latestAnnualPercentageRate: string;\n yesterdayAirdropPercentageRate: string;\n asset: string;\n airDropAsset: string;\n canRedeem: boolean;\n collateralAmount: string;\n productId: string;\n yesterdayRealTimeRewards: string;\n cumulativeBonusRewards: string;\n cumulativeRealTimeRewards: string;\n cumulativeTotalRewards: string;\n autoSubscribe: boolean;\n}\n\nexport interface tierAnnualPercentageRate {\n '0-5BTC': number;\n '5-10BTC': number;\n}\n\nexport interface getLockedProductPositionOptions {\n asset?: string;\n positionId?: string;\n projectId?: string;\n current?: number;\n size?: number;\n recvWindow?: number;\n}\n\nexport interface getLockedProductPositionResponse {\n rows: getLockedProductPositionRows[];\n total: number;\n}\n\nexport interface getLockedProductPositionRows {\n positionId: number;\n parentPositionId: 123122,\n projectId: string;\n asset: string;\n amount: string;\n purchaseTime: string;\n duration: string;\n accrualDays: stri