bitget-api 2.2.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/rest-client-v2.d.ts +529 -261
- package/lib/rest-client-v2.js +26 -26
- package/lib/rest-client-v2.js.map +1 -1
- package/lib/types/response/index.d.ts +10 -3
- package/lib/types/response/index.js +10 -3
- package/lib/types/response/index.js.map +1 -1
- package/lib/types/response/{futures.d.ts → v1/futures.d.ts} +1 -1
- package/lib/types/response/v1/futures.js.map +1 -0
- package/lib/types/response/v1/shared.js.map +1 -0
- package/lib/types/response/{spot.js.map → v1/spot.js.map} +1 -1
- package/lib/types/response/v2/broker.d.ts +135 -0
- package/lib/types/response/v2/broker.js +8 -0
- package/lib/types/response/v2/broker.js.map +1 -0
- package/lib/types/response/v2/common.d.ts +384 -0
- package/lib/types/response/v2/common.js +8 -0
- package/lib/types/response/v2/common.js.map +1 -0
- package/lib/types/response/v2/copy-trading.d.ts +385 -0
- package/lib/types/response/v2/copy-trading.js +10 -0
- package/lib/types/response/v2/copy-trading.js.map +1 -0
- package/lib/types/response/v2/earn.d.ts +294 -0
- package/lib/types/response/v2/earn.js +10 -0
- package/lib/types/response/v2/earn.js.map +1 -0
- package/lib/types/response/v2/futures.d.ts +546 -0
- package/lib/types/response/v2/futures.js +8 -0
- package/lib/types/response/v2/futures.js.map +1 -0
- package/lib/types/response/v2/margin.d.ts +277 -0
- package/lib/types/response/v2/margin.js +8 -0
- package/lib/types/response/v2/margin.js.map +1 -0
- package/lib/types/response/v2/spot.d.ts +385 -0
- package/lib/types/response/v2/spot.js +8 -0
- package/lib/types/response/v2/spot.js.map +1 -0
- package/lib/util/BaseRestClient.js +1 -5
- package/lib/util/BaseRestClient.js.map +1 -1
- package/lib/util/requestUtils.d.ts +6 -0
- package/lib/util/requestUtils.js.map +1 -1
- package/package.json +1 -1
- package/lib/types/response/futures.js.map +0 -1
- package/lib/types/response/shared.js.map +0 -1
- /package/lib/types/response/{futures.js → v1/futures.js} +0 -0
- /package/lib/types/response/{shared.d.ts → v1/shared.d.ts} +0 -0
- /package/lib/types/response/{shared.js → v1/shared.js} +0 -0
- /package/lib/types/response/{spot.d.ts → v1/spot.d.ts} +0 -0
- /package/lib/types/response/{spot.js → v1/spot.js} +0 -0
package/lib/rest-client-v2.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { APIResponse, BorrowLoanRequestV2, CloseFuturesFollowerPositionsRequestV2, CopyTradingProductTypeV2, FuturesAccountBillRequestV2, FuturesBatchCancelOrderRequestV2, FuturesBatchOrderRequestV2, FuturesCancelAllOrdersRequestV2, FuturesCancelOrderRequestV2, FuturesCancelPlanOrderRequestV2, FuturesCandlesRequestV2, FuturesFlashClosePositionsRequestV2, FuturesGetHistoricalFillsRequestV2, FuturesGetHistoryOrdersRequestV2, FuturesGetHistoryPlanOrdersRequestV2, FuturesGetOpenOrdersRequestV2, FuturesGetOrderFillsRequestV2, FuturesGetOrderRequestV2, FuturesGetPlanOrdersRequestV2, FuturesHistoricalPositionsRequestV2, FuturesHistoricTradesRequestV2, FuturesInterestHistoryRequestV2, FuturesMergeDepthRequestV2, FuturesModifyOrderRequestV2, FuturesModifyPlanOrderRequestV2, FuturesModifyTPSLOrderRequestV2, FuturesOpenCountRequestV2, FuturesPlaceOrderRequestV2, FuturesPlanOrderRequestV2, FuturesProductTypeV2, FuturesRecentTradesRequestV2, FuturesReversalOrderRequestV2, FuturesSetAutoMarginRequestV2, FuturesSetLeverageRequestV2, FuturesSetMarginModeRequestV2, FuturesSetPositionMarginRequestV2, FuturesSingleAccountRequestV2, FuturesTPSLOrderRequestV2, FuturesTraderSymbolSettingRequestV2, GetBorrowHistoryRequestV2, GetEarnSavingsAssetsRequestV2, GetEarnSavingsRecordsRequestV2, GetFinancialHistoryRequestV2, GetFollowerFuturesCurrentTrackingOrdersRequestV2, GetFollowerFuturesHistoryTrackingOrdersRequestV2, GetFuturesFollowerTradersRequestV2, GetFuturesTraderCurrentOrdersRequestV2, GetFuturesTraderFollowersRequestV2, GetFuturesTraderHistoryOrdersRequestV2, GetFuturesTraderProfitShareDetailRequestV2, GetHistoryOrdersRequestV2, GetInterestHistoryRequestV2, GetLiquidationHistoryRequestV2, GetLiquidationRecordsRequestV2, GetLoanEstInterestAndBorrowableRequestV2, GetLoanHistoryRequestV2, GetLoanPledgeRateHistoryRequestV2, GetLoanRepayHistoryRequestV2, GetMarginCurrentOrdersRequestV2, GetMarginLiquidationOrdersRequestV2, GetMarginOrderFillsRequestV2, GetRepayHistoryRequestV2, GetSharkfinAssetsRequestV2, GetSharkfinRecordsRequestV2, GetSpotAccountBillsRequestV2, GetSpotCurrentPlanOrdersRequestV2, GetSpotDepositRecordRequestV2, GetSpotFillsRequestV2, GetSpotFollowerHistoryOrdersRequestV2, GetSpotFollowerOpenOrdersRequestV2, GetSpotHistoryOrdersRequestV2, GetSpotHistoryPlanOrdersRequestV2, GetSpotOpenOrdersRequestV2, GetSpotOrderInfoRequestV2, GetSpotSubAccountDepositRecordRequestV2, GetSpotTraderCurrentOrdersRequestV2, GetSpotTraderFollowersRequestV2, GetSpotTraderHistoryOrdersRequestV2, GetSpotTraderHistoryProfitRequestV2, GetSpotTransferRecordRequestV2, GetSpotWithdrawalRecordRequestV2, MarginBatchOrdersRequestV2, MarginPlaceOrderRequestV2, MarginType, ModifyFuturesTraderOrderTPSLRequestV2, ModifyLoanPledgeRateRequestV2, RedeemSavingsRequestV2, RepayLoanRequestV2,
|
|
2
|
-
import { CreateSubAccountApiKeyRequestV2, GetSubAccountsRequestV2, ModifySubAccountApiKeyRequestV2, ModifySubRequestV2, SubDepositRecordsRequestV2, SubWithdrawalRecordsRequestV2, SubWithdrawalRequestV2 } from './types/request/v2/broker';
|
|
3
|
-
import { ConvertQuoteRequestV2, ConvertRequestV2, CreateVirtualSubApiKeyRequestV2, CreateVirtualSubRequestV2, GetAnnouncementsRequestV2, GetConvertBGBHistoryRequestV2, GetConvertHistoryRequestV2, GetFuturesTransactionsRequestV2, GetMarginTransactionsRequestV2, GetMerchantAdvertisementsRequestV2, GetMerchantP2POrdersRequestV2, GetP2PMerchantsRequestV2, GetP2PTransactionsRequestV2, GetSpotTransactionsRequestV2, GetTradeRateRequestV2, ModifyVirtualSubApiKeyRequestV2, ModifyVirtualSubRequestV2 } from './types/request/v2/common';
|
|
1
|
+
import { AnnouncementV2, APIResponse, BGBConvertCoinV2, BGBConvertHistoryV2, BorrowLoanRequestV2, BotAssetV2, BrokerSubaccountFutureAssetV2, BrokerSubaccountSpotAssetV2, BrokerSubaccountV2, BrokerSubaccountWithdrawalV2, CancelAndSubmitSpotOrderResponseV2, CloseFuturesFollowerPositionsRequestV2, ConvertBGBResponseV2, ConvertCurrencyV2, ConvertQuotedPriceV2, ConvertQuoteRequestV2, ConvertRecordV2, ConvertRequestV2, ConvertTradeResponseV2, CopyTradingProductTypeV2, CreateSubAccountApiKeyRequestV2, CreateSubaccountApiKeyResponseV2, CreateSubaccountDepositAddressV2, CreateSubaccountResponseV2, CreateVirtualSubAccountAndApiKeyV2, CreateVirtualSubAccountApiKeyV2, CreateVirtualSubAccountV2, CreateVirtualSubApiKeyRequestV2, CreateVirtualSubRequestV2, CrossInterestRateAndLimitResponseV2, CrossMaxBorrowableResponseV2, CrossMaxTransferableResponseV2, CrossTierConfigurationResponseV2, CTFuturesFollowerCurrentOrdersV2, CTFuturesFollowerHistoryOrdersV2, CTFuturesFollowerMyTradersV2, CTFuturesFollowerSettingsV2, CTFuturesTraderCurrentOrdersV2, CTFuturesTraderHistoryOrderV2, CTFuturesTraderHistoryProfitSummaryV2, CTFuturesTraderMyFollowersV2, CTFuturesTraderProfitShareHistoryV2, CTFuturesTraderSymbolSettingsV2, CTFuturesTraderTotalOrderSummaryV2, CTSpotFollowerCurrentOrdersV2, CTSpotFollowerFollowConfigurationV2, CTSpotFollowerHistoryOrdersV2, CTSpotFollowerMyTradersV2, CTSpotTraderCurrentTrackingOrdersV2, CTSpotTraderFollowerListV2, CTSpotTraderHistoryOrdersV2, CTSpotTraderHistoryProfitSharingV2, CTSpotTraderProfitSummaryV2, CTSpotTraderTotalOrderDetailV2, CTSpotTraderUnrealizedProfitV2, EarnLoanCurrenciesV2, EarnLoanDebtsV2, EarnLoanHistoryV2, EarnLoanLiquidationRecordsV2, EarnLoanOrdersV2, EarnLoanPledgeRateHistoryV2, EarnLoanRepayHistoryV2, EarnLoanRepayResponseV2, EarnSavingsAccountV2, EarnSavingsAssetsV2, EarnSavingsProductsV2, EarnSavingsRecordsV2, EarnSavingsSubscriptionDetailV2, EarnSharkfinAccountV2, EarnSharkfinAssetsV2, EarnSharkfinProductsV2, EarnSharkfinRecordsV2, EarnSharkfinSubscriptionDetailV2, FundingAssetV2, FuturesAccountBillRequestV2, FuturesAccountBillV2, FuturesAccountsV2, FuturesAccountV2, FuturesActiveBuySellVolumeV2, FuturesActiveLongShortAccountV2, FuturesActiveLongShortPositionV2, FuturesBatchCancelOrderRequestV2, FuturesBatchOrderRequestV2, FuturesBatchOrderResponseV2, FuturesCancelAllOrdersRequestV2, FuturesCancelAllOrdersV2, FuturesCancelOrderRequestV2, FuturesCancelPlanOrderRequestV2, FuturesCancelPlanOrderV2, FuturesCandlesRequestV2, FuturesCandlestickV2, FuturesClosePositionResponseV2, FuturesContractConfigV2, FuturesDiscountRatesV2, FuturesFillV2, FuturesFlashClosePositionsRequestV2, FuturesFundingTimeV2, FuturesGetHistoricalFillsRequestV2, FuturesGetHistoryOrdersRequestV2, FuturesGetHistoryPlanOrdersRequestV2, FuturesGetOpenOrdersRequestV2, FuturesGetOrderFillsRequestV2, FuturesGetOrderRequestV2, FuturesGetPlanOrdersRequestV2, FuturesHistoricalFundingRateV2, FuturesHistoricalPositionsRequestV2, FuturesHistoricTradesRequestV2, FuturesHistoryInterestRateV2, FuturesHistoryOrderV2, FuturesHistoryPlanOrderV2, FuturesHistoryPositionV2, FuturesInterestExchangeRateV2, FuturesInterestHistoryRequestV2, FuturesInterestHistoryV2, FuturesLongShortRatioV2, FuturesMergeDepthRequestV2, FuturesMergeDepthV2, FuturesModifyOrderRequestV2, FuturesModifyPlanOrderRequestV2, FuturesModifyTPSLOrderRequestV2, FuturesOpenCountRequestV2, FuturesOpenInterestV2, FuturesOpenOrderV2, FuturesOrderDetailV2, FuturesOrderFillV2, FuturesPendingPlanOrderV2, FuturesPlaceOrderRequestV2, FuturesPlanOrderRequestV2, FuturesPositionTierV2, FuturesPositionV2, FuturesProductTypeV2, FuturesRecentTradesRequestV2, FuturesReversalOrderRequestV2, FuturesSetAutoMarginRequestV2, FuturesSetLeverageRequestV2, FuturesSetMarginModeRequestV2, FuturesSetPositionMarginRequestV2, FuturesSingleAccountRequestV2, FuturesSubAccountAssetV2, FuturesSymbolPriceV2, FuturesTickerV2, FuturesTPSLOrderRequestV2, FuturesTraderSymbolSettingRequestV2, FuturesTransactionRecordV2, FuturesTriggerSubOrderV2, FuturesVipFeeRateV2, GetAnnouncementsRequestV2, GetBorrowHistoryRequestV2, GetConvertBGBHistoryRequestV2, GetConvertHistoryRequestV2, GetEarnSavingsAssetsRequestV2, GetEarnSavingsRecordsRequestV2, GetFinancialHistoryRequestV2, GetFollowerFuturesCurrentTrackingOrdersRequestV2, GetFollowerFuturesHistoryTrackingOrdersRequestV2, GetFuturesFollowerTradersRequestV2, GetFuturesTraderCurrentOrdersRequestV2, GetFuturesTraderFollowersRequestV2, GetFuturesTraderHistoryOrdersRequestV2, GetFuturesTraderProfitShareDetailRequestV2, GetFuturesTransactionsRequestV2, GetHistoryOrdersRequestV2, GetInterestHistoryRequestV2, GetLiquidationHistoryRequestV2, GetLiquidationRecordsRequestV2, GetLoanEstInterestAndBorrowableRequestV2, GetLoanHistoryRequestV2, GetLoanPledgeRateHistoryRequestV2, GetLoanRepayHistoryRequestV2, GetMarginCurrentOrdersRequestV2, GetMarginLiquidationOrdersRequestV2, GetMarginOrderFillsRequestV2, GetMarginTransactionsRequestV2, GetMerchantAdvertisementsRequestV2, GetMerchantP2POrdersRequestV2, GetP2PMerchantsRequestV2, GetP2PTransactionsRequestV2, GetRepayHistoryRequestV2, GetSharkfinAssetsRequestV2, GetSharkfinRecordsRequestV2, GetSpotAccountBillsRequestV2, GetSpotCurrentPlanOrdersRequestV2, GetSpotDepositRecordRequestV2, GetSpotFillsRequestV2, GetSpotFollowerHistoryOrdersRequestV2, GetSpotFollowerOpenOrdersRequestV2, GetSpotHistoryOrdersRequestV2, GetSpotHistoryPlanOrdersRequestV2, GetSpotOpenOrdersRequestV2, GetSpotOrderInfoRequestV2, GetSpotSubAccountDepositRecordRequestV2, GetSpotTraderCurrentOrdersRequestV2, GetSpotTraderFollowersRequestV2, GetSpotTraderHistoryOrdersRequestV2, GetSpotTraderHistoryProfitRequestV2, GetSpotTransactionsRequestV2, GetSpotTransferRecordRequestV2, GetSpotWithdrawalRecordRequestV2, GetSubAccountsRequestV2, GetTradeRateRequestV2, IsolatedInterestRateAndLimitResponseV2, IsolatedMarginBorrowingRatioV2, IsolatedMaxBorrowableResponseV2, IsolatedMaxTransferableResponseV2, IsolatedTierConfigurationResponseV2, LeveragedLongShortRatioV2, MarginAccountAssetV2, MarginBatchOrdersRequestV2, MarginBatchOrdersResponseV2, MarginBorrowHistoryItemV2, MarginCurrencyV2, MarginCurrentOrderV2, MarginFinancialHistoryItemV2, MarginHistoryOrderV2, MarginInterestHistoryItemV2, MarginLiquidationHistoryItemV2, MarginLiquidationOrderV2, MarginLoanGrowthRateV2, MarginOrderFillV2, MarginPlaceOrderRequestV2, MarginRepaymentHistoryItemV2, MarginTransactionRecordV2, MarginType, ModifyFuturesTraderOrderTPSLRequestV2, ModifyLoanPledgeRateRequestV2, ModifySubAccountApiKeyRequestV2, ModifySubaccountApiKeyResponseV2, ModifySubaccountResponseV2, ModifySubRequestV2, ModifyVirtualSubAccountApiKeyV2, ModifyVirtualSubApiKeyRequestV2, ModifyVirtualSubRequestV2, P2PMerchantAdvertismentV2, P2PMerchantInfoV2, P2PMerchantOrdersV2, P2PMerchantOrderV2, P2PMerchantV2, RedeemSavingsRequestV2, RepayLoanRequestV2, SetLeverageResponseV2, SetMarginModeResponseV2, SpotAccountAssetV2, SpotAccountBillV2, SpotAccountInfoV2, SpotAccountTypeV2, SpotBatchCancelOrderRequestV2, SpotBatchOrderRequestV2, SpotCancelandSubmitOrderRequestV2, SpotCancelOrderRequestV2, SpotCancelPlanOrdersV2, SpotCandlesRequestV2, SpotCandlestickV2, SpotCoinInfoV2, SpotCurrentPlanOrderV2, SpotDepositAddressV2, SpotDepositRecordV2, SpotFillV2, SpotFollowerCopyTradeSettingV2, SpotFundFlowV2, SpotHistoricCandlesRequestV2, SpotHistoricTradesRequestV2, SpotHistoryPlanOrderV2, SpotMainSubTransferRecordRequestV2, SpotMainSubTransferRecordV2, SpotMergeDepthV2, SpotModifyPlanOrderRequestV2, SpotOpenOrderV2, SpotOrderBookDepthV2, SpotOrderInfoV2, SpotOrderRequestV2, SpotPlanOrderRequestV2, SpotPlanSubOrderV2, SpotSubAccountAssetsV2, SpotSubAccountDepositRecordV2, SpotSubAccountTransferRequestV2, SpotSymbolInfoV2, SpotTickerV2, SpotTradeV2, SpotTransactionRecordV2, SpotTransferRecordV2, SpotTransferRequestV2, SpotVipFeeRateV2, SpotWhaleNetFlowV2, SpotWithdrawalRecordV2, SpotWithdrawalRequestV2, SubAccountApiKeyItemV2, SubaccountApiKeyV2, SubaccountDepositV2, SubaccountEmailV2, SubDepositRecordsRequestV2, SubmitSpotBatchOrdersResponseV2, SubWithdrawalRecordsRequestV2, SubWithdrawalRequestV2, UpdateFuturesFollowerSettingsRequestV2, UpdateFuturesFollowerTPSLRequestV2, VirtualSubAccountV2 } from './types';
|
|
4
2
|
import BaseRestClient from './util/BaseRestClient';
|
|
5
3
|
/**
|
|
6
4
|
* REST API client for all V2 endpoints
|
|
@@ -38,32 +36,46 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
38
36
|
* * Common | Notice
|
|
39
37
|
*
|
|
40
38
|
*/
|
|
41
|
-
getAnnouncements(params?: GetAnnouncementsRequestV2): Promise<APIResponse<
|
|
39
|
+
getAnnouncements(params?: GetAnnouncementsRequestV2): Promise<APIResponse<AnnouncementV2[]>>;
|
|
42
40
|
/**
|
|
43
41
|
*
|
|
44
42
|
* * Common | Public
|
|
45
43
|
*
|
|
46
44
|
*/
|
|
47
|
-
getServerTime(): Promise<APIResponse<
|
|
48
|
-
|
|
45
|
+
getServerTime(): Promise<APIResponse<{
|
|
46
|
+
serverTime: string;
|
|
47
|
+
}>>;
|
|
48
|
+
getTradeRate(params: GetTradeRateRequestV2): Promise<APIResponse<{
|
|
49
|
+
makerFeeRate: string;
|
|
50
|
+
takerFeeRate: string;
|
|
51
|
+
}>>;
|
|
49
52
|
/**
|
|
50
53
|
*
|
|
51
54
|
* * Common | Tax
|
|
52
55
|
*
|
|
53
56
|
*/
|
|
54
|
-
getSpotTransactionRecords(params: GetSpotTransactionsRequestV2): Promise<APIResponse<
|
|
55
|
-
getFuturesTransactionRecords(params: GetFuturesTransactionsRequestV2): Promise<APIResponse<
|
|
56
|
-
getMarginTransactionRecords(params: GetMarginTransactionsRequestV2): Promise<APIResponse<
|
|
57
|
-
getP2PTransactionRecords(params: GetP2PTransactionsRequestV2): Promise<APIResponse<
|
|
57
|
+
getSpotTransactionRecords(params: GetSpotTransactionsRequestV2): Promise<APIResponse<SpotTransactionRecordV2[]>>;
|
|
58
|
+
getFuturesTransactionRecords(params: GetFuturesTransactionsRequestV2): Promise<APIResponse<FuturesTransactionRecordV2[]>>;
|
|
59
|
+
getMarginTransactionRecords(params: GetMarginTransactionsRequestV2): Promise<APIResponse<MarginTransactionRecordV2[]>>;
|
|
60
|
+
getP2PTransactionRecords(params: GetP2PTransactionsRequestV2): Promise<APIResponse<P2PMerchantOrdersV2[]>>;
|
|
58
61
|
/**
|
|
59
62
|
*
|
|
60
63
|
* * Common | P2P
|
|
61
64
|
*
|
|
62
65
|
*/
|
|
63
|
-
getP2PMerchantList(params?: GetP2PMerchantsRequestV2): Promise<APIResponse<
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
getP2PMerchantList(params?: GetP2PMerchantsRequestV2): Promise<APIResponse<{
|
|
67
|
+
merchantList: P2PMerchantV2[];
|
|
68
|
+
minMerchantId: string;
|
|
69
|
+
}>>;
|
|
70
|
+
getP2PMerchantInfo(): Promise<APIResponse<P2PMerchantInfoV2>>;
|
|
71
|
+
getP2PMerchantOrders(params: GetMerchantP2POrdersRequestV2): Promise<APIResponse<{
|
|
72
|
+
orderList: P2PMerchantOrderV2[];
|
|
73
|
+
minOrderId: string;
|
|
74
|
+
}>>;
|
|
75
|
+
getP2PMerchantAdvertisementList(params: GetMerchantAdvertisementsRequestV2): Promise<APIResponse<{
|
|
76
|
+
advList: P2PMerchantAdvertismentV2[];
|
|
77
|
+
minAdvId: string;
|
|
78
|
+
}>>;
|
|
67
79
|
/**
|
|
68
80
|
*
|
|
69
81
|
* * Common | Trading insights
|
|
@@ -71,45 +83,51 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
71
83
|
*/
|
|
72
84
|
getSpotWhaleNetFlowData(params: {
|
|
73
85
|
symbol: string;
|
|
74
|
-
}): Promise<APIResponse<
|
|
86
|
+
}): Promise<APIResponse<SpotWhaleNetFlowV2[]>>;
|
|
75
87
|
getFuturesActiveTakerBuySellVolumeData(params: {
|
|
76
88
|
symbol: string;
|
|
77
89
|
period?: string;
|
|
78
|
-
}): Promise<APIResponse<
|
|
90
|
+
}): Promise<APIResponse<FuturesActiveBuySellVolumeV2[]>>;
|
|
79
91
|
getFuturesActiveLongShortPositionData(params: {
|
|
80
92
|
symbol: string;
|
|
81
93
|
period?: string;
|
|
82
|
-
}): Promise<APIResponse<
|
|
94
|
+
}): Promise<APIResponse<FuturesActiveLongShortPositionV2[]>>;
|
|
83
95
|
getFuturesLongShortRatio(params: {
|
|
84
96
|
symbol: string;
|
|
85
97
|
period?: string;
|
|
86
98
|
coin?: string;
|
|
87
|
-
}): Promise<APIResponse<
|
|
99
|
+
}): Promise<APIResponse<LeveragedLongShortRatioV2[]>>;
|
|
88
100
|
getMarginLoanGrowthRate(params: {
|
|
89
101
|
symbol: string;
|
|
90
102
|
period?: string;
|
|
91
103
|
coin?: string;
|
|
92
|
-
}): Promise<APIResponse<
|
|
104
|
+
}): Promise<APIResponse<MarginLoanGrowthRateV2[]>>;
|
|
93
105
|
getIsolatedMarginBorrowingRatio(params: {
|
|
94
106
|
symbol: string;
|
|
95
107
|
period?: string;
|
|
96
|
-
}): Promise<APIResponse<
|
|
108
|
+
}): Promise<APIResponse<IsolatedMarginBorrowingRatioV2[]>>;
|
|
97
109
|
getFuturesActiveBuySellVolumeData(params: {
|
|
98
110
|
symbol: string;
|
|
99
111
|
period?: string;
|
|
100
|
-
}): Promise<APIResponse<
|
|
112
|
+
}): Promise<APIResponse<FuturesLongShortRatioV2[]>>;
|
|
101
113
|
getSpotFundFlow(params: {
|
|
102
114
|
symbol: string;
|
|
103
115
|
period?: string;
|
|
104
|
-
}): Promise<APIResponse<
|
|
105
|
-
getTradeDataSupportSymbols(): Promise<APIResponse<
|
|
116
|
+
}): Promise<APIResponse<SpotFundFlowV2>>;
|
|
117
|
+
getTradeDataSupportSymbols(): Promise<APIResponse<{
|
|
118
|
+
spotList: string[];
|
|
119
|
+
futureList: string[];
|
|
120
|
+
}>>;
|
|
106
121
|
getSpotFundNetFlowData(params: {
|
|
107
122
|
symbol: string;
|
|
108
|
-
}): Promise<APIResponse<
|
|
123
|
+
}): Promise<APIResponse<{
|
|
124
|
+
netFlow: string;
|
|
125
|
+
ts: string;
|
|
126
|
+
}[]>>;
|
|
109
127
|
getFuturesActiveLongShortAccountData(params: {
|
|
110
128
|
symbol: string;
|
|
111
129
|
period?: string;
|
|
112
|
-
}): Promise<APIResponse<
|
|
130
|
+
}): Promise<APIResponse<FuturesActiveLongShortAccountV2[]>>;
|
|
113
131
|
/**
|
|
114
132
|
*
|
|
115
133
|
* * Common | Virtual Subaccount
|
|
@@ -117,19 +135,24 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
117
135
|
*/
|
|
118
136
|
createVirtualSubaccount(params: {
|
|
119
137
|
subAccountList: string[];
|
|
120
|
-
}): Promise<APIResponse<
|
|
121
|
-
modifyVirtualSubaccount(params: ModifyVirtualSubRequestV2): Promise<APIResponse<
|
|
122
|
-
|
|
138
|
+
}): Promise<APIResponse<CreateVirtualSubAccountV2>>;
|
|
139
|
+
modifyVirtualSubaccount(params: ModifyVirtualSubRequestV2): Promise<APIResponse<{
|
|
140
|
+
result: string;
|
|
141
|
+
}>>;
|
|
142
|
+
batchCreateVirtualSubaccountAndAPIKey(params: CreateVirtualSubRequestV2): Promise<APIResponse<CreateVirtualSubAccountAndApiKeyV2[]>>;
|
|
123
143
|
getVirtualSubaccounts(params?: {
|
|
124
144
|
limit?: string;
|
|
125
145
|
idLessThan?: string;
|
|
126
146
|
status?: 'normal' | 'freeze';
|
|
127
|
-
}): Promise<APIResponse<
|
|
128
|
-
|
|
129
|
-
|
|
147
|
+
}): Promise<APIResponse<{
|
|
148
|
+
endId: string;
|
|
149
|
+
subAccountList: VirtualSubAccountV2[];
|
|
150
|
+
}>>;
|
|
151
|
+
createVirtualSubaccountAPIKey(params: CreateVirtualSubApiKeyRequestV2): Promise<APIResponse<CreateVirtualSubAccountApiKeyV2>>;
|
|
152
|
+
modifyVirtualSubaccountAPIKey(params: ModifyVirtualSubApiKeyRequestV2): Promise<APIResponse<ModifyVirtualSubAccountApiKeyV2>>;
|
|
130
153
|
getVirtualSubaccountAPIKeys(params: {
|
|
131
154
|
subAccountUid: string;
|
|
132
|
-
}): Promise<APIResponse<
|
|
155
|
+
}): Promise<APIResponse<SubAccountApiKeyItemV2[]>>;
|
|
133
156
|
/**
|
|
134
157
|
*
|
|
135
158
|
* * Common | Assets
|
|
@@ -137,31 +160,39 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
137
160
|
*/
|
|
138
161
|
getFundingAssets(params?: {
|
|
139
162
|
coin?: string;
|
|
140
|
-
}): Promise<APIResponse<
|
|
163
|
+
}): Promise<APIResponse<FundingAssetV2[]>>;
|
|
141
164
|
getBotAccount(params?: {
|
|
142
165
|
accountType?: string;
|
|
143
|
-
}): Promise<APIResponse<
|
|
166
|
+
}): Promise<APIResponse<BotAssetV2[]>>;
|
|
144
167
|
/** Get assets overview */
|
|
145
|
-
getBalances(): Promise<APIResponse<
|
|
168
|
+
getBalances(): Promise<APIResponse<{
|
|
169
|
+
accountType: string;
|
|
170
|
+
usdtBalance: string;
|
|
171
|
+
}[]>>;
|
|
146
172
|
/**
|
|
147
173
|
*
|
|
148
174
|
* * Common | Convert
|
|
149
175
|
*
|
|
150
176
|
*/
|
|
151
|
-
getConvertCoins(): Promise<APIResponse<
|
|
152
|
-
getConvertQuotedPrice(params: ConvertQuoteRequestV2): Promise<APIResponse<
|
|
153
|
-
convert(params: ConvertRequestV2): Promise<APIResponse<
|
|
154
|
-
getConvertHistory(params: GetConvertHistoryRequestV2): Promise<APIResponse<
|
|
177
|
+
getConvertCoins(): Promise<APIResponse<ConvertCurrencyV2[]>>;
|
|
178
|
+
getConvertQuotedPrice(params: ConvertQuoteRequestV2): Promise<APIResponse<ConvertQuotedPriceV2>>;
|
|
179
|
+
convert(params: ConvertRequestV2): Promise<APIResponse<ConvertTradeResponseV2>>;
|
|
180
|
+
getConvertHistory(params: GetConvertHistoryRequestV2): Promise<APIResponse<{
|
|
181
|
+
dataList: ConvertRecordV2[];
|
|
182
|
+
endId: string;
|
|
183
|
+
}>>;
|
|
155
184
|
/**
|
|
156
185
|
*
|
|
157
186
|
* * Common | BGB Convert
|
|
158
187
|
*
|
|
159
188
|
*/
|
|
160
|
-
getConvertBGBCoins(): Promise<APIResponse<
|
|
189
|
+
getConvertBGBCoins(): Promise<APIResponse<{
|
|
190
|
+
coinList: BGBConvertCoinV2[];
|
|
191
|
+
}>>;
|
|
161
192
|
convertBGB(params: {
|
|
162
193
|
coinList: string;
|
|
163
|
-
}): Promise<APIResponse<
|
|
164
|
-
getConvertBGBHistory(params: GetConvertBGBHistoryRequestV2): Promise<APIResponse<
|
|
194
|
+
}): Promise<APIResponse<ConvertBGBResponseV2>>;
|
|
195
|
+
getConvertBGBHistory(params: GetConvertBGBHistoryRequestV2): Promise<APIResponse<BGBConvertHistoryV2[]>>;
|
|
165
196
|
/**
|
|
166
197
|
*
|
|
167
198
|
*
|
|
@@ -176,116 +207,151 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
176
207
|
*/
|
|
177
208
|
getSpotCoinInfo(params?: {
|
|
178
209
|
coin?: string;
|
|
179
|
-
}): Promise<APIResponse<
|
|
210
|
+
}): Promise<APIResponse<SpotCoinInfoV2[]>>;
|
|
180
211
|
getSpotSymbolInfo(params?: {
|
|
181
212
|
symbol?: string;
|
|
182
|
-
}): Promise<APIResponse<
|
|
183
|
-
getSpotVIPFeeRate(): Promise<APIResponse<
|
|
213
|
+
}): Promise<APIResponse<SpotSymbolInfoV2[]>>;
|
|
214
|
+
getSpotVIPFeeRate(): Promise<APIResponse<SpotVipFeeRateV2[]>>;
|
|
184
215
|
getSpotTicker(params?: {
|
|
185
216
|
symbol?: string;
|
|
186
|
-
}): Promise<APIResponse<
|
|
217
|
+
}): Promise<APIResponse<SpotTickerV2[]>>;
|
|
187
218
|
getSpotMergeDepth(params: {
|
|
188
219
|
symbol: string;
|
|
189
220
|
precision?: string;
|
|
190
221
|
limit?: string;
|
|
191
|
-
}): Promise<APIResponse<
|
|
222
|
+
}): Promise<APIResponse<SpotMergeDepthV2>>;
|
|
192
223
|
getSpotOrderBookDepth(params: {
|
|
193
224
|
symbol: string;
|
|
194
225
|
type?: string;
|
|
195
226
|
limit?: string;
|
|
196
|
-
}): Promise<APIResponse<
|
|
197
|
-
getSpotCandles(params: SpotCandlesRequestV2): Promise<APIResponse<
|
|
198
|
-
getSpotHistoricCandles(params: SpotHistoricCandlesRequestV2): Promise<APIResponse<
|
|
227
|
+
}): Promise<APIResponse<SpotOrderBookDepthV2>>;
|
|
228
|
+
getSpotCandles(params: SpotCandlesRequestV2): Promise<APIResponse<SpotCandlestickV2[]>>;
|
|
229
|
+
getSpotHistoricCandles(params: SpotHistoricCandlesRequestV2): Promise<APIResponse<SpotCandlestickV2[]>>;
|
|
199
230
|
getSpotRecentTrades(params: {
|
|
200
231
|
symbol: string;
|
|
201
232
|
limit?: string;
|
|
202
|
-
}): Promise<APIResponse<
|
|
203
|
-
getSpotHistoricTrades(params: SpotHistoricTradesRequestV2): Promise<APIResponse<
|
|
233
|
+
}): Promise<APIResponse<SpotTradeV2[]>>;
|
|
234
|
+
getSpotHistoricTrades(params: SpotHistoricTradesRequestV2): Promise<APIResponse<SpotTradeV2[]>>;
|
|
204
235
|
/**
|
|
205
236
|
*
|
|
206
237
|
* * Spot | Trade
|
|
207
238
|
*
|
|
208
239
|
*/
|
|
209
|
-
spotSubmitOrder(params: SpotOrderRequestV2): Promise<APIResponse<
|
|
210
|
-
|
|
240
|
+
spotSubmitOrder(params: SpotOrderRequestV2): Promise<APIResponse<{
|
|
241
|
+
orderId: string;
|
|
242
|
+
clientOid: string;
|
|
243
|
+
}>>;
|
|
244
|
+
spotCancelandSubmitOrder(params: SpotCancelandSubmitOrderRequestV2): Promise<APIResponse<CancelAndSubmitSpotOrderResponseV2>>;
|
|
211
245
|
spotBatchCancelandSubmitOrder(params: {
|
|
212
246
|
orderList: SpotCancelandSubmitOrderRequestV2[];
|
|
213
|
-
}): Promise<APIResponse<
|
|
214
|
-
spotCancelOrder(params: SpotCancelOrderRequestV2): Promise<APIResponse<
|
|
215
|
-
|
|
216
|
-
|
|
247
|
+
}): Promise<APIResponse<CancelAndSubmitSpotOrderResponseV2[]>>;
|
|
248
|
+
spotCancelOrder(params: SpotCancelOrderRequestV2): Promise<APIResponse<{
|
|
249
|
+
orderId: string;
|
|
250
|
+
clientOid: string;
|
|
251
|
+
}>>;
|
|
252
|
+
spotBatchSubmitOrders(params: SpotBatchOrderRequestV2): Promise<APIResponse<SubmitSpotBatchOrdersResponseV2>>;
|
|
253
|
+
spotBatchCancelOrders(params: SpotBatchCancelOrderRequestV2): Promise<APIResponse<SubmitSpotBatchOrdersResponseV2>>;
|
|
217
254
|
spotCancelSymbolOrder(params: {
|
|
218
255
|
symbol: string;
|
|
219
|
-
}): Promise<APIResponse<
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
256
|
+
}): Promise<APIResponse<{
|
|
257
|
+
symbol: string;
|
|
258
|
+
}>>;
|
|
259
|
+
getSpotOrder(params?: GetSpotOrderInfoRequestV2): Promise<APIResponse<SpotOrderInfoV2[]>>;
|
|
260
|
+
getSpotOpenOrders(params?: GetSpotOpenOrdersRequestV2): Promise<APIResponse<SpotOpenOrderV2[]>>;
|
|
261
|
+
getSpotHistoricOrders(params?: GetSpotHistoryOrdersRequestV2): Promise<APIResponse<SpotOrderInfoV2[]>>;
|
|
262
|
+
getSpotFills(params: GetSpotFillsRequestV2): Promise<APIResponse<SpotFillV2[]>>;
|
|
224
263
|
/**
|
|
225
264
|
*
|
|
226
265
|
* * Spot | Trigger Orders
|
|
227
266
|
*
|
|
228
267
|
*/
|
|
229
|
-
spotSubmitPlanOrder(params: SpotPlanOrderRequestV2): Promise<APIResponse<
|
|
230
|
-
|
|
268
|
+
spotSubmitPlanOrder(params: SpotPlanOrderRequestV2): Promise<APIResponse<{
|
|
269
|
+
orderId: string;
|
|
270
|
+
clientOid: string;
|
|
271
|
+
}>>;
|
|
272
|
+
spotModifyPlanOrder(params: SpotModifyPlanOrderRequestV2): Promise<APIResponse<{
|
|
273
|
+
orderId: string;
|
|
274
|
+
clientOid: string;
|
|
275
|
+
}>>;
|
|
231
276
|
spotCancelPlanOrder(params: {
|
|
232
277
|
clientOid?: string;
|
|
233
278
|
orderId?: string;
|
|
234
|
-
}): Promise<APIResponse<
|
|
235
|
-
|
|
279
|
+
}): Promise<APIResponse<{
|
|
280
|
+
result: string;
|
|
281
|
+
}>>;
|
|
282
|
+
getSpotCurrentPlanOrders(params: GetSpotCurrentPlanOrdersRequestV2): Promise<APIResponse<{
|
|
283
|
+
nextFlag: boolean;
|
|
284
|
+
idLessThan: string;
|
|
285
|
+
orderList: SpotCurrentPlanOrderV2[];
|
|
286
|
+
}>>;
|
|
236
287
|
getSpotPlanSubOrder(params: {
|
|
237
288
|
planOrderId: string;
|
|
238
|
-
}): Promise<APIResponse<
|
|
239
|
-
getSpotHistoricPlanOrders(params: GetSpotHistoryPlanOrdersRequestV2): Promise<APIResponse<
|
|
289
|
+
}): Promise<APIResponse<SpotPlanSubOrderV2[]>>;
|
|
290
|
+
getSpotHistoricPlanOrders(params: GetSpotHistoryPlanOrdersRequestV2): Promise<APIResponse<{
|
|
291
|
+
nextFlag: boolean;
|
|
292
|
+
idLessThan: string;
|
|
293
|
+
orderList: SpotHistoryPlanOrderV2[];
|
|
294
|
+
}>>;
|
|
240
295
|
spotCancelPlanOrders(params?: {
|
|
241
296
|
symbolList?: string[];
|
|
242
|
-
}): Promise<APIResponse<
|
|
297
|
+
}): Promise<APIResponse<SpotCancelPlanOrdersV2>>;
|
|
243
298
|
/**
|
|
244
299
|
*
|
|
245
300
|
* * Spot | Account
|
|
246
301
|
*
|
|
247
302
|
*/
|
|
248
|
-
getSpotAccount(): Promise<APIResponse<
|
|
303
|
+
getSpotAccount(): Promise<APIResponse<SpotAccountInfoV2>>;
|
|
249
304
|
getSpotAccountAssets(params?: {
|
|
250
305
|
coin?: string;
|
|
251
306
|
assetType?: string;
|
|
252
|
-
}): Promise<APIResponse<
|
|
253
|
-
getSpotSubAccountAssets(): Promise<APIResponse<
|
|
307
|
+
}): Promise<APIResponse<SpotAccountAssetV2[]>>;
|
|
308
|
+
getSpotSubAccountAssets(): Promise<APIResponse<SpotSubAccountAssetsV2[]>>;
|
|
254
309
|
spotModifyDepositAccount(params: {
|
|
255
310
|
accountType: string;
|
|
256
311
|
coin: string;
|
|
257
|
-
}): Promise<APIResponse<
|
|
258
|
-
getSpotAccountBills(params?: GetSpotAccountBillsRequestV2): Promise<APIResponse<
|
|
259
|
-
spotTransfer(params: SpotTransferRequestV2): Promise<APIResponse<
|
|
312
|
+
}): Promise<APIResponse<string>>;
|
|
313
|
+
getSpotAccountBills(params?: GetSpotAccountBillsRequestV2): Promise<APIResponse<SpotAccountBillV2[]>>;
|
|
314
|
+
spotTransfer(params: SpotTransferRequestV2): Promise<APIResponse<{
|
|
315
|
+
transferId: string;
|
|
316
|
+
clientOid: string;
|
|
317
|
+
}>>;
|
|
260
318
|
getSpotTransferableCoins(params: {
|
|
261
319
|
fromType: SpotAccountTypeV2;
|
|
262
320
|
toType: SpotAccountTypeV2;
|
|
263
|
-
}): Promise<APIResponse<
|
|
264
|
-
spotSubTransfer(params: SpotSubAccountTransferRequestV2): Promise<APIResponse<
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
321
|
+
}): Promise<APIResponse<string[]>>;
|
|
322
|
+
spotSubTransfer(params: SpotSubAccountTransferRequestV2): Promise<APIResponse<{
|
|
323
|
+
transferId: string;
|
|
324
|
+
clientOid: string;
|
|
325
|
+
}>>;
|
|
326
|
+
spotWithdraw(params: SpotWithdrawalRequestV2): Promise<APIResponse<{
|
|
327
|
+
orderId: string;
|
|
328
|
+
clientOid: string;
|
|
329
|
+
}>>;
|
|
330
|
+
getSpotMainSubTransferRecord(params: SpotMainSubTransferRecordRequestV2): Promise<APIResponse<SpotMainSubTransferRecordV2[]>>;
|
|
331
|
+
getSpotTransferHistory(params: GetSpotTransferRecordRequestV2): Promise<APIResponse<SpotTransferRecordV2[]>>;
|
|
268
332
|
spotSwitchBGBDeduct(params: {
|
|
269
333
|
deduct: boolean;
|
|
270
|
-
}): Promise<APIResponse<
|
|
334
|
+
}): Promise<APIResponse<boolean>>;
|
|
271
335
|
getSpotDepositAddress(params: {
|
|
272
336
|
coin: string;
|
|
273
337
|
chain?: string;
|
|
274
338
|
size: string;
|
|
275
|
-
}): Promise<APIResponse<
|
|
339
|
+
}): Promise<APIResponse<SpotDepositAddressV2>>;
|
|
276
340
|
getSpotSubDepositAddress(params: {
|
|
277
341
|
subUid: string;
|
|
278
342
|
coin: string;
|
|
279
343
|
chain?: string;
|
|
280
344
|
size: string;
|
|
281
|
-
}): Promise<APIResponse<
|
|
282
|
-
getSpotBGBDeductInfo(): Promise<APIResponse<
|
|
345
|
+
}): Promise<APIResponse<SpotDepositAddressV2>>;
|
|
346
|
+
getSpotBGBDeductInfo(): Promise<APIResponse<{
|
|
347
|
+
deduct: string;
|
|
348
|
+
}>>;
|
|
283
349
|
spotCancelWithdrawal(params: {
|
|
284
350
|
orderId: string;
|
|
285
|
-
}): Promise<APIResponse<
|
|
286
|
-
getSubAccountDepositRecords(params: GetSpotSubAccountDepositRecordRequestV2): Promise<APIResponse<
|
|
287
|
-
|
|
288
|
-
|
|
351
|
+
}): Promise<APIResponse<string>>;
|
|
352
|
+
getSubAccountDepositRecords(params: GetSpotSubAccountDepositRecordRequestV2): Promise<APIResponse<SpotSubAccountDepositRecordV2[]>>;
|
|
353
|
+
getSpotWithdrawalHistory(params: GetSpotWithdrawalRecordRequestV2): Promise<APIResponse<SpotWithdrawalRecordV2[]>>;
|
|
354
|
+
getSpotDepositHistory(params: GetSpotDepositRecordRequestV2): Promise<APIResponse<SpotDepositRecordV2[]>>;
|
|
289
355
|
/**
|
|
290
356
|
*
|
|
291
357
|
*
|
|
@@ -298,79 +364,101 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
298
364
|
* * Futures | Market
|
|
299
365
|
*
|
|
300
366
|
*/
|
|
301
|
-
getFuturesVIPFeeRate(): Promise<APIResponse<
|
|
367
|
+
getFuturesVIPFeeRate(): Promise<APIResponse<FuturesVipFeeRateV2[]>>;
|
|
302
368
|
getFuturesInterestRateHistory(params: {
|
|
303
369
|
coin: string;
|
|
304
|
-
}): Promise<APIResponse<
|
|
370
|
+
}): Promise<APIResponse<{
|
|
371
|
+
coin: string;
|
|
372
|
+
historyInterestRateList: FuturesHistoryInterestRateV2[];
|
|
373
|
+
}>>;
|
|
374
|
+
getFuturesInterestExchangeRate(): Promise<APIResponse<{
|
|
375
|
+
coin: string;
|
|
376
|
+
exchangeRateList: FuturesInterestExchangeRateV2[];
|
|
377
|
+
}[]>>;
|
|
378
|
+
getFuturesDiscountRate(): Promise<APIResponse<FuturesDiscountRatesV2[]>>;
|
|
379
|
+
getFuturesMergeDepth(params: FuturesMergeDepthRequestV2): Promise<APIResponse<FuturesMergeDepthV2>>;
|
|
305
380
|
getFuturesTicker(params: {
|
|
306
381
|
symbol: string;
|
|
307
382
|
productType: FuturesProductTypeV2;
|
|
308
|
-
}): Promise<APIResponse<
|
|
309
|
-
getFuturesInterestExchangeRate(): Promise<APIResponse<any>>;
|
|
310
|
-
getFuturesDiscountRate(): Promise<APIResponse<any>>;
|
|
383
|
+
}): Promise<APIResponse<FuturesTickerV2[]>>;
|
|
311
384
|
getFuturesAllTickers(params: {
|
|
312
385
|
productType: FuturesProductTypeV2;
|
|
313
|
-
}): Promise<APIResponse<
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
getFuturesHistoricTrades(params: FuturesHistoricTradesRequestV2): Promise<APIResponse<any>>;
|
|
386
|
+
}): Promise<APIResponse<FuturesTickerV2[]>>;
|
|
387
|
+
getFuturesRecentTrades(params: FuturesRecentTradesRequestV2): Promise<APIResponse<FuturesFillV2[]>>;
|
|
388
|
+
getFuturesHistoricTrades(params: FuturesHistoricTradesRequestV2): Promise<APIResponse<FuturesFillV2[]>>;
|
|
389
|
+
getFuturesCandles(params: FuturesCandlesRequestV2): Promise<APIResponse<FuturesCandlestickV2[]>>;
|
|
390
|
+
getFuturesHistoricCandles(params: FuturesCandlesRequestV2): Promise<APIResponse<FuturesCandlestickV2[]>>;
|
|
391
|
+
getFuturesHistoricIndexPriceCandles(params: FuturesCandlesRequestV2): Promise<APIResponse<FuturesCandlestickV2[]>>;
|
|
392
|
+
getFuturesHistoricMarkPriceCandles(params: FuturesCandlesRequestV2): Promise<APIResponse<FuturesCandlestickV2[]>>;
|
|
321
393
|
getFuturesOpenInterest(params: {
|
|
322
394
|
symbol: string;
|
|
323
395
|
productType: FuturesProductTypeV2;
|
|
324
|
-
}): Promise<APIResponse<
|
|
396
|
+
}): Promise<APIResponse<{
|
|
397
|
+
openInterestList: FuturesOpenInterestV2[];
|
|
398
|
+
ts: string;
|
|
399
|
+
}>>;
|
|
325
400
|
getFuturesNextFundingTime(params: {
|
|
326
401
|
symbol: string;
|
|
327
402
|
productType: FuturesProductTypeV2;
|
|
328
|
-
}): Promise<APIResponse<
|
|
403
|
+
}): Promise<APIResponse<FuturesFundingTimeV2[]>>;
|
|
329
404
|
getFuturesSymbolPrice(params: {
|
|
330
405
|
symbol: string;
|
|
331
406
|
productType: FuturesProductTypeV2;
|
|
332
|
-
}): Promise<APIResponse<
|
|
407
|
+
}): Promise<APIResponse<FuturesSymbolPriceV2[]>>;
|
|
333
408
|
getFuturesHistoricFundingRates(params: {
|
|
334
409
|
symbol: string;
|
|
335
410
|
productType: FuturesProductTypeV2;
|
|
336
411
|
pageSize?: string;
|
|
337
412
|
pageNumber?: string;
|
|
338
|
-
}): Promise<APIResponse<
|
|
413
|
+
}): Promise<APIResponse<FuturesHistoricalFundingRateV2>>;
|
|
339
414
|
getFuturesCurrentFundingRate(params: {
|
|
340
415
|
symbol: string;
|
|
341
416
|
productType: FuturesProductTypeV2;
|
|
342
|
-
}): Promise<APIResponse<
|
|
343
|
-
getFuturesContractConfig(params: {
|
|
417
|
+
}): Promise<APIResponse<{
|
|
344
418
|
symbol: string;
|
|
419
|
+
fundingRate: string;
|
|
420
|
+
}[]>>;
|
|
421
|
+
getFuturesContractConfig(params: {
|
|
422
|
+
symbol?: string;
|
|
345
423
|
productType: FuturesProductTypeV2;
|
|
346
|
-
}): Promise<APIResponse<
|
|
424
|
+
}): Promise<APIResponse<FuturesContractConfigV2[]>>;
|
|
347
425
|
/**
|
|
348
426
|
*
|
|
349
427
|
* * Futures | Account
|
|
350
428
|
*
|
|
351
429
|
*/
|
|
352
|
-
getFuturesAccountAsset(params: FuturesSingleAccountRequestV2): Promise<APIResponse<
|
|
430
|
+
getFuturesAccountAsset(params: FuturesSingleAccountRequestV2): Promise<APIResponse<FuturesAccountV2>>;
|
|
353
431
|
getFuturesAccountAssets(params: {
|
|
354
432
|
productType: FuturesProductTypeV2;
|
|
355
|
-
}): Promise<APIResponse<
|
|
433
|
+
}): Promise<APIResponse<FuturesAccountsV2[]>>;
|
|
356
434
|
getFuturesSubAccountAssets(params: {
|
|
357
435
|
productType: FuturesProductTypeV2;
|
|
358
|
-
}): Promise<APIResponse<
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
436
|
+
}): Promise<APIResponse<{
|
|
437
|
+
userId: number;
|
|
438
|
+
assetList: FuturesSubAccountAssetV2[];
|
|
439
|
+
}[]>>;
|
|
440
|
+
getFuturesInterestHistory(params: FuturesInterestHistoryRequestV2): Promise<APIResponse<FuturesInterestHistoryV2[]>>;
|
|
441
|
+
getFuturesOpenCount(params: FuturesOpenCountRequestV2): Promise<APIResponse<{
|
|
442
|
+
size: string;
|
|
443
|
+
}>>;
|
|
444
|
+
setFuturesPositionAutoMargin(params: FuturesSetAutoMarginRequestV2): Promise<APIResponse<string>>;
|
|
445
|
+
setFuturesLeverage(params: FuturesSetLeverageRequestV2): Promise<APIResponse<SetLeverageResponseV2>>;
|
|
446
|
+
setFuturesPositionMargin(params: FuturesSetPositionMarginRequestV2): Promise<APIResponse<string>>;
|
|
364
447
|
setFuturesAssetMode(params: {
|
|
365
448
|
productType: 'USDT-FUTURES' | 'SUSDT-FUTURES';
|
|
366
449
|
assetMode: 'single' | 'union';
|
|
367
|
-
}): Promise<APIResponse<
|
|
368
|
-
setFuturesMarginMode(params: FuturesSetMarginModeRequestV2): Promise<APIResponse<
|
|
450
|
+
}): Promise<APIResponse<string>>;
|
|
451
|
+
setFuturesMarginMode(params: FuturesSetMarginModeRequestV2): Promise<APIResponse<SetMarginModeResponseV2>>;
|
|
369
452
|
setFuturesPositionMode(params: {
|
|
370
453
|
productType: FuturesProductTypeV2;
|
|
371
454
|
posMode: 'one_way_mode' | 'hedge_mode';
|
|
372
|
-
}): Promise<APIResponse<
|
|
373
|
-
|
|
455
|
+
}): Promise<APIResponse<{
|
|
456
|
+
posMode: 'one_way_mode' | 'hedge_mode';
|
|
457
|
+
}>>;
|
|
458
|
+
getFuturesAccountBills(params: FuturesAccountBillRequestV2): Promise<APIResponse<{
|
|
459
|
+
bills: FuturesAccountBillV2[];
|
|
460
|
+
endId: string;
|
|
461
|
+
}>>;
|
|
374
462
|
/**
|
|
375
463
|
*
|
|
376
464
|
* * Futures | Position
|
|
@@ -379,52 +467,97 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
379
467
|
getFuturesPositionTier(params: {
|
|
380
468
|
productType: FuturesProductTypeV2;
|
|
381
469
|
symbol: string;
|
|
382
|
-
}): Promise<APIResponse<
|
|
470
|
+
}): Promise<APIResponse<FuturesPositionTierV2[]>>;
|
|
383
471
|
getFuturesPosition(params: {
|
|
384
472
|
productType: FuturesProductTypeV2;
|
|
385
473
|
symbol: string;
|
|
386
474
|
marginCoin: string;
|
|
387
|
-
}): Promise<APIResponse<
|
|
475
|
+
}): Promise<APIResponse<FuturesPositionV2[]>>;
|
|
388
476
|
getFuturesPositions(params: {
|
|
389
477
|
productType: FuturesProductTypeV2;
|
|
390
478
|
marginCoin?: string;
|
|
391
|
-
}): Promise<APIResponse<
|
|
392
|
-
getFuturesHistoricPositions(params?: FuturesHistoricalPositionsRequestV2): Promise<APIResponse<
|
|
479
|
+
}): Promise<APIResponse<FuturesPositionV2[]>>;
|
|
480
|
+
getFuturesHistoricPositions(params?: FuturesHistoricalPositionsRequestV2): Promise<APIResponse<{
|
|
481
|
+
list: FuturesHistoryPositionV2[];
|
|
482
|
+
endId: string;
|
|
483
|
+
}>>;
|
|
393
484
|
/**
|
|
394
485
|
*
|
|
395
486
|
* * Futures | Trade
|
|
396
487
|
*
|
|
397
488
|
*/
|
|
398
|
-
futuresSubmitOrder(params: FuturesPlaceOrderRequestV2): Promise<APIResponse<
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
489
|
+
futuresSubmitOrder(params: FuturesPlaceOrderRequestV2): Promise<APIResponse<{
|
|
490
|
+
orderId: string;
|
|
491
|
+
clientOid: string;
|
|
492
|
+
}>>;
|
|
493
|
+
futuresSubmitReversal(params: FuturesReversalOrderRequestV2): Promise<APIResponse<{
|
|
494
|
+
orderId: string;
|
|
495
|
+
clientOid: string;
|
|
496
|
+
}>>;
|
|
497
|
+
futuresBatchSubmitOrders(params: FuturesBatchOrderRequestV2): Promise<APIResponse<FuturesBatchOrderResponseV2>>;
|
|
498
|
+
futuresModifyOrder(params: FuturesModifyOrderRequestV2): Promise<APIResponse<{
|
|
499
|
+
orderId: string;
|
|
500
|
+
clientOid: string;
|
|
501
|
+
}>>;
|
|
502
|
+
futuresCancelOrder(params: FuturesCancelOrderRequestV2): Promise<APIResponse<{
|
|
503
|
+
orderId: string;
|
|
504
|
+
clientOid: string;
|
|
505
|
+
}>>;
|
|
506
|
+
futuresBatchCancelOrders(params: FuturesBatchCancelOrderRequestV2): Promise<APIResponse<FuturesBatchOrderResponseV2>>;
|
|
507
|
+
futuresFlashClosePositions(params: FuturesFlashClosePositionsRequestV2): Promise<APIResponse<FuturesClosePositionResponseV2>>;
|
|
508
|
+
getFuturesOrder(params: FuturesGetOrderRequestV2): Promise<APIResponse<FuturesOrderDetailV2>>;
|
|
509
|
+
getFuturesFills(params: FuturesGetOrderFillsRequestV2): Promise<APIResponse<{
|
|
510
|
+
fillList: FuturesOrderFillV2[];
|
|
511
|
+
endId: string;
|
|
512
|
+
}>>;
|
|
513
|
+
getFuturesHistoricOrderFills(params: FuturesGetHistoricalFillsRequestV2): Promise<APIResponse<{
|
|
514
|
+
fillList: FuturesOrderFillV2[];
|
|
515
|
+
endId: string;
|
|
516
|
+
}>>;
|
|
517
|
+
getFuturesOpenOrders(params: FuturesGetOpenOrdersRequestV2): Promise<APIResponse<{
|
|
518
|
+
entrustedList: FuturesOpenOrderV2[];
|
|
519
|
+
endId: string;
|
|
520
|
+
}>>;
|
|
521
|
+
getFuturesHistoricOrders(params: FuturesGetHistoryOrdersRequestV2): Promise<APIResponse<{
|
|
522
|
+
entrustedList: FuturesHistoryOrderV2[];
|
|
523
|
+
endId: string;
|
|
524
|
+
}>>;
|
|
525
|
+
futuresCancelAllOrders(params: FuturesCancelAllOrdersRequestV2): Promise<APIResponse<FuturesCancelAllOrdersV2>>;
|
|
411
526
|
/**
|
|
412
527
|
*
|
|
413
528
|
* * Futures | Trigger Orders
|
|
414
529
|
*
|
|
415
530
|
*/
|
|
416
|
-
|
|
531
|
+
getFuturesTriggerSubOrder(params: {
|
|
417
532
|
planType: 'normal_plan' | 'track_plan';
|
|
418
533
|
planOrderId: string;
|
|
419
534
|
productType: FuturesProductTypeV2;
|
|
420
|
-
}): Promise<APIResponse<
|
|
421
|
-
futuresSubmitTPSLOrder(params: FuturesTPSLOrderRequestV2): Promise<APIResponse<
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
535
|
+
}): Promise<APIResponse<FuturesTriggerSubOrderV2[]>>;
|
|
536
|
+
futuresSubmitTPSLOrder(params: FuturesTPSLOrderRequestV2): Promise<APIResponse<{
|
|
537
|
+
orderId: string;
|
|
538
|
+
clientOid: string;
|
|
539
|
+
}>>;
|
|
540
|
+
futuresSubmitPlanOrder(params: FuturesPlanOrderRequestV2): Promise<APIResponse<{
|
|
541
|
+
orderId: string;
|
|
542
|
+
clientOid: string;
|
|
543
|
+
}>>;
|
|
544
|
+
futuresModifyTPSLPOrder(params: FuturesModifyTPSLOrderRequestV2): Promise<APIResponse<{
|
|
545
|
+
orderId: string;
|
|
546
|
+
clientOid: string;
|
|
547
|
+
}>>;
|
|
548
|
+
futuresModifyPlanOrder(params: FuturesModifyPlanOrderRequestV2): Promise<APIResponse<{
|
|
549
|
+
orderId: string;
|
|
550
|
+
clientOid: string;
|
|
551
|
+
}>>;
|
|
552
|
+
getFuturesPlanOrders(params: FuturesGetPlanOrdersRequestV2): Promise<APIResponse<{
|
|
553
|
+
entrustedList: FuturesPendingPlanOrderV2[];
|
|
554
|
+
endId: string;
|
|
555
|
+
}>>;
|
|
556
|
+
futuresCancelPlanOrder(params: FuturesCancelPlanOrderRequestV2): Promise<APIResponse<FuturesCancelPlanOrderV2>>;
|
|
557
|
+
getFuturesHistoricPlanOrders(params: FuturesGetHistoryPlanOrdersRequestV2): Promise<APIResponse<{
|
|
558
|
+
entrustedList: FuturesHistoryPlanOrderV2[];
|
|
559
|
+
endId: string;
|
|
560
|
+
}>>;
|
|
428
561
|
/**
|
|
429
562
|
*
|
|
430
563
|
*
|
|
@@ -440,49 +573,67 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
440
573
|
modifySubaccountEmail(params: {
|
|
441
574
|
subUid: string;
|
|
442
575
|
subaccountEmail: string;
|
|
443
|
-
}): Promise<APIResponse<
|
|
444
|
-
getBrokerInfo(): Promise<APIResponse<
|
|
576
|
+
}): Promise<APIResponse<string>>;
|
|
577
|
+
getBrokerInfo(): Promise<APIResponse<{
|
|
578
|
+
subAccountSize: string;
|
|
579
|
+
maxSubAccountSize: string;
|
|
580
|
+
uTime: string;
|
|
581
|
+
}>>;
|
|
445
582
|
createSubaccount(params: {
|
|
446
583
|
subaccountName: string;
|
|
447
584
|
label: string;
|
|
448
|
-
}): Promise<APIResponse<
|
|
449
|
-
getSubaccounts(params?: GetSubAccountsRequestV2): Promise<APIResponse<
|
|
450
|
-
|
|
585
|
+
}): Promise<APIResponse<CreateSubaccountResponseV2>>;
|
|
586
|
+
getSubaccounts(params?: GetSubAccountsRequestV2): Promise<APIResponse<{
|
|
587
|
+
hasNextPage: boolean;
|
|
588
|
+
idLessThan: number;
|
|
589
|
+
subList: BrokerSubaccountV2[];
|
|
590
|
+
}>>;
|
|
591
|
+
modifySubaccount(params: ModifySubRequestV2): Promise<APIResponse<ModifySubaccountResponseV2>>;
|
|
451
592
|
getSubaccountEmail(params: {
|
|
452
593
|
subUid: string;
|
|
453
|
-
}): Promise<APIResponse<
|
|
594
|
+
}): Promise<APIResponse<SubaccountEmailV2>>;
|
|
454
595
|
getSubaccountSpotAssets(params: {
|
|
455
596
|
subUid: string;
|
|
456
597
|
coin?: string;
|
|
457
598
|
assetType?: 'hold_only' | 'all';
|
|
458
|
-
}): Promise<APIResponse<
|
|
599
|
+
}): Promise<APIResponse<{
|
|
600
|
+
assetsList: BrokerSubaccountSpotAssetV2[];
|
|
601
|
+
}>>;
|
|
459
602
|
getSubaccountFuturesAssets(params: {
|
|
460
603
|
subUid: string;
|
|
461
604
|
productType: FuturesProductTypeV2;
|
|
462
|
-
}): Promise<APIResponse<
|
|
605
|
+
}): Promise<APIResponse<{
|
|
606
|
+
assetsList: BrokerSubaccountFutureAssetV2[];
|
|
607
|
+
}>>;
|
|
463
608
|
createSubaccountDepositAddress(params: {
|
|
464
609
|
subUid: string;
|
|
465
610
|
coin: string;
|
|
466
611
|
chain?: string;
|
|
467
|
-
}): Promise<APIResponse<
|
|
468
|
-
subaccountWithdrawal(params: SubWithdrawalRequestV2): Promise<APIResponse<
|
|
612
|
+
}): Promise<APIResponse<CreateSubaccountDepositAddressV2>>;
|
|
613
|
+
subaccountWithdrawal(params: SubWithdrawalRequestV2): Promise<APIResponse<{
|
|
614
|
+
orderId: string;
|
|
615
|
+
clientOid: string;
|
|
616
|
+
}>>;
|
|
469
617
|
subaccountSetAutoTransfer(params: {
|
|
470
618
|
subUid: string;
|
|
471
619
|
coin: string;
|
|
472
620
|
toAccountType: string;
|
|
473
|
-
}): Promise<APIResponse<
|
|
474
|
-
subaccountDepositRecords(params: SubDepositRecordsRequestV2): Promise<APIResponse<
|
|
475
|
-
subaccountWithdrawalRecords(params: SubWithdrawalRecordsRequestV2): Promise<APIResponse<
|
|
621
|
+
}): Promise<APIResponse<string>>;
|
|
622
|
+
subaccountDepositRecords(params: SubDepositRecordsRequestV2): Promise<APIResponse<SubaccountDepositV2>>;
|
|
623
|
+
subaccountWithdrawalRecords(params: SubWithdrawalRecordsRequestV2): Promise<APIResponse<{
|
|
624
|
+
resultList: BrokerSubaccountWithdrawalV2[];
|
|
625
|
+
endId: string;
|
|
626
|
+
}>>;
|
|
476
627
|
/**
|
|
477
628
|
*
|
|
478
|
-
*
|
|
629
|
+
* Broker | Api Key
|
|
479
630
|
*
|
|
480
631
|
*/
|
|
481
|
-
createSubaccountApiKey(params: CreateSubAccountApiKeyRequestV2): Promise<APIResponse<
|
|
632
|
+
createSubaccountApiKey(params: CreateSubAccountApiKeyRequestV2): Promise<APIResponse<CreateSubaccountApiKeyResponseV2>>;
|
|
482
633
|
getSubaccountApiKey(params: {
|
|
483
634
|
subUid: string;
|
|
484
|
-
}): Promise<APIResponse<
|
|
485
|
-
modifySubaccountApiKey(params: ModifySubAccountApiKeyRequestV2): Promise<APIResponse<
|
|
635
|
+
}): Promise<APIResponse<SubaccountApiKeyV2[]>>;
|
|
636
|
+
modifySubaccountApiKey(params: ModifySubAccountApiKeyRequestV2): Promise<APIResponse<ModifySubaccountApiKeyResponseV2>>;
|
|
486
637
|
/**
|
|
487
638
|
*
|
|
488
639
|
*
|
|
@@ -495,17 +646,37 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
495
646
|
* * Margin | Common
|
|
496
647
|
*
|
|
497
648
|
*/
|
|
498
|
-
getMarginCurrencies(): Promise<APIResponse<
|
|
649
|
+
getMarginCurrencies(): Promise<APIResponse<MarginCurrencyV2[]>>;
|
|
499
650
|
/**
|
|
500
651
|
*
|
|
501
652
|
* * Margin | Cross/Isolated | Order Record
|
|
502
653
|
*
|
|
503
654
|
*/
|
|
504
|
-
getMarginBorrowHistory(marginType: MarginType, params: GetBorrowHistoryRequestV2): Promise<APIResponse<
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
655
|
+
getMarginBorrowHistory(marginType: MarginType, params: GetBorrowHistoryRequestV2): Promise<APIResponse<{
|
|
656
|
+
resultList: MarginBorrowHistoryItemV2[];
|
|
657
|
+
maxId: string;
|
|
658
|
+
minId: string;
|
|
659
|
+
}>>;
|
|
660
|
+
getMarginRepayHistory(marginType: MarginType, params: GetRepayHistoryRequestV2): Promise<APIResponse<{
|
|
661
|
+
resultList: MarginRepaymentHistoryItemV2[];
|
|
662
|
+
maxId: string;
|
|
663
|
+
minId: string;
|
|
664
|
+
}>>;
|
|
665
|
+
getMarginInterestHistory(marginType: MarginType, params: GetInterestHistoryRequestV2): Promise<APIResponse<{
|
|
666
|
+
resultList: MarginInterestHistoryItemV2[];
|
|
667
|
+
maxId: string;
|
|
668
|
+
minId: string;
|
|
669
|
+
}>>;
|
|
670
|
+
getMarginLiquidationHistory(marginType: MarginType, params: GetLiquidationHistoryRequestV2): Promise<APIResponse<{
|
|
671
|
+
resultList: MarginLiquidationHistoryItemV2[];
|
|
672
|
+
maxId: string;
|
|
673
|
+
minId: string;
|
|
674
|
+
}>>;
|
|
675
|
+
getMarginFinancialHistory(marginType: MarginType, params: GetFinancialHistoryRequestV2): Promise<APIResponse<{
|
|
676
|
+
resultList: MarginFinancialHistoryItemV2[];
|
|
677
|
+
maxId: string;
|
|
678
|
+
minId: string;
|
|
679
|
+
}>>;
|
|
509
680
|
/**
|
|
510
681
|
*
|
|
511
682
|
* * Margin | Cross/Isolated | Account
|
|
@@ -513,55 +684,102 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
513
684
|
*/
|
|
514
685
|
getMarginAccountAssets(marginType: MarginType, params?: {
|
|
515
686
|
coin?: string;
|
|
516
|
-
}): Promise<APIResponse<
|
|
687
|
+
}): Promise<APIResponse<MarginAccountAssetV2[]>>;
|
|
517
688
|
marginBorrow(marginType: MarginType, params: {
|
|
689
|
+
loanId: string;
|
|
690
|
+
symbol: string;
|
|
518
691
|
coin: string;
|
|
519
692
|
borrowAmount: string;
|
|
520
|
-
|
|
521
|
-
|
|
693
|
+
}): Promise<APIResponse<{
|
|
694
|
+
loanId: string;
|
|
695
|
+
symbol: string;
|
|
696
|
+
coin: string;
|
|
697
|
+
borrowAmount: string;
|
|
698
|
+
}>>;
|
|
522
699
|
marginRepay(marginType: MarginType, params: {
|
|
700
|
+
remainDebtAmount: string;
|
|
701
|
+
symbol: string;
|
|
702
|
+
repayId: string;
|
|
523
703
|
coin: string;
|
|
524
704
|
repayAmount: string;
|
|
525
|
-
}): Promise<APIResponse<
|
|
526
|
-
|
|
705
|
+
}): Promise<APIResponse<{
|
|
706
|
+
symbol: string;
|
|
707
|
+
coin: string;
|
|
708
|
+
repayId: string;
|
|
709
|
+
remainDebtAmount: string;
|
|
710
|
+
repayAmount: string;
|
|
711
|
+
}>>;
|
|
712
|
+
getMarginRiskRate(marginType: MarginType): Promise<APIResponse<{
|
|
713
|
+
symbol: string;
|
|
714
|
+
riskRateRatio: string;
|
|
715
|
+
}[]>>;
|
|
527
716
|
getMarginMaxBorrowable(marginType: MarginType, params: {
|
|
528
717
|
coin: string;
|
|
529
|
-
}): Promise<APIResponse<
|
|
718
|
+
}): Promise<APIResponse<CrossMaxBorrowableResponseV2 | IsolatedMaxBorrowableResponseV2>>;
|
|
530
719
|
getMarginMaxTransferable(marginType: MarginType, params: {
|
|
531
720
|
coin: string;
|
|
532
|
-
}): Promise<APIResponse<
|
|
721
|
+
}): Promise<APIResponse<CrossMaxTransferableResponseV2 | IsolatedMaxTransferableResponseV2>>;
|
|
533
722
|
getMarginInterestRateAndMaxBorrowable(marginType: MarginType, params: {
|
|
534
723
|
coin: string;
|
|
535
|
-
}): Promise<APIResponse<
|
|
724
|
+
}): Promise<APIResponse<IsolatedInterestRateAndLimitResponseV2[] | CrossInterestRateAndLimitResponseV2[]>>;
|
|
536
725
|
getMarginTierConfiguration(marginType: MarginType, params: {
|
|
537
726
|
coin: string;
|
|
538
|
-
}): Promise<APIResponse<
|
|
727
|
+
}): Promise<APIResponse<CrossTierConfigurationResponseV2[] | IsolatedTierConfigurationResponseV2[]>>;
|
|
539
728
|
marginFlashRepay(marginType: MarginType, params: {
|
|
540
729
|
coin: string;
|
|
541
|
-
}): Promise<APIResponse<
|
|
730
|
+
}): Promise<APIResponse<{
|
|
731
|
+
repayId: string;
|
|
732
|
+
coin?: string;
|
|
733
|
+
symbol?: string;
|
|
734
|
+
result?: string;
|
|
735
|
+
}>>;
|
|
542
736
|
getMarginFlashRepayResult(marginType: MarginType, params: {
|
|
543
737
|
idList: string;
|
|
544
|
-
}): Promise<APIResponse<
|
|
738
|
+
}): Promise<APIResponse<{
|
|
739
|
+
repayId: string;
|
|
740
|
+
status: string;
|
|
741
|
+
}[]>>;
|
|
545
742
|
/**
|
|
546
743
|
*
|
|
547
744
|
* * Margin | Cross/Isolated | Trade
|
|
548
745
|
*
|
|
549
746
|
*/
|
|
550
|
-
marginSubmitOrder(marginType: MarginType, params: MarginPlaceOrderRequestV2): Promise<APIResponse<
|
|
551
|
-
|
|
747
|
+
marginSubmitOrder(marginType: MarginType, params: MarginPlaceOrderRequestV2): Promise<APIResponse<{
|
|
748
|
+
orderId: string;
|
|
749
|
+
clientOid: string;
|
|
750
|
+
}>>;
|
|
751
|
+
marginBatchSubmitOrders(marginType: MarginType, params: MarginBatchOrdersRequestV2): Promise<APIResponse<MarginBatchOrdersResponseV2>>;
|
|
552
752
|
marginCancelOrder(marginType: MarginType, params: {
|
|
553
753
|
symbol: string;
|
|
554
754
|
orderId?: string;
|
|
555
755
|
clientOid?: string;
|
|
556
|
-
}): Promise<APIResponse<
|
|
756
|
+
}): Promise<APIResponse<{
|
|
757
|
+
orderId: string;
|
|
758
|
+
clientOid: string;
|
|
759
|
+
}>>;
|
|
557
760
|
marginBatchCancelOrders(marginType: MarginType, params: {
|
|
558
761
|
symbol: string;
|
|
559
762
|
orderIdList: string[];
|
|
560
|
-
}): Promise<APIResponse<
|
|
561
|
-
getMarginOpenOrders(marginType: MarginType, params: GetMarginCurrentOrdersRequestV2): Promise<APIResponse<
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
763
|
+
}): Promise<APIResponse<MarginBatchOrdersResponseV2>>;
|
|
764
|
+
getMarginOpenOrders(marginType: MarginType, params: GetMarginCurrentOrdersRequestV2): Promise<APIResponse<{
|
|
765
|
+
orderList: MarginCurrentOrderV2[];
|
|
766
|
+
maxId: string;
|
|
767
|
+
minId: string;
|
|
768
|
+
}>>;
|
|
769
|
+
getMarginHistoricOrders(marginType: MarginType, params: GetHistoryOrdersRequestV2): Promise<APIResponse<{
|
|
770
|
+
orderList: MarginHistoryOrderV2[];
|
|
771
|
+
maxId: string;
|
|
772
|
+
minId: string;
|
|
773
|
+
}>>;
|
|
774
|
+
getMarginHistoricOrderFills(marginType: MarginType, params: GetMarginOrderFillsRequestV2): Promise<APIResponse<{
|
|
775
|
+
fills: MarginOrderFillV2[];
|
|
776
|
+
minId: string;
|
|
777
|
+
maxId: string;
|
|
778
|
+
}>>;
|
|
779
|
+
getMarginLiquidationOrders(marginType: MarginType, params: GetMarginLiquidationOrdersRequestV2): Promise<APIResponse<{
|
|
780
|
+
resultList: MarginLiquidationOrderV2[];
|
|
781
|
+
idLessThan: string;
|
|
782
|
+
}>>;
|
|
565
783
|
/**
|
|
566
784
|
*
|
|
567
785
|
*
|
|
@@ -576,41 +794,53 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
576
794
|
*
|
|
577
795
|
*
|
|
578
796
|
*/
|
|
579
|
-
getFuturesTraderCurrentOrder(params: GetFuturesTraderCurrentOrdersRequestV2): Promise<APIResponse<
|
|
580
|
-
getFuturesTraderHistoryOrders(params: GetFuturesTraderHistoryOrdersRequestV2): Promise<APIResponse<
|
|
581
|
-
modifyFuturesTraderOrderTPSL(params: ModifyFuturesTraderOrderTPSLRequestV2): Promise<APIResponse<
|
|
582
|
-
getFuturesTraderOrder(): Promise<APIResponse<
|
|
583
|
-
getFuturesTraderProfitHistory(): Promise<APIResponse<
|
|
584
|
-
getFuturesTraderProfitShareHistory(params: GetFuturesTraderProfitShareDetailRequestV2): Promise<APIResponse<
|
|
797
|
+
getFuturesTraderCurrentOrder(params: GetFuturesTraderCurrentOrdersRequestV2): Promise<APIResponse<CTFuturesTraderCurrentOrdersV2>>;
|
|
798
|
+
getFuturesTraderHistoryOrders(params: GetFuturesTraderHistoryOrdersRequestV2): Promise<APIResponse<CTFuturesTraderHistoryOrderV2>>;
|
|
799
|
+
modifyFuturesTraderOrderTPSL(params: ModifyFuturesTraderOrderTPSLRequestV2): Promise<APIResponse<string>>;
|
|
800
|
+
getFuturesTraderOrder(): Promise<APIResponse<CTFuturesTraderTotalOrderSummaryV2>>;
|
|
801
|
+
getFuturesTraderProfitHistory(): Promise<APIResponse<CTFuturesTraderHistoryProfitSummaryV2>>;
|
|
802
|
+
getFuturesTraderProfitShareHistory(params: GetFuturesTraderProfitShareDetailRequestV2): Promise<APIResponse<CTFuturesTraderProfitShareHistoryV2>>;
|
|
585
803
|
closeFuturesTraderOrder(params: {
|
|
586
804
|
trackingNo: string;
|
|
587
805
|
symbol: string;
|
|
588
806
|
productType: CopyTradingProductTypeV2;
|
|
589
|
-
}): Promise<APIResponse<
|
|
807
|
+
}): Promise<APIResponse<{
|
|
808
|
+
trackingNo: string;
|
|
809
|
+
symbol: string;
|
|
810
|
+
productType: string;
|
|
811
|
+
}[]>>;
|
|
590
812
|
getFuturesTraderProfitShare(params?: {
|
|
591
813
|
coin?: string;
|
|
592
814
|
pageSize?: string;
|
|
593
815
|
pageNo?: string;
|
|
594
|
-
}): Promise<APIResponse<
|
|
816
|
+
}): Promise<APIResponse<{
|
|
817
|
+
coin: string;
|
|
818
|
+
profit: string;
|
|
819
|
+
nickName: string;
|
|
820
|
+
}[]>>;
|
|
595
821
|
getFuturesTraderProfitShareGroup(params?: {
|
|
596
822
|
pageSize?: string;
|
|
597
823
|
pageNo?: string;
|
|
598
|
-
}): Promise<APIResponse<
|
|
824
|
+
}): Promise<APIResponse<{
|
|
825
|
+
coin: string;
|
|
826
|
+
profit: string;
|
|
827
|
+
profitTime: string;
|
|
828
|
+
}[]>>;
|
|
599
829
|
getFuturesTraderSymbolSettings(params: {
|
|
600
830
|
productType: CopyTradingProductTypeV2;
|
|
601
|
-
}): Promise<APIResponse<
|
|
831
|
+
}): Promise<APIResponse<CTFuturesTraderSymbolSettingsV2[]>>;
|
|
602
832
|
updateFuturesTraderSymbolSettings(params: {
|
|
603
833
|
settingList: FuturesTraderSymbolSettingRequestV2[];
|
|
604
|
-
}): Promise<APIResponse<
|
|
834
|
+
}): Promise<APIResponse<string>>;
|
|
605
835
|
updateFuturesTraderGlobalSettings(params?: {
|
|
606
836
|
enable?: 'YES' | 'NO';
|
|
607
837
|
showTotalEquity?: 'YES' | 'NO';
|
|
608
838
|
showTpsl?: 'YES' | 'NO';
|
|
609
|
-
}): Promise<APIResponse<
|
|
610
|
-
getFuturesTraderFollowers(params?: GetFuturesTraderFollowersRequestV2): Promise<APIResponse<
|
|
839
|
+
}): Promise<APIResponse<string>>;
|
|
840
|
+
getFuturesTraderFollowers(params?: GetFuturesTraderFollowersRequestV2): Promise<APIResponse<CTFuturesTraderMyFollowersV2[]>>;
|
|
611
841
|
removeFuturesTraderFollower(params: {
|
|
612
842
|
followerUid: string;
|
|
613
|
-
}): Promise<APIResponse<
|
|
843
|
+
}): Promise<APIResponse<string>>;
|
|
614
844
|
/**
|
|
615
845
|
*
|
|
616
846
|
*
|
|
@@ -618,22 +848,28 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
618
848
|
*
|
|
619
849
|
*
|
|
620
850
|
*/
|
|
621
|
-
getFuturesFollowerCurrentOrders(params: GetFollowerFuturesCurrentTrackingOrdersRequestV2): Promise<APIResponse<
|
|
622
|
-
getFuturesFollowerHistoryOrders(params: GetFollowerFuturesHistoryTrackingOrdersRequestV2): Promise<APIResponse<
|
|
623
|
-
updateFuturesFollowerTPSL(params: UpdateFuturesFollowerTPSLRequestV2): Promise<APIResponse<
|
|
624
|
-
updateFuturesFollowerSettings(params: UpdateFuturesFollowerSettingsRequestV2): Promise<APIResponse<
|
|
851
|
+
getFuturesFollowerCurrentOrders(params: GetFollowerFuturesCurrentTrackingOrdersRequestV2): Promise<APIResponse<CTFuturesFollowerCurrentOrdersV2[]>>;
|
|
852
|
+
getFuturesFollowerHistoryOrders(params: GetFollowerFuturesHistoryTrackingOrdersRequestV2): Promise<APIResponse<CTFuturesFollowerHistoryOrdersV2>>;
|
|
853
|
+
updateFuturesFollowerTPSL(params: UpdateFuturesFollowerTPSLRequestV2): Promise<APIResponse<string>>;
|
|
854
|
+
updateFuturesFollowerSettings(params: UpdateFuturesFollowerSettingsRequestV2): Promise<APIResponse<string>>;
|
|
625
855
|
getFuturesFollowerSettings(params: {
|
|
626
856
|
traderId: string;
|
|
627
|
-
}): Promise<APIResponse<
|
|
628
|
-
closeFuturesFollowerPositions(params: CloseFuturesFollowerPositionsRequestV2): Promise<APIResponse<
|
|
629
|
-
|
|
857
|
+
}): Promise<APIResponse<CTFuturesFollowerSettingsV2>>;
|
|
858
|
+
closeFuturesFollowerPositions(params: CloseFuturesFollowerPositionsRequestV2): Promise<APIResponse<{
|
|
859
|
+
orderIdList: string[];
|
|
860
|
+
}>>;
|
|
861
|
+
getFuturesFollowerTraders(params: GetFuturesFollowerTradersRequestV2): Promise<APIResponse<CTFuturesFollowerMyTradersV2[]>>;
|
|
630
862
|
getFuturesFollowerFollowLimit(params: {
|
|
631
863
|
symbol: string;
|
|
632
864
|
productType: CopyTradingProductTypeV2;
|
|
633
|
-
}): Promise<APIResponse<
|
|
865
|
+
}): Promise<APIResponse<{
|
|
866
|
+
maxFollowSize: string;
|
|
867
|
+
minFollowSize: string;
|
|
868
|
+
symbol: string;
|
|
869
|
+
}[]>>;
|
|
634
870
|
unfollowFuturesTrader(params: {
|
|
635
871
|
traderId: string;
|
|
636
|
-
}): Promise<APIResponse<
|
|
872
|
+
}): Promise<APIResponse<string>>;
|
|
637
873
|
/**
|
|
638
874
|
*
|
|
639
875
|
*
|
|
@@ -651,34 +887,34 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
651
887
|
*
|
|
652
888
|
*
|
|
653
889
|
*/
|
|
654
|
-
getSpotTraderProfit(): Promise<APIResponse<
|
|
655
|
-
getSpotTraderHistoryProfit(params: GetSpotTraderHistoryProfitRequestV2): Promise<APIResponse<
|
|
890
|
+
getSpotTraderProfit(): Promise<APIResponse<CTSpotTraderProfitSummaryV2>>;
|
|
891
|
+
getSpotTraderHistoryProfit(params: GetSpotTraderHistoryProfitRequestV2): Promise<APIResponse<CTSpotTraderHistoryProfitSharingV2>>;
|
|
656
892
|
getSpotTraderUnrealizedProfit(params?: {
|
|
657
893
|
coin?: string;
|
|
658
894
|
pageNo?: string;
|
|
659
895
|
pageSize?: string;
|
|
660
|
-
}): Promise<APIResponse<
|
|
661
|
-
getSpotTraderOrder(): Promise<APIResponse<
|
|
896
|
+
}): Promise<APIResponse<CTSpotTraderUnrealizedProfitV2[]>>;
|
|
897
|
+
getSpotTraderOrder(): Promise<APIResponse<CTSpotTraderTotalOrderDetailV2>>;
|
|
662
898
|
modifySpotTraderOrderTPSL(params: {
|
|
663
899
|
trackingNo: string;
|
|
664
900
|
stopSurplusPrice?: string;
|
|
665
901
|
stopLossPrice?: string;
|
|
666
|
-
}): Promise<APIResponse<
|
|
667
|
-
getSpotTraderHistoryOrders(params: GetSpotTraderHistoryOrdersRequestV2): Promise<APIResponse<
|
|
668
|
-
getSpotTraderCurrentOrders(params: GetSpotTraderCurrentOrdersRequestV2): Promise<APIResponse<
|
|
902
|
+
}): Promise<APIResponse<string>>;
|
|
903
|
+
getSpotTraderHistoryOrders(params: GetSpotTraderHistoryOrdersRequestV2): Promise<APIResponse<CTSpotTraderHistoryOrdersV2>>;
|
|
904
|
+
getSpotTraderCurrentOrders(params: GetSpotTraderCurrentOrdersRequestV2): Promise<APIResponse<CTSpotTraderCurrentTrackingOrdersV2>>;
|
|
669
905
|
sellSpotTrader(params: {
|
|
670
906
|
trackingNoList: string[];
|
|
671
907
|
symbol: string;
|
|
672
|
-
}): Promise<APIResponse<
|
|
908
|
+
}): Promise<APIResponse<string>>;
|
|
673
909
|
getSpotTraderSymbolSettings(params: {
|
|
674
910
|
symbolList: string[];
|
|
675
911
|
settingType: 'add' | 'delete';
|
|
676
|
-
}): Promise<APIResponse<
|
|
912
|
+
}): Promise<APIResponse<string>>;
|
|
677
913
|
removeSpotTraderFollowers(params: {
|
|
678
914
|
followerUid: string;
|
|
679
|
-
}): Promise<APIResponse<
|
|
915
|
+
}): Promise<APIResponse<string>>;
|
|
680
916
|
getSpotTraderConfiguration(): Promise<APIResponse<any>>;
|
|
681
|
-
getSpotTraderFollowers(params: GetSpotTraderFollowersRequestV2): Promise<APIResponse<
|
|
917
|
+
getSpotTraderFollowers(params: GetSpotTraderFollowersRequestV2): Promise<APIResponse<CTSpotTraderFollowerListV2[]>>;
|
|
682
918
|
/**
|
|
683
919
|
*
|
|
684
920
|
*
|
|
@@ -688,39 +924,41 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
688
924
|
*/
|
|
689
925
|
cancelSpotFollowerOrder(params: {
|
|
690
926
|
trackingNoList: string[];
|
|
691
|
-
}): Promise<APIResponse<
|
|
927
|
+
}): Promise<APIResponse<string>>;
|
|
692
928
|
updateSpotFollowerSettings(params: {
|
|
693
929
|
traderId: string;
|
|
694
930
|
autoCopy?: 'on' | 'off';
|
|
695
931
|
mode?: 'basic' | 'advanced';
|
|
696
932
|
settings: SpotFollowerCopyTradeSettingV2[];
|
|
697
|
-
}): Promise<APIResponse<
|
|
933
|
+
}): Promise<APIResponse<string>>;
|
|
698
934
|
updateSpotFollowerTPSL(params: {
|
|
699
935
|
trackingNo: string;
|
|
700
936
|
stopSurplusPrice?: string;
|
|
701
937
|
stopLossPrice?: string;
|
|
702
|
-
}): Promise<APIResponse<
|
|
938
|
+
}): Promise<APIResponse<string>>;
|
|
703
939
|
getSpotFollowerTraders(params?: {
|
|
704
940
|
pageNo?: string;
|
|
705
941
|
pageSize?: string;
|
|
706
942
|
startTime?: string;
|
|
707
943
|
endTime?: string;
|
|
708
|
-
}): Promise<APIResponse<
|
|
944
|
+
}): Promise<APIResponse<CTSpotFollowerMyTradersV2>>;
|
|
709
945
|
getSpotFollowerCurrentTraderSymbols(params: {
|
|
710
946
|
traderId: string;
|
|
711
|
-
}): Promise<APIResponse<
|
|
947
|
+
}): Promise<APIResponse<{
|
|
948
|
+
currentTradingList: string[];
|
|
949
|
+
}>>;
|
|
712
950
|
getSpotFollowerSettings(params: {
|
|
713
951
|
traderId: string;
|
|
714
|
-
}): Promise<APIResponse<
|
|
715
|
-
getSpotFollowerHistoryOrders(params: GetSpotFollowerHistoryOrdersRequestV2): Promise<APIResponse<
|
|
716
|
-
getSpotFollowerOpenOrders(params: GetSpotFollowerOpenOrdersRequestV2): Promise<APIResponse<
|
|
952
|
+
}): Promise<APIResponse<CTSpotFollowerFollowConfigurationV2>>;
|
|
953
|
+
getSpotFollowerHistoryOrders(params: GetSpotFollowerHistoryOrdersRequestV2): Promise<APIResponse<CTSpotFollowerHistoryOrdersV2>>;
|
|
954
|
+
getSpotFollowerOpenOrders(params: GetSpotFollowerOpenOrdersRequestV2): Promise<APIResponse<CTSpotFollowerCurrentOrdersV2>>;
|
|
717
955
|
sellSpotFollower(params: {
|
|
718
956
|
trackingNoList: string[];
|
|
719
957
|
symbol: string;
|
|
720
|
-
}): Promise<APIResponse<
|
|
958
|
+
}): Promise<APIResponse<string>>;
|
|
721
959
|
unfollowSpotTrader(params: {
|
|
722
960
|
traderId: string;
|
|
723
|
-
}): Promise<APIResponse<
|
|
961
|
+
}): Promise<APIResponse<string>>;
|
|
724
962
|
/**
|
|
725
963
|
*
|
|
726
964
|
*
|
|
@@ -731,28 +969,40 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
731
969
|
getEarnSavingsProducts(params?: {
|
|
732
970
|
coin?: string;
|
|
733
971
|
filter?: string;
|
|
734
|
-
}): Promise<APIResponse<
|
|
735
|
-
getEarnSavingsAccount(): Promise<APIResponse<
|
|
736
|
-
getEarnSavingsAssets(params: GetEarnSavingsAssetsRequestV2): Promise<APIResponse<
|
|
737
|
-
getEarnSavingsRecords(params: GetEarnSavingsRecordsRequestV2): Promise<APIResponse<
|
|
972
|
+
}): Promise<APIResponse<EarnSavingsProductsV2[]>>;
|
|
973
|
+
getEarnSavingsAccount(): Promise<APIResponse<EarnSavingsAccountV2>>;
|
|
974
|
+
getEarnSavingsAssets(params: GetEarnSavingsAssetsRequestV2): Promise<APIResponse<EarnSavingsAssetsV2>>;
|
|
975
|
+
getEarnSavingsRecords(params: GetEarnSavingsRecordsRequestV2): Promise<APIResponse<EarnSavingsRecordsV2>>;
|
|
738
976
|
getEarnSavingsSubscription(params: {
|
|
739
977
|
productId: string;
|
|
740
978
|
periodType: string;
|
|
741
|
-
}): Promise<APIResponse<
|
|
979
|
+
}): Promise<APIResponse<EarnSavingsSubscriptionDetailV2>>;
|
|
742
980
|
earnSubscribeSavings(params: {
|
|
743
981
|
productId: string;
|
|
744
982
|
periodType: string;
|
|
745
983
|
amount: string;
|
|
746
|
-
}): Promise<APIResponse<
|
|
984
|
+
}): Promise<APIResponse<{
|
|
985
|
+
orderId: string;
|
|
986
|
+
status: string;
|
|
987
|
+
}>>;
|
|
747
988
|
getEarnSavingsSubscriptionResult(params: {
|
|
748
989
|
productId: string;
|
|
749
990
|
periodType: string;
|
|
750
|
-
}): Promise<APIResponse<
|
|
751
|
-
|
|
991
|
+
}): Promise<APIResponse<{
|
|
992
|
+
result: 'success' | 'fail';
|
|
993
|
+
msg: string;
|
|
994
|
+
}>>;
|
|
995
|
+
earnRedeemSavings(params: RedeemSavingsRequestV2): Promise<APIResponse<{
|
|
996
|
+
orderId: string;
|
|
997
|
+
status: string;
|
|
998
|
+
}>>;
|
|
752
999
|
getEarnSavingsRedemptionResult(params: {
|
|
753
1000
|
orderId: string;
|
|
754
1001
|
periodType: string;
|
|
755
|
-
}): Promise<APIResponse<
|
|
1002
|
+
}): Promise<APIResponse<{
|
|
1003
|
+
result: 'success' | 'fail';
|
|
1004
|
+
msg: string;
|
|
1005
|
+
}>>;
|
|
756
1006
|
/**
|
|
757
1007
|
*
|
|
758
1008
|
*
|
|
@@ -762,7 +1012,10 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
762
1012
|
*/
|
|
763
1013
|
getEarnAccount(params?: {
|
|
764
1014
|
coin?: string;
|
|
765
|
-
}): Promise<APIResponse<
|
|
1015
|
+
}): Promise<APIResponse<{
|
|
1016
|
+
coin: string;
|
|
1017
|
+
amount: string;
|
|
1018
|
+
}[]>>;
|
|
766
1019
|
/**
|
|
767
1020
|
*
|
|
768
1021
|
*
|
|
@@ -774,20 +1027,26 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
774
1027
|
coin: string;
|
|
775
1028
|
limit?: string;
|
|
776
1029
|
idLessThan?: string;
|
|
777
|
-
}): Promise<APIResponse<
|
|
778
|
-
getSharkfinAccount(): Promise<APIResponse<
|
|
779
|
-
getSharkfinAssets(params: GetSharkfinAssetsRequestV2): Promise<APIResponse<
|
|
780
|
-
getSharkfinRecords(params: GetSharkfinRecordsRequestV2): Promise<APIResponse<
|
|
1030
|
+
}): Promise<APIResponse<EarnSharkfinProductsV2>>;
|
|
1031
|
+
getSharkfinAccount(): Promise<APIResponse<EarnSharkfinAccountV2>>;
|
|
1032
|
+
getSharkfinAssets(params: GetSharkfinAssetsRequestV2): Promise<APIResponse<EarnSharkfinAssetsV2>>;
|
|
1033
|
+
getSharkfinRecords(params: GetSharkfinRecordsRequestV2): Promise<APIResponse<EarnSharkfinRecordsV2>>;
|
|
781
1034
|
getSharkfinSubscription(params: {
|
|
782
1035
|
productId: string;
|
|
783
|
-
}): Promise<APIResponse<
|
|
1036
|
+
}): Promise<APIResponse<EarnSharkfinSubscriptionDetailV2>>;
|
|
784
1037
|
subscribeSharkfin(params: {
|
|
785
1038
|
productId: string;
|
|
786
1039
|
amount: string;
|
|
787
|
-
}): Promise<APIResponse<
|
|
1040
|
+
}): Promise<APIResponse<{
|
|
1041
|
+
orderId: string;
|
|
1042
|
+
status: string;
|
|
1043
|
+
}>>;
|
|
788
1044
|
getSharkfinSubscriptionResult(params: {
|
|
789
1045
|
orderId: string;
|
|
790
|
-
}): Promise<APIResponse<
|
|
1046
|
+
}): Promise<APIResponse<{
|
|
1047
|
+
result: 'success' | 'fail';
|
|
1048
|
+
msg: string;
|
|
1049
|
+
}>>;
|
|
791
1050
|
/**
|
|
792
1051
|
*
|
|
793
1052
|
*
|
|
@@ -797,19 +1056,28 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
797
1056
|
*/
|
|
798
1057
|
getLoanCurrencies(params?: {
|
|
799
1058
|
coin?: string;
|
|
800
|
-
}): Promise<APIResponse<
|
|
801
|
-
getLoanEstInterestAndBorrowable(params: GetLoanEstInterestAndBorrowableRequestV2): Promise<APIResponse<
|
|
802
|
-
|
|
1059
|
+
}): Promise<APIResponse<EarnLoanCurrenciesV2>>;
|
|
1060
|
+
getLoanEstInterestAndBorrowable(params: GetLoanEstInterestAndBorrowableRequestV2): Promise<APIResponse<{
|
|
1061
|
+
hourInterest: string;
|
|
1062
|
+
loanAmount: string;
|
|
1063
|
+
}>>;
|
|
1064
|
+
borrowLoan(params: BorrowLoanRequestV2): Promise<APIResponse<{
|
|
1065
|
+
orderId: string;
|
|
1066
|
+
}>>;
|
|
803
1067
|
getOngoingLoanOrders(params?: {
|
|
804
1068
|
orderId?: string;
|
|
805
1069
|
loanCoin?: string;
|
|
806
1070
|
pledgeCoin?: string;
|
|
807
|
-
}): Promise<APIResponse<
|
|
808
|
-
repayLoan(params: RepayLoanRequestV2): Promise<APIResponse<
|
|
809
|
-
getRepayHistory(params: GetLoanRepayHistoryRequestV2): Promise<APIResponse<
|
|
810
|
-
updateLoanPledgeRate(params: ModifyLoanPledgeRateRequestV2): Promise<APIResponse<
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
1071
|
+
}): Promise<APIResponse<EarnLoanOrdersV2[]>>;
|
|
1072
|
+
repayLoan(params: RepayLoanRequestV2): Promise<APIResponse<EarnLoanRepayResponseV2>>;
|
|
1073
|
+
getRepayHistory(params: GetLoanRepayHistoryRequestV2): Promise<APIResponse<EarnLoanRepayHistoryV2>>;
|
|
1074
|
+
updateLoanPledgeRate(params: ModifyLoanPledgeRateRequestV2): Promise<APIResponse<{
|
|
1075
|
+
loanCoin: string;
|
|
1076
|
+
pledgeCoin: string;
|
|
1077
|
+
afterPledgeRate: string;
|
|
1078
|
+
}>>;
|
|
1079
|
+
getLoanPledgeRateHistory(params: GetLoanPledgeRateHistoryRequestV2): Promise<APIResponse<EarnLoanPledgeRateHistoryV2[]>>;
|
|
1080
|
+
getLoanHistory(params: GetLoanHistoryRequestV2): Promise<APIResponse<EarnLoanHistoryV2[]>>;
|
|
1081
|
+
getLoanDebts(): Promise<APIResponse<EarnLoanDebtsV2>>;
|
|
1082
|
+
getLoanLiquidationRecords(params: GetLiquidationRecordsRequestV2): Promise<APIResponse<EarnLoanLiquidationRecordsV2[]>>;
|
|
815
1083
|
}
|