bitget-api 2.0.12 → 2.1.0
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 +555 -233
- package/lib/rest-client-v2.js +98 -19
- package/lib/rest-client-v2.js.map +1 -1
- package/lib/types/request/index.d.ts +5 -0
- package/lib/types/request/index.js +5 -0
- package/lib/types/request/index.js.map +1 -1
- package/lib/types/request/shared.d.ts +2 -0
- package/lib/types/request/v2/broker.d.ts +69 -0
- package/lib/types/request/v2/broker.js +8 -0
- package/lib/types/request/v2/broker.js.map +1 -0
- package/lib/types/request/v2/common.d.ts +163 -0
- package/lib/types/request/v2/common.js +3 -0
- package/lib/types/request/v2/common.js.map +1 -0
- package/lib/types/request/v2/copytrading.d.ts +196 -0
- package/lib/types/request/v2/copytrading.js +10 -0
- package/lib/types/request/v2/copytrading.js.map +1 -0
- package/lib/types/request/v2/earn.d.ts +121 -0
- package/lib/types/request/v2/earn.js +10 -0
- package/lib/types/request/v2/earn.js.map +1 -0
- package/lib/types/request/v2/futures.d.ts +342 -1
- package/lib/types/request/v2/margin.d.ts +121 -0
- package/lib/types/request/v2/margin.js +8 -0
- package/lib/types/request/v2/margin.js.map +1 -0
- package/lib/types/request/v2/spot.d.ts +256 -0
- package/package.json +1 -1
package/lib/rest-client-v2.d.ts
CHANGED
|
@@ -1,11 +1,31 @@
|
|
|
1
|
-
import { APIResponse, MarginType, FuturesAccountBillRequestV2, FuturesCandlesRequestV2, SpotCandlesRequestV2, SpotAccountBill } from './types';
|
|
1
|
+
import { APIResponse, MarginType, FuturesAccountBillRequestV2, FuturesCandlesRequestV2, SpotCandlesRequestV2, SpotAccountBill, SpotHistoricCandlesRequestV2, SpotHistoricTradesRequestV2, SpotOrderRequestV2, SpotCancelandSubmitOrderRequestV2, SpotCancelOrderRequestV2, SpotBatchOrderRequestV2, SpotBatchCancelOrderRequestV2, GetSpotOrderInfoRequestV2, GetSpotOpenOrdersRequestV2, GetSpotHistoryOrdersRequestV2, GetSpotFillsRequestV2, SpotPlanOrderRequestV2, SpotModifyPlanOrderRequestV2, GetSpotCurrentPlanOrdersRequestV2, GetSpotHistoryPlanOrdersRequestV2, GetSpotAccountBillsRequestV2, SpotTransferRequestV2, SpotAccountTypeV2, SpotSubAccountTransferRequestV2, SpotWithdrawalRequestV2, SpotMainSubTransferRecordRequestV2, GetSpotTransferRecordRequestV2, GetSpotSubAccountDepositRecordRequestV2, GetSpotWithdrawalRecordRequestV2, GetSpotDepositRecordRequestV2, FuturesMergeDepthRequestV2, FuturesProductTypeV2, FuturesRecentTradesRequestV2, FuturesHistoricTradesRequestV2, FuturesSingleAccountRequestV2, FuturesInterestHistoryRequestV2, FuturesOpenCountRequestV2, FuturesSetAutoMarginRequestV2, FuturesSetLeverageRequestV2, FuturesSetPositionMarginRequestV2, FuturesSetMarginModeRequestV2, FuturesHistoricalPositionsRequestV2, FuturesPlaceOrderRequestV2, FuturesReversalOrderRequestV2, FuturesBatchOrderRequestV2, FuturesModifyOrderRequestV2, FuturesCancelOrderRequestV2, FuturesBatchCancelOrderRequestV2, FuturesFlashClosePositionsRequestV2, FuturesGetOrderRequestV2, FuturesGetOrderFillsRequestV2, FuturesGetHistoricalFillsRequestV2, FuturesGetOpenOrdersRequestV2, FuturesGetHistoryOrdersRequestV2, FuturesCancelAllOrdersRequestV2, FuturesTPSLOrderRequestV2, FuturesPlanOrderRequestV2, FuturesModifyTPSLOrderRequestV2, FuturesModifyPlanOrderRequestV2, FuturesGetPlanOrdersRequestV2, FuturesCancelPlanOrderRequestV2, FuturesGetHistoryPlanOrdersRequestV2, GetBorrowHistoryRequestV2, GetRepayHistoryRequestV2, GetInterestHistoryRequestV2, GetLiquidationHistoryRequestV2, GetFinancialHistoryRequestV2, MarginPlaceOrderRequestV2, MarginBatchOrdersRequestV2, GetMarginCurrentOrdersRequestV2, GetHistoryOrdersRequestV2, GetMarginOrderFillsRequestV2, GetMarginLiquidationOrdersRequestV2, GetFuturesTraderCurrentOrdersRequestV2, GetFuturesTraderHistoryOrdersRequestV2, ModifyFuturesTraderOrderTPSLRequestV2, GetFuturesTraderProfitShareDetailRequestV2, CopyTradingProductTypeV2, FuturesTraderSymbolSettingRequestV2, GetFuturesTraderFollowersRequestV2, GetFollowerFuturesCurrentTrackingOrdersRequestV2, GetFollowerFuturesHistoryTrackingOrdersRequestV2, UpdateFuturesFollowerTPSLRequestV2, UpdateFuturesFollowerSettingsRequestV2, GetFuturesFollowerTradersRequestV2, CloseFuturesFollowerPositionsRequestV2, GetSpotTraderHistoryProfitRequestV2, GetSpotTraderHistoryOrdersRequestV2, GetSpotTraderCurrentOrdersRequestV2, GetSpotTraderFollowersRequestV2, SpotFollowerCopyTradeSettingV2, GetSpotFollowerHistoryOrdersRequestV2, GetSpotFollowerOpenOrdersRequestV2, GetEarnSavingsAssetsRequestV2, GetEarnSavingsRecordsRequestV2, RedeemSavingsRequestV2, GetSharkfinAssetsRequestV2, GetSharkfinRecordsRequestV2, GetLoanEstInterestAndBorrowableRequestV2, BorrowLoanRequestV2, RepayLoanRequestV2, GetLoanRepayHistoryRequestV2, ModifyLoanPledgeRateRequestV2, GetLoanPledgeRateHistoryRequestV2, GetLoanHistoryRequestV2, GetLiquidationRecordsRequestV2 } from './types';
|
|
2
|
+
import { CreateSubAccountApiKeyRequestV2, GetSubAccountsRequestV2, ModifySubAccountApiKeyRequestV2, ModifySubRequestV2, SubDepositRecordsRequestV2, SubWithdrawalRecordsRequestV2, SubWithdrawalRequestV2 } from './types/request/v2/broker';
|
|
3
|
+
import { ConvertQuoteRequestV2, ConvertRequestV2, CreateVirtualSubApiKeyRequestV2, CreateVirtualSubRequestV2, GetAnnouncementsRequestV2, GetConvertHistoryRequestV2, GetFuturesTransactionsRequestV2, GetMarginTransactionsRequestV2, GetMerchantAdvertisementsRequestV2, GetMerchantP2POrdersRequestV2, GetP2PMerchantsRequestV2, GetP2PTransactionsRequestV2, GetSpotTransactionsRequestV2, GetTradeRateRequestV2, ModifyVirtualSubRequestV2, ModifyVirtualSubApiKeyRequestV2, GetConvertBGBHistoryRequestV2 } from './types/request/v2/common';
|
|
2
4
|
import BaseRestClient from './util/BaseRestClient';
|
|
3
5
|
/**
|
|
4
6
|
* REST API client for all V2 endpoints
|
|
5
7
|
*/
|
|
6
8
|
export declare class RestClientV2 extends BaseRestClient {
|
|
7
9
|
getClientType(): "v2";
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* Custom SDK functions
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* This method is used to get the latency and time sync between the client and the server.
|
|
17
|
+
* This is not official API endpoint and is only used for internal testing purposes.
|
|
18
|
+
* Use this method to check the latency and time sync between the client and the server.
|
|
19
|
+
* Final values might vary slightly, but it should be within few ms difference.
|
|
20
|
+
* If you have any suggestions or improvements to this measurement, please create an issue or pull request on GitHub.
|
|
21
|
+
*/
|
|
22
|
+
fetchLatencySummary(): Promise<any>;
|
|
8
23
|
fetchServerTime(): Promise<number>;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* Bitget misc functions
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
9
29
|
/**
|
|
10
30
|
*
|
|
11
31
|
*
|
|
@@ -18,67 +38,109 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
18
38
|
* * Common | Notice
|
|
19
39
|
*
|
|
20
40
|
*/
|
|
21
|
-
getAnnouncements(): Promise<APIResponse<any>>;
|
|
41
|
+
getAnnouncements(params?: GetAnnouncementsRequestV2): Promise<APIResponse<any>>;
|
|
22
42
|
/**
|
|
23
43
|
*
|
|
24
44
|
* * Common | Public
|
|
25
45
|
*
|
|
26
46
|
*/
|
|
27
47
|
getServerTime(): Promise<APIResponse<any>>;
|
|
28
|
-
getTradeRate(params:
|
|
48
|
+
getTradeRate(params: GetTradeRateRequestV2): Promise<APIResponse<any>>;
|
|
29
49
|
/**
|
|
30
50
|
*
|
|
31
51
|
* * Common | Tax
|
|
32
52
|
*
|
|
33
53
|
*/
|
|
34
|
-
getSpotTransactionRecords(params:
|
|
35
|
-
getFuturesTransactionRecords(params:
|
|
36
|
-
getMarginTransactionRecords(params:
|
|
37
|
-
getP2PTransactionRecords(params:
|
|
54
|
+
getSpotTransactionRecords(params: GetSpotTransactionsRequestV2): Promise<APIResponse<any>>;
|
|
55
|
+
getFuturesTransactionRecords(params: GetFuturesTransactionsRequestV2): Promise<APIResponse<any>>;
|
|
56
|
+
getMarginTransactionRecords(params: GetMarginTransactionsRequestV2): Promise<APIResponse<any>>;
|
|
57
|
+
getP2PTransactionRecords(params: GetP2PTransactionsRequestV2): Promise<APIResponse<any>>;
|
|
38
58
|
/**
|
|
39
59
|
*
|
|
40
60
|
* * Common | P2P
|
|
41
61
|
*
|
|
42
62
|
*/
|
|
43
|
-
getP2PMerchantList(params?:
|
|
63
|
+
getP2PMerchantList(params?: GetP2PMerchantsRequestV2): Promise<APIResponse<any>>;
|
|
44
64
|
getP2PMerchantInfo(): Promise<APIResponse<any>>;
|
|
45
|
-
getP2PMerchantOrders(params:
|
|
46
|
-
getP2PMerchantAdvertisementList(params:
|
|
65
|
+
getP2PMerchantOrders(params: GetMerchantP2POrdersRequestV2): Promise<APIResponse<any>>;
|
|
66
|
+
getP2PMerchantAdvertisementList(params: GetMerchantAdvertisementsRequestV2): Promise<APIResponse<any>>;
|
|
47
67
|
/**
|
|
48
68
|
*
|
|
49
69
|
* * Common | Trading insights
|
|
50
70
|
*
|
|
51
71
|
*/
|
|
52
|
-
getSpotWhaleNetFlowData(params:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
72
|
+
getSpotWhaleNetFlowData(params: {
|
|
73
|
+
symbol: string;
|
|
74
|
+
}): Promise<APIResponse<any>>;
|
|
75
|
+
getFuturesActiveTakerBuySellVolumeData(params: {
|
|
76
|
+
symbol: string;
|
|
77
|
+
period?: string;
|
|
78
|
+
}): Promise<APIResponse<any>>;
|
|
79
|
+
getFuturesActiveLongShortPositionData(params: {
|
|
80
|
+
symbol: string;
|
|
81
|
+
period?: string;
|
|
82
|
+
}): Promise<APIResponse<any>>;
|
|
83
|
+
getFuturesLongShortRatio(params: {
|
|
84
|
+
symbol: string;
|
|
85
|
+
period?: string;
|
|
86
|
+
coin?: string;
|
|
87
|
+
}): Promise<APIResponse<any>>;
|
|
88
|
+
getMarginLoanGrowthRate(params: {
|
|
89
|
+
symbol: string;
|
|
90
|
+
period?: string;
|
|
91
|
+
coin?: string;
|
|
92
|
+
}): Promise<APIResponse<any>>;
|
|
93
|
+
getIsolatedMarginBorrowingRatio(params: {
|
|
94
|
+
symbol: string;
|
|
95
|
+
period?: string;
|
|
96
|
+
}): Promise<APIResponse<any>>;
|
|
97
|
+
getFuturesActiveBuySellVolumeData(params: {
|
|
98
|
+
symbol: string;
|
|
99
|
+
period?: string;
|
|
100
|
+
}): Promise<APIResponse<any>>;
|
|
101
|
+
getSpotFundFlow(params: {
|
|
102
|
+
symbol: string;
|
|
103
|
+
period?: string;
|
|
104
|
+
}): Promise<APIResponse<any>>;
|
|
60
105
|
getTradeDataSupportSymbols(): Promise<APIResponse<any>>;
|
|
61
|
-
getSpotFundNetFlowData(params:
|
|
62
|
-
|
|
106
|
+
getSpotFundNetFlowData(params: {
|
|
107
|
+
symbol: string;
|
|
108
|
+
}): Promise<APIResponse<any>>;
|
|
109
|
+
getFuturesActiveLongShortAccountData(params: {
|
|
110
|
+
symbol: string;
|
|
111
|
+
period?: string;
|
|
112
|
+
}): Promise<APIResponse<any>>;
|
|
63
113
|
/**
|
|
64
114
|
*
|
|
65
115
|
* * Common | Virtual Subaccount
|
|
66
116
|
*
|
|
67
117
|
*/
|
|
68
|
-
createVirtualSubaccount(params:
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
118
|
+
createVirtualSubaccount(params: {
|
|
119
|
+
subAccountList: string[];
|
|
120
|
+
}): Promise<APIResponse<any>>;
|
|
121
|
+
modifyVirtualSubaccount(params: ModifyVirtualSubRequestV2): Promise<APIResponse<any>>;
|
|
122
|
+
batchCreateVirtualSubaccountAndAPIKey(params: CreateVirtualSubRequestV2): Promise<APIResponse<any>>;
|
|
123
|
+
getVirtualSubaccounts(params?: {
|
|
124
|
+
limit?: string;
|
|
125
|
+
idLessThan?: string;
|
|
126
|
+
status?: 'normal' | 'freeze';
|
|
127
|
+
}): Promise<APIResponse<any>>;
|
|
128
|
+
createVirtualSubaccountAPIKey(params: CreateVirtualSubApiKeyRequestV2): Promise<APIResponse<any>>;
|
|
129
|
+
modifyVirtualSubaccountAPIKey(params: ModifyVirtualSubApiKeyRequestV2): Promise<APIResponse<any>>;
|
|
130
|
+
getVirtualSubaccountAPIKeys(params: {
|
|
131
|
+
subAccountUid: string;
|
|
132
|
+
}): Promise<APIResponse<any>>;
|
|
75
133
|
/**
|
|
76
134
|
*
|
|
77
135
|
* * Common | Assets
|
|
78
136
|
*
|
|
79
137
|
*/
|
|
80
|
-
getFundingAssets(params?:
|
|
81
|
-
|
|
138
|
+
getFundingAssets(params?: {
|
|
139
|
+
coin?: string;
|
|
140
|
+
}): Promise<APIResponse<any>>;
|
|
141
|
+
getBotAccount(params?: {
|
|
142
|
+
accountType?: string;
|
|
143
|
+
}): Promise<APIResponse<any>>;
|
|
82
144
|
/** Get assets overview */
|
|
83
145
|
getBalances(): Promise<APIResponse<any>>;
|
|
84
146
|
/**
|
|
@@ -87,17 +149,19 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
87
149
|
*
|
|
88
150
|
*/
|
|
89
151
|
getConvertCoins(): Promise<APIResponse<any>>;
|
|
90
|
-
getConvertQuotedPrice(params:
|
|
91
|
-
convert(params:
|
|
92
|
-
getConvertHistory(params:
|
|
152
|
+
getConvertQuotedPrice(params: ConvertQuoteRequestV2): Promise<APIResponse<any>>;
|
|
153
|
+
convert(params: ConvertRequestV2): Promise<APIResponse<any>>;
|
|
154
|
+
getConvertHistory(params: GetConvertHistoryRequestV2): Promise<APIResponse<any>>;
|
|
93
155
|
/**
|
|
94
156
|
*
|
|
95
157
|
* * Common | BGB Convert
|
|
96
158
|
*
|
|
97
159
|
*/
|
|
98
160
|
getConvertBGBCoins(): Promise<APIResponse<any>>;
|
|
99
|
-
convertBGB(params:
|
|
100
|
-
|
|
161
|
+
convertBGB(params: {
|
|
162
|
+
coinList: string;
|
|
163
|
+
}): Promise<APIResponse<any>>;
|
|
164
|
+
getConvertBGBHistory(params: GetConvertBGBHistoryRequestV2): Promise<APIResponse<any>>;
|
|
101
165
|
/**
|
|
102
166
|
*
|
|
103
167
|
*
|
|
@@ -110,74 +174,118 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
110
174
|
* * Spot | Market
|
|
111
175
|
*
|
|
112
176
|
*/
|
|
113
|
-
getSpotCoinInfo(params?:
|
|
114
|
-
|
|
177
|
+
getSpotCoinInfo(params?: {
|
|
178
|
+
coin?: string;
|
|
179
|
+
}): Promise<APIResponse<any>>;
|
|
180
|
+
getSpotSymbolInfo(params?: {
|
|
181
|
+
symbol?: string;
|
|
182
|
+
}): Promise<APIResponse<any>>;
|
|
115
183
|
getSpotVIPFeeRate(): Promise<APIResponse<any>>;
|
|
116
|
-
getSpotTicker(params?:
|
|
117
|
-
|
|
118
|
-
|
|
184
|
+
getSpotTicker(params?: {
|
|
185
|
+
symbol?: string;
|
|
186
|
+
}): Promise<APIResponse<any>>;
|
|
187
|
+
getSpotMergeDepth(params: {
|
|
188
|
+
symbol: string;
|
|
189
|
+
precision?: string;
|
|
190
|
+
limit?: string;
|
|
191
|
+
}): Promise<APIResponse<any>>;
|
|
192
|
+
getSpotOrderBookDepth(params: {
|
|
193
|
+
symbol: string;
|
|
194
|
+
type?: string;
|
|
195
|
+
limit?: string;
|
|
196
|
+
}): Promise<APIResponse<any>>;
|
|
119
197
|
getSpotCandles(params: SpotCandlesRequestV2): Promise<APIResponse<any>>;
|
|
120
|
-
getSpotHistoricCandles(params:
|
|
121
|
-
getSpotRecentTrades(params:
|
|
122
|
-
|
|
198
|
+
getSpotHistoricCandles(params: SpotHistoricCandlesRequestV2): Promise<APIResponse<any>>;
|
|
199
|
+
getSpotRecentTrades(params: {
|
|
200
|
+
symbol: string;
|
|
201
|
+
limit?: string;
|
|
202
|
+
}): Promise<APIResponse<any>>;
|
|
203
|
+
getSpotHistoricTrades(params: SpotHistoricTradesRequestV2): Promise<APIResponse<any>>;
|
|
123
204
|
/**
|
|
124
205
|
*
|
|
125
206
|
* * Spot | Trade
|
|
126
207
|
*
|
|
127
208
|
*/
|
|
128
|
-
spotSubmitOrder(params:
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
209
|
+
spotSubmitOrder(params: SpotOrderRequestV2): Promise<APIResponse<any>>;
|
|
210
|
+
spotCancelandSubmitOrder(params: SpotCancelandSubmitOrderRequestV2): Promise<APIResponse<any>>;
|
|
211
|
+
spotBatchCancelandSubmitOrder(params: {
|
|
212
|
+
orderList: SpotCancelandSubmitOrderRequestV2[];
|
|
213
|
+
}): Promise<APIResponse<any>>;
|
|
214
|
+
spotCancelOrder(params: SpotCancelOrderRequestV2): Promise<APIResponse<any>>;
|
|
215
|
+
spotBatchSubmitOrders(params: SpotBatchOrderRequestV2): Promise<APIResponse<any>>;
|
|
216
|
+
spotBatchCancelOrders(params: SpotBatchCancelOrderRequestV2): Promise<APIResponse<any>>;
|
|
217
|
+
spotCancelSymbolOrder(params: {
|
|
218
|
+
symbol: string;
|
|
219
|
+
}): Promise<APIResponse<any>>;
|
|
220
|
+
getSpotOrder(params?: GetSpotOrderInfoRequestV2): Promise<APIResponse<any>>;
|
|
221
|
+
getSpotOpenOrders(params?: GetSpotOpenOrdersRequestV2): Promise<APIResponse<any>>;
|
|
222
|
+
getSpotHistoricOrders(params?: GetSpotHistoryOrdersRequestV2): Promise<APIResponse<any>>;
|
|
223
|
+
getSpotFills(params: GetSpotFillsRequestV2): Promise<APIResponse<any>>;
|
|
137
224
|
/**
|
|
138
225
|
*
|
|
139
226
|
* * Spot | Trigger Orders
|
|
140
227
|
*
|
|
141
228
|
*/
|
|
142
|
-
spotSubmitPlanOrder(params:
|
|
143
|
-
spotModifyPlanOrder(params:
|
|
144
|
-
spotCancelPlanOrder(params:
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
229
|
+
spotSubmitPlanOrder(params: SpotPlanOrderRequestV2): Promise<APIResponse<any>>;
|
|
230
|
+
spotModifyPlanOrder(params: SpotModifyPlanOrderRequestV2): Promise<APIResponse<any>>;
|
|
231
|
+
spotCancelPlanOrder(params: {
|
|
232
|
+
clientOid?: string;
|
|
233
|
+
orderId?: string;
|
|
234
|
+
}): Promise<APIResponse<any>>;
|
|
235
|
+
getSpotCurrentPlanOrders(params: GetSpotCurrentPlanOrdersRequestV2): Promise<APIResponse<any>>;
|
|
236
|
+
getSpotPlanSubOrder(params: {
|
|
237
|
+
planOrderId: string;
|
|
238
|
+
}): Promise<APIResponse<any>>;
|
|
239
|
+
getSpotHistoricPlanOrders(params: GetSpotHistoryPlanOrdersRequestV2): Promise<APIResponse<any>>;
|
|
240
|
+
spotCancelPlanOrders(params?: {
|
|
241
|
+
symbolList?: string[];
|
|
242
|
+
}): Promise<APIResponse<any>>;
|
|
149
243
|
/**
|
|
150
244
|
*
|
|
151
245
|
* * Spot | Account
|
|
152
246
|
*
|
|
153
247
|
*/
|
|
154
248
|
getSpotAccount(): Promise<APIResponse<any>>;
|
|
155
|
-
getSpotAccountAssets(params?:
|
|
156
|
-
getSpotSubAccountAssets(): Promise<APIResponse<any>>;
|
|
157
|
-
spotModifyDepositAccount(params: object): Promise<APIResponse<any>>;
|
|
158
|
-
getSpotAccountBills(params?: {
|
|
249
|
+
getSpotAccountAssets(params?: {
|
|
159
250
|
coin?: string;
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}): Promise<APIResponse<
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
251
|
+
assetType?: string;
|
|
252
|
+
}): Promise<APIResponse<any>>;
|
|
253
|
+
getSpotSubAccountAssets(): Promise<APIResponse<any>>;
|
|
254
|
+
spotModifyDepositAccount(params: {
|
|
255
|
+
accountType: string;
|
|
256
|
+
coin: string;
|
|
257
|
+
}): Promise<APIResponse<any>>;
|
|
258
|
+
getSpotAccountBills(params?: GetSpotAccountBillsRequestV2): Promise<APIResponse<SpotAccountBill[]>>;
|
|
259
|
+
spotTransfer(params: SpotTransferRequestV2): Promise<APIResponse<any>>;
|
|
260
|
+
getSpotTransferableCoins(params: {
|
|
261
|
+
fromType: SpotAccountTypeV2;
|
|
262
|
+
toType: SpotAccountTypeV2;
|
|
263
|
+
}): Promise<APIResponse<any>>;
|
|
264
|
+
spotSubTransfer(params: SpotSubAccountTransferRequestV2): Promise<APIResponse<any>>;
|
|
265
|
+
spotWithdraw(params: SpotWithdrawalRequestV2): Promise<APIResponse<any>>;
|
|
266
|
+
getSpotMainSubTransferRecord(params: SpotMainSubTransferRecordRequestV2): Promise<APIResponse<any>>;
|
|
267
|
+
getSpotTransferHistory(params: GetSpotTransferRecordRequestV2): Promise<APIResponse<any>>;
|
|
268
|
+
spotSwitchBGBDeduct(params: {
|
|
269
|
+
deduct: boolean;
|
|
270
|
+
}): Promise<APIResponse<any>>;
|
|
271
|
+
getSpotDepositAddress(params: {
|
|
272
|
+
coin: string;
|
|
273
|
+
chain?: string;
|
|
274
|
+
size: string;
|
|
275
|
+
}): Promise<APIResponse<any>>;
|
|
276
|
+
getSpotSubDepositAddress(params: {
|
|
277
|
+
subUid: string;
|
|
278
|
+
coin: string;
|
|
279
|
+
chain?: string;
|
|
280
|
+
size: string;
|
|
281
|
+
}): Promise<APIResponse<any>>;
|
|
176
282
|
getSpotBGBDeductInfo(): Promise<APIResponse<any>>;
|
|
177
|
-
spotCancelWithdrawal(params:
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
getSubAccountDepositRecords(params:
|
|
283
|
+
spotCancelWithdrawal(params: {
|
|
284
|
+
orderId: string;
|
|
285
|
+
}): Promise<APIResponse<any>>;
|
|
286
|
+
getSubAccountDepositRecords(params: GetSpotSubAccountDepositRecordRequestV2): Promise<APIResponse<any>>;
|
|
287
|
+
getSpotDepositHistory(params: GetSpotDepositRecordRequestV2): Promise<APIResponse<any>>;
|
|
288
|
+
getSpotWithdrawalHistory(params: GetSpotWithdrawalRecordRequestV2): Promise<APIResponse<any>>;
|
|
181
289
|
/**
|
|
182
290
|
*
|
|
183
291
|
*
|
|
@@ -191,76 +299,132 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
191
299
|
*
|
|
192
300
|
*/
|
|
193
301
|
getFuturesVIPFeeRate(): Promise<APIResponse<any>>;
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
302
|
+
getFuturesInterestRateHistory(params: {
|
|
303
|
+
coin: string;
|
|
304
|
+
}): Promise<APIResponse<any>>;
|
|
305
|
+
getFuturesTicker(params: {
|
|
306
|
+
symbol: string;
|
|
307
|
+
productType: FuturesProductTypeV2;
|
|
308
|
+
}): Promise<APIResponse<any>>;
|
|
309
|
+
getFuturesInterestExchangeRate(): Promise<APIResponse<any>>;
|
|
310
|
+
getFuturesDiscountRate(): Promise<APIResponse<any>>;
|
|
311
|
+
getFuturesAllTickers(params: {
|
|
312
|
+
productType: FuturesProductTypeV2;
|
|
313
|
+
}): Promise<APIResponse<any>>;
|
|
314
|
+
getFuturesMergeDepth(params: FuturesMergeDepthRequestV2): Promise<APIResponse<any>>;
|
|
197
315
|
getFuturesCandles(params: FuturesCandlesRequestV2): Promise<APIResponse<any>>;
|
|
198
|
-
getFuturesHistoricCandles(params:
|
|
199
|
-
getFuturesHistoricIndexPriceCandles(params:
|
|
200
|
-
getFuturesHistoricMarkPriceCandles(params:
|
|
201
|
-
getFuturesRecentTrades(params:
|
|
202
|
-
getFuturesHistoricTrades(params:
|
|
203
|
-
getFuturesOpenInterest(params:
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
316
|
+
getFuturesHistoricCandles(params: FuturesCandlesRequestV2): Promise<APIResponse<any>>;
|
|
317
|
+
getFuturesHistoricIndexPriceCandles(params: FuturesCandlesRequestV2): Promise<APIResponse<any>>;
|
|
318
|
+
getFuturesHistoricMarkPriceCandles(params: FuturesCandlesRequestV2): Promise<APIResponse<any>>;
|
|
319
|
+
getFuturesRecentTrades(params: FuturesRecentTradesRequestV2): Promise<APIResponse<any>>;
|
|
320
|
+
getFuturesHistoricTrades(params: FuturesHistoricTradesRequestV2): Promise<APIResponse<any>>;
|
|
321
|
+
getFuturesOpenInterest(params: {
|
|
322
|
+
symbol: string;
|
|
323
|
+
productType: FuturesProductTypeV2;
|
|
324
|
+
}): Promise<APIResponse<any>>;
|
|
325
|
+
getFuturesNextFundingTime(params: {
|
|
326
|
+
symbol: string;
|
|
327
|
+
productType: FuturesProductTypeV2;
|
|
328
|
+
}): Promise<APIResponse<any>>;
|
|
329
|
+
getFuturesSymbolPrice(params: {
|
|
330
|
+
symbol: string;
|
|
331
|
+
productType: FuturesProductTypeV2;
|
|
332
|
+
}): Promise<APIResponse<any>>;
|
|
333
|
+
getFuturesHistoricFundingRates(params: {
|
|
334
|
+
symbol: string;
|
|
335
|
+
productType: FuturesProductTypeV2;
|
|
336
|
+
pageSize?: string;
|
|
337
|
+
pageNumber?: string;
|
|
338
|
+
}): Promise<APIResponse<any>>;
|
|
339
|
+
getFuturesCurrentFundingRate(params: {
|
|
340
|
+
symbol: string;
|
|
341
|
+
productType: FuturesProductTypeV2;
|
|
342
|
+
}): Promise<APIResponse<any>>;
|
|
343
|
+
getFuturesContractConfig(params: {
|
|
344
|
+
symbol: string;
|
|
345
|
+
productType: FuturesProductTypeV2;
|
|
346
|
+
}): Promise<APIResponse<any>>;
|
|
209
347
|
/**
|
|
210
348
|
*
|
|
211
349
|
* * Futures | Account
|
|
212
350
|
*
|
|
213
351
|
*/
|
|
214
|
-
getFuturesAccountAsset(params:
|
|
215
|
-
getFuturesAccountAssets(params:
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
352
|
+
getFuturesAccountAsset(params: FuturesSingleAccountRequestV2): Promise<APIResponse<any>>;
|
|
353
|
+
getFuturesAccountAssets(params: {
|
|
354
|
+
productType: FuturesProductTypeV2;
|
|
355
|
+
}): Promise<APIResponse<any>>;
|
|
356
|
+
getFuturesSubAccountAssets(params: {
|
|
357
|
+
productType: FuturesProductTypeV2;
|
|
358
|
+
}): Promise<APIResponse<any>>;
|
|
359
|
+
getFuturesInterestHistory(params: FuturesInterestHistoryRequestV2): Promise<APIResponse<any>>;
|
|
360
|
+
getFuturesOpenCount(params: FuturesOpenCountRequestV2): Promise<APIResponse<any>>;
|
|
361
|
+
setFuturesLeverage(params: FuturesSetLeverageRequestV2): Promise<APIResponse<any>>;
|
|
362
|
+
setFuturesPositionAutoMargin(params: FuturesSetAutoMarginRequestV2): Promise<APIResponse<any>>;
|
|
363
|
+
setFuturesPositionMargin(params: FuturesSetPositionMarginRequestV2): Promise<APIResponse<any>>;
|
|
364
|
+
setFuturesAssetMode(params: {
|
|
365
|
+
productType: 'USDT-FUTURES' | 'SUSDT-FUTURES';
|
|
366
|
+
assetMode: 'single' | 'union';
|
|
367
|
+
}): Promise<APIResponse<any>>;
|
|
368
|
+
setFuturesMarginMode(params: FuturesSetMarginModeRequestV2): Promise<APIResponse<any>>;
|
|
369
|
+
setFuturesPositionMode(params: {
|
|
370
|
+
productType: FuturesProductTypeV2;
|
|
371
|
+
posMode: 'one_way_mode' | 'hedge_mode';
|
|
372
|
+
}): Promise<APIResponse<any>>;
|
|
223
373
|
getFuturesAccountBills(params: FuturesAccountBillRequestV2): Promise<APIResponse<any>>;
|
|
224
374
|
/**
|
|
225
375
|
*
|
|
226
376
|
* * Futures | Position
|
|
227
377
|
*
|
|
228
378
|
*/
|
|
229
|
-
getFuturesPositionTier(params:
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
379
|
+
getFuturesPositionTier(params: {
|
|
380
|
+
productType: FuturesProductTypeV2;
|
|
381
|
+
symbol: string;
|
|
382
|
+
}): Promise<APIResponse<any>>;
|
|
383
|
+
getFuturesPosition(params: {
|
|
384
|
+
productType: FuturesProductTypeV2;
|
|
385
|
+
symbol: string;
|
|
386
|
+
marginCoin: string;
|
|
387
|
+
}): Promise<APIResponse<any>>;
|
|
388
|
+
getFuturesPositions(params: {
|
|
389
|
+
productType: FuturesProductTypeV2;
|
|
390
|
+
marginCoin?: string;
|
|
391
|
+
}): Promise<APIResponse<any>>;
|
|
392
|
+
getFuturesHistoricPositions(params?: FuturesHistoricalPositionsRequestV2): Promise<APIResponse<any>>;
|
|
233
393
|
/**
|
|
234
394
|
*
|
|
235
395
|
* * Futures | Trade
|
|
236
396
|
*
|
|
237
397
|
*/
|
|
238
|
-
futuresSubmitOrder(params:
|
|
239
|
-
futuresCancelOrder(params:
|
|
240
|
-
futuresSubmitReversal(params:
|
|
241
|
-
futuresBatchSubmitOrders(params:
|
|
242
|
-
futuresModifyOrder(params:
|
|
243
|
-
futuresBatchCancelOrders(params:
|
|
244
|
-
futuresFlashClosePositions(params:
|
|
245
|
-
getFuturesOrder(params:
|
|
246
|
-
getFuturesFills(params:
|
|
247
|
-
getFuturesHistoricOrderFills(params:
|
|
248
|
-
getFuturesOpenOrders(params:
|
|
249
|
-
getFuturesHistoricOrders(params:
|
|
250
|
-
futuresCancelAllOrders(params:
|
|
398
|
+
futuresSubmitOrder(params: FuturesPlaceOrderRequestV2): Promise<APIResponse<any>>;
|
|
399
|
+
futuresCancelOrder(params: FuturesCancelOrderRequestV2): Promise<APIResponse<any>>;
|
|
400
|
+
futuresSubmitReversal(params: FuturesReversalOrderRequestV2): Promise<APIResponse<any>>;
|
|
401
|
+
futuresBatchSubmitOrders(params: FuturesBatchOrderRequestV2): Promise<APIResponse<any>>;
|
|
402
|
+
futuresModifyOrder(params: FuturesModifyOrderRequestV2): Promise<APIResponse<any>>;
|
|
403
|
+
futuresBatchCancelOrders(params: FuturesBatchCancelOrderRequestV2): Promise<APIResponse<any>>;
|
|
404
|
+
futuresFlashClosePositions(params: FuturesFlashClosePositionsRequestV2): Promise<APIResponse<any>>;
|
|
405
|
+
getFuturesOrder(params: FuturesGetOrderRequestV2): Promise<APIResponse<any>>;
|
|
406
|
+
getFuturesFills(params: FuturesGetOrderFillsRequestV2): Promise<APIResponse<any>>;
|
|
407
|
+
getFuturesHistoricOrderFills(params: FuturesGetHistoricalFillsRequestV2): Promise<APIResponse<any>>;
|
|
408
|
+
getFuturesOpenOrders(params: FuturesGetOpenOrdersRequestV2): Promise<APIResponse<any>>;
|
|
409
|
+
getFuturesHistoricOrders(params: FuturesGetHistoryOrdersRequestV2): Promise<APIResponse<any>>;
|
|
410
|
+
futuresCancelAllOrders(params: FuturesCancelAllOrdersRequestV2): Promise<APIResponse<any>>;
|
|
251
411
|
/**
|
|
252
412
|
*
|
|
253
413
|
* * Futures | Trigger Orders
|
|
254
414
|
*
|
|
255
415
|
*/
|
|
256
|
-
futuresSubmitPlanSubOrder(params:
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
416
|
+
futuresSubmitPlanSubOrder(params: {
|
|
417
|
+
planType: 'normal_plan' | 'track_plan';
|
|
418
|
+
planOrderId: string;
|
|
419
|
+
productType: FuturesProductTypeV2;
|
|
420
|
+
}): Promise<APIResponse<any>>;
|
|
421
|
+
futuresSubmitTPSLOrder(params: FuturesTPSLOrderRequestV2): Promise<APIResponse<any>>;
|
|
422
|
+
futuresSubmitPlanOrder(params: FuturesPlanOrderRequestV2): Promise<APIResponse<any>>;
|
|
423
|
+
futuresModifyTPSLPOrder(params: FuturesModifyTPSLOrderRequestV2): Promise<APIResponse<any>>;
|
|
424
|
+
futuresModifyPlanOrder(params: FuturesModifyPlanOrderRequestV2): Promise<APIResponse<any>>;
|
|
425
|
+
futuresCancelPlanOrder(params: FuturesCancelPlanOrderRequestV2): Promise<APIResponse<any>>;
|
|
426
|
+
getFuturesPlanOrders(params: FuturesGetPlanOrdersRequestV2): Promise<APIResponse<any>>;
|
|
427
|
+
getFuturesHistoricPlanOrders(params: FuturesGetHistoryPlanOrdersRequestV2): Promise<APIResponse<any>>;
|
|
264
428
|
/**
|
|
265
429
|
*
|
|
266
430
|
*
|
|
@@ -273,27 +437,52 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
273
437
|
* * Broker | Subaccount
|
|
274
438
|
*
|
|
275
439
|
*/
|
|
276
|
-
modifySubaccountEmail(params:
|
|
440
|
+
modifySubaccountEmail(params: {
|
|
441
|
+
subUid: string;
|
|
442
|
+
subaccountEmail: string;
|
|
443
|
+
}): Promise<APIResponse<any>>;
|
|
277
444
|
getBrokerInfo(): Promise<APIResponse<any>>;
|
|
278
|
-
createSubaccount(params:
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
445
|
+
createSubaccount(params: {
|
|
446
|
+
subaccountName: string;
|
|
447
|
+
label: string;
|
|
448
|
+
}): Promise<APIResponse<any>>;
|
|
449
|
+
getSubaccounts(params?: GetSubAccountsRequestV2): Promise<APIResponse<any>>;
|
|
450
|
+
modifySubaccount(params: ModifySubRequestV2): Promise<APIResponse<any>>;
|
|
451
|
+
getSubaccountEmail(params: {
|
|
452
|
+
subUid: string;
|
|
453
|
+
}): Promise<APIResponse<any>>;
|
|
454
|
+
getSubaccountSpotAssets(params: {
|
|
455
|
+
subUid: string;
|
|
456
|
+
coin?: string;
|
|
457
|
+
assetType?: 'hold_only' | 'all';
|
|
458
|
+
}): Promise<APIResponse<any>>;
|
|
459
|
+
getSubaccountFuturesAssets(params: {
|
|
460
|
+
subUid: string;
|
|
461
|
+
productType: FuturesProductTypeV2;
|
|
462
|
+
}): Promise<APIResponse<any>>;
|
|
463
|
+
createSubaccountDepositAddress(params: {
|
|
464
|
+
subUid: string;
|
|
465
|
+
coin: string;
|
|
466
|
+
chain?: string;
|
|
467
|
+
}): Promise<APIResponse<any>>;
|
|
468
|
+
subaccountWithdrawal(params: SubWithdrawalRequestV2): Promise<APIResponse<any>>;
|
|
469
|
+
subaccountSetAutoTransfer(params: {
|
|
470
|
+
subUid: string;
|
|
471
|
+
coin: string;
|
|
472
|
+
toAccountType: string;
|
|
473
|
+
}): Promise<APIResponse<any>>;
|
|
474
|
+
subaccountDepositRecords(params: SubDepositRecordsRequestV2): Promise<APIResponse<any>>;
|
|
475
|
+
subaccountWithdrawalRecords(params: SubWithdrawalRecordsRequestV2): Promise<APIResponse<any>>;
|
|
289
476
|
/**
|
|
290
477
|
*
|
|
291
478
|
* * Broker | Subaccount
|
|
292
479
|
*
|
|
293
480
|
*/
|
|
294
|
-
createSubaccountApiKey(params:
|
|
295
|
-
getSubaccountApiKey(params:
|
|
296
|
-
|
|
481
|
+
createSubaccountApiKey(params: CreateSubAccountApiKeyRequestV2): Promise<APIResponse<any>>;
|
|
482
|
+
getSubaccountApiKey(params: {
|
|
483
|
+
subUid: string;
|
|
484
|
+
}): Promise<APIResponse<any>>;
|
|
485
|
+
modifySubaccountApiKey(params: ModifySubAccountApiKeyRequestV2): Promise<APIResponse<any>>;
|
|
297
486
|
/**
|
|
298
487
|
*
|
|
299
488
|
*
|
|
@@ -312,39 +501,67 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
312
501
|
* * Margin | Cross/Isolated | Order Record
|
|
313
502
|
*
|
|
314
503
|
*/
|
|
315
|
-
getMarginBorrowHistory(marginType: MarginType, params:
|
|
316
|
-
getMarginRepayHistory(marginType: MarginType, params:
|
|
317
|
-
getMarginInterestHistory(marginType: MarginType, params:
|
|
318
|
-
getMarginLiquidationHistory(marginType: MarginType, params:
|
|
319
|
-
getMarginFinancialHistory(marginType: MarginType, params:
|
|
504
|
+
getMarginBorrowHistory(marginType: MarginType, params: GetBorrowHistoryRequestV2): Promise<APIResponse<any>>;
|
|
505
|
+
getMarginRepayHistory(marginType: MarginType, params: GetRepayHistoryRequestV2): Promise<APIResponse<any>>;
|
|
506
|
+
getMarginInterestHistory(marginType: MarginType, params: GetInterestHistoryRequestV2): Promise<APIResponse<any>>;
|
|
507
|
+
getMarginLiquidationHistory(marginType: MarginType, params: GetLiquidationHistoryRequestV2): Promise<APIResponse<any>>;
|
|
508
|
+
getMarginFinancialHistory(marginType: MarginType, params: GetFinancialHistoryRequestV2): Promise<APIResponse<any>>;
|
|
320
509
|
/**
|
|
321
510
|
*
|
|
322
511
|
* * Margin | Cross/Isolated | Account
|
|
323
512
|
*
|
|
324
513
|
*/
|
|
325
|
-
getMarginAccountAssets(marginType: MarginType, params?:
|
|
326
|
-
|
|
327
|
-
|
|
514
|
+
getMarginAccountAssets(marginType: MarginType, params?: {
|
|
515
|
+
coin?: string;
|
|
516
|
+
}): Promise<APIResponse<any>>;
|
|
517
|
+
marginBorrow(marginType: MarginType, params: {
|
|
518
|
+
coin: string;
|
|
519
|
+
borrowAmount: string;
|
|
520
|
+
clientOid?: string;
|
|
521
|
+
}): Promise<APIResponse<any>>;
|
|
522
|
+
marginRepay(marginType: MarginType, params: {
|
|
523
|
+
coin: string;
|
|
524
|
+
repayAmount: string;
|
|
525
|
+
}): Promise<APIResponse<any>>;
|
|
328
526
|
getMarginRiskRate(marginType: MarginType): Promise<APIResponse<any>>;
|
|
329
|
-
getMarginMaxBorrowable(marginType: MarginType, params:
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
527
|
+
getMarginMaxBorrowable(marginType: MarginType, params: {
|
|
528
|
+
coin: string;
|
|
529
|
+
}): Promise<APIResponse<any>>;
|
|
530
|
+
getMarginMaxTransferable(marginType: MarginType, params: {
|
|
531
|
+
coin: string;
|
|
532
|
+
}): Promise<APIResponse<any>>;
|
|
533
|
+
getMarginInterestRateAndMaxBorrowable(marginType: MarginType, params: {
|
|
534
|
+
coin: string;
|
|
535
|
+
}): Promise<APIResponse<any>>;
|
|
536
|
+
getMarginTierConfiguration(marginType: MarginType, params: {
|
|
537
|
+
coin: string;
|
|
538
|
+
}): Promise<APIResponse<any>>;
|
|
539
|
+
marginFlashRepay(marginType: MarginType, params: {
|
|
540
|
+
coin: string;
|
|
541
|
+
}): Promise<APIResponse<any>>;
|
|
542
|
+
getMarginFlashRepayResult(marginType: MarginType, params: {
|
|
543
|
+
idList: string;
|
|
544
|
+
}): Promise<APIResponse<any>>;
|
|
335
545
|
/**
|
|
336
546
|
*
|
|
337
547
|
* * Margin | Cross/Isolated | Trade
|
|
338
548
|
*
|
|
339
549
|
*/
|
|
340
|
-
marginSubmitOrder(marginType: MarginType, params:
|
|
341
|
-
marginBatchSubmitOrders(marginType: MarginType, params:
|
|
342
|
-
marginCancelOrder(marginType: MarginType, params:
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
550
|
+
marginSubmitOrder(marginType: MarginType, params: MarginPlaceOrderRequestV2): Promise<APIResponse<any>>;
|
|
551
|
+
marginBatchSubmitOrders(marginType: MarginType, params: MarginBatchOrdersRequestV2): Promise<APIResponse<any>>;
|
|
552
|
+
marginCancelOrder(marginType: MarginType, params: {
|
|
553
|
+
symbol: string;
|
|
554
|
+
orderId?: string;
|
|
555
|
+
clientOid?: string;
|
|
556
|
+
}): Promise<APIResponse<any>>;
|
|
557
|
+
marginBatchCancelOrders(marginType: MarginType, params: {
|
|
558
|
+
symbol: string;
|
|
559
|
+
orderIdList: string[];
|
|
560
|
+
}): Promise<APIResponse<any>>;
|
|
561
|
+
getMarginOpenOrders(marginType: MarginType, params: GetMarginCurrentOrdersRequestV2): Promise<APIResponse<any>>;
|
|
562
|
+
getMarginHistoricOrders(marginType: MarginType, params: GetHistoryOrdersRequestV2): Promise<APIResponse<any>>;
|
|
563
|
+
getMarginHistoricOrderFills(marginType: MarginType, params: GetMarginOrderFillsRequestV2): Promise<APIResponse<any>>;
|
|
564
|
+
getMarginLiquidationOrders(marginType: MarginType, params: GetMarginLiquidationOrdersRequestV2): Promise<APIResponse<any>>;
|
|
348
565
|
/**
|
|
349
566
|
*
|
|
350
567
|
*
|
|
@@ -359,20 +576,41 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
359
576
|
*
|
|
360
577
|
*
|
|
361
578
|
*/
|
|
362
|
-
getFuturesTraderCurrentOrder(params:
|
|
363
|
-
getFuturesTraderHistoryOrders(params:
|
|
364
|
-
modifyFuturesTraderOrderTPSL(params:
|
|
579
|
+
getFuturesTraderCurrentOrder(params: GetFuturesTraderCurrentOrdersRequestV2): Promise<APIResponse<any>>;
|
|
580
|
+
getFuturesTraderHistoryOrders(params: GetFuturesTraderHistoryOrdersRequestV2): Promise<APIResponse<any>>;
|
|
581
|
+
modifyFuturesTraderOrderTPSL(params: ModifyFuturesTraderOrderTPSLRequestV2): Promise<APIResponse<any>>;
|
|
365
582
|
getFuturesTraderOrder(): Promise<APIResponse<any>>;
|
|
366
583
|
getFuturesTraderProfitHistory(): Promise<APIResponse<any>>;
|
|
367
|
-
getFuturesTraderProfitShareHistory(params:
|
|
368
|
-
closeFuturesTraderOrder(params:
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
584
|
+
getFuturesTraderProfitShareHistory(params: GetFuturesTraderProfitShareDetailRequestV2): Promise<APIResponse<any>>;
|
|
585
|
+
closeFuturesTraderOrder(params: {
|
|
586
|
+
trackingNo: string;
|
|
587
|
+
symbol: string;
|
|
588
|
+
productType: CopyTradingProductTypeV2;
|
|
589
|
+
}): Promise<APIResponse<any>>;
|
|
590
|
+
getFuturesTraderProfitShare(params?: {
|
|
591
|
+
coin?: string;
|
|
592
|
+
pageSize?: string;
|
|
593
|
+
pageNo?: string;
|
|
594
|
+
}): Promise<APIResponse<any>>;
|
|
595
|
+
getFuturesTraderProfitShareGroup(params?: {
|
|
596
|
+
pageSize?: string;
|
|
597
|
+
pageNo?: string;
|
|
598
|
+
}): Promise<APIResponse<any>>;
|
|
599
|
+
getFuturesTraderSymbolSettings(params: {
|
|
600
|
+
productType: CopyTradingProductTypeV2;
|
|
601
|
+
}): Promise<APIResponse<any>>;
|
|
602
|
+
updateFuturesTraderSymbolSettings(params: {
|
|
603
|
+
settingList: FuturesTraderSymbolSettingRequestV2[];
|
|
604
|
+
}): Promise<APIResponse<any>>;
|
|
605
|
+
updateFuturesTraderGlobalSettings(params?: {
|
|
606
|
+
enable?: 'YES' | 'NO';
|
|
607
|
+
showTotalEquity?: 'YES' | 'NO';
|
|
608
|
+
showTpsl?: 'YES' | 'NO';
|
|
609
|
+
}): Promise<APIResponse<any>>;
|
|
610
|
+
getFuturesTraderFollowers(params?: GetFuturesTraderFollowersRequestV2): Promise<APIResponse<any>>;
|
|
611
|
+
removeFuturesTraderFollower(params: {
|
|
612
|
+
followerUid: string;
|
|
613
|
+
}): Promise<APIResponse<any>>;
|
|
376
614
|
/**
|
|
377
615
|
*
|
|
378
616
|
*
|
|
@@ -380,15 +618,22 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
380
618
|
*
|
|
381
619
|
*
|
|
382
620
|
*/
|
|
383
|
-
getFuturesFollowerCurrentOrders(params:
|
|
384
|
-
getFuturesFollowerHistoryOrders(params:
|
|
385
|
-
updateFuturesFollowerTPSL(params:
|
|
386
|
-
updateFuturesFollowerSettings(params:
|
|
387
|
-
getFuturesFollowerSettings(params:
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
621
|
+
getFuturesFollowerCurrentOrders(params: GetFollowerFuturesCurrentTrackingOrdersRequestV2): Promise<APIResponse<any>>;
|
|
622
|
+
getFuturesFollowerHistoryOrders(params: GetFollowerFuturesHistoryTrackingOrdersRequestV2): Promise<APIResponse<any>>;
|
|
623
|
+
updateFuturesFollowerTPSL(params: UpdateFuturesFollowerTPSLRequestV2): Promise<APIResponse<any>>;
|
|
624
|
+
updateFuturesFollowerSettings(params: UpdateFuturesFollowerSettingsRequestV2): Promise<APIResponse<any>>;
|
|
625
|
+
getFuturesFollowerSettings(params: {
|
|
626
|
+
traderId: string;
|
|
627
|
+
}): Promise<APIResponse<any>>;
|
|
628
|
+
closeFuturesFollowerPositions(params: CloseFuturesFollowerPositionsRequestV2): Promise<APIResponse<any>>;
|
|
629
|
+
getFuturesFollowerTraders(params: GetFuturesFollowerTradersRequestV2): Promise<APIResponse<any>>;
|
|
630
|
+
getFuturesFollowerFollowLimit(params: {
|
|
631
|
+
symbol: string;
|
|
632
|
+
productType: CopyTradingProductTypeV2;
|
|
633
|
+
}): Promise<APIResponse<any>>;
|
|
634
|
+
unfollowFuturesTrader(params: {
|
|
635
|
+
traderId: string;
|
|
636
|
+
}): Promise<APIResponse<any>>;
|
|
392
637
|
/**
|
|
393
638
|
*
|
|
394
639
|
*
|
|
@@ -407,34 +652,75 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
407
652
|
*
|
|
408
653
|
*/
|
|
409
654
|
getSpotTraderProfit(): Promise<APIResponse<any>>;
|
|
410
|
-
getSpotTraderHistoryProfit(params:
|
|
411
|
-
getSpotTraderUnrealizedProfit(params
|
|
655
|
+
getSpotTraderHistoryProfit(params: GetSpotTraderHistoryProfitRequestV2): Promise<APIResponse<any>>;
|
|
656
|
+
getSpotTraderUnrealizedProfit(params?: {
|
|
657
|
+
coin?: string;
|
|
658
|
+
pageNo?: string;
|
|
659
|
+
pageSize?: string;
|
|
660
|
+
}): Promise<APIResponse<any>>;
|
|
412
661
|
getSpotTraderOrder(): Promise<APIResponse<any>>;
|
|
413
|
-
modifySpotTraderOrderTPSL(params:
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
662
|
+
modifySpotTraderOrderTPSL(params: {
|
|
663
|
+
trackingNo: string;
|
|
664
|
+
stopSurplusPrice?: string;
|
|
665
|
+
stopLossPrice?: string;
|
|
666
|
+
}): Promise<APIResponse<any>>;
|
|
667
|
+
getSpotTraderHistoryOrders(params: GetSpotTraderHistoryOrdersRequestV2): Promise<APIResponse<any>>;
|
|
668
|
+
getSpotTraderCurrentOrders(params: GetSpotTraderCurrentOrdersRequestV2): Promise<APIResponse<any>>;
|
|
669
|
+
sellSpotTrader(params: {
|
|
670
|
+
trackingNoList: string[];
|
|
671
|
+
symbol: string;
|
|
672
|
+
}): Promise<APIResponse<any>>;
|
|
673
|
+
getSpotTraderSymbolSettings(params: {
|
|
674
|
+
symbolList: string[];
|
|
675
|
+
settingType: 'add' | 'delete';
|
|
676
|
+
}): Promise<APIResponse<any>>;
|
|
677
|
+
removeSpotTraderFollowers(params: {
|
|
678
|
+
followerUid: string;
|
|
679
|
+
}): Promise<APIResponse<any>>;
|
|
419
680
|
getSpotTraderConfiguration(): Promise<APIResponse<any>>;
|
|
420
|
-
getSpotTraderFollowers(params:
|
|
681
|
+
getSpotTraderFollowers(params: GetSpotTraderFollowersRequestV2): Promise<APIResponse<any>>;
|
|
421
682
|
/**
|
|
422
683
|
*
|
|
423
684
|
*
|
|
424
|
-
* Copy Trading | Spot copy trading |
|
|
685
|
+
* Copy Trading | Spot copy trading | Follower api
|
|
425
686
|
*
|
|
426
687
|
*
|
|
427
688
|
*/
|
|
428
|
-
cancelSpotFollowerOrder(params:
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
689
|
+
cancelSpotFollowerOrder(params: {
|
|
690
|
+
trackingNoList: string[];
|
|
691
|
+
}): Promise<APIResponse<any>>;
|
|
692
|
+
updateSpotFollowerSettings(params: {
|
|
693
|
+
traderId: string;
|
|
694
|
+
autoCopy?: 'on' | 'off';
|
|
695
|
+
mode?: 'basic' | 'advanced';
|
|
696
|
+
settings: SpotFollowerCopyTradeSettingV2[];
|
|
697
|
+
}): Promise<APIResponse<any>>;
|
|
698
|
+
updateSpotFollowerTPSL(params: {
|
|
699
|
+
trackingNo: string;
|
|
700
|
+
stopSurplusPrice?: string;
|
|
701
|
+
stopLossPrice?: string;
|
|
702
|
+
}): Promise<APIResponse<any>>;
|
|
703
|
+
getSpotFollowerTraders(params?: {
|
|
704
|
+
pageNo?: string;
|
|
705
|
+
pageSize?: string;
|
|
706
|
+
startTime?: string;
|
|
707
|
+
endTime?: string;
|
|
708
|
+
}): Promise<APIResponse<any>>;
|
|
709
|
+
getSpotFollowerCurrentTraderSymbols(params: {
|
|
710
|
+
traderId: string;
|
|
711
|
+
}): Promise<APIResponse<any>>;
|
|
712
|
+
getSpotFollowerSettings(params: {
|
|
713
|
+
traderId: string;
|
|
714
|
+
}): Promise<APIResponse<any>>;
|
|
715
|
+
getSpotFollowerHistoryOrders(params: GetSpotFollowerHistoryOrdersRequestV2): Promise<APIResponse<any>>;
|
|
716
|
+
getSpotFollowerOpenOrders(params: GetSpotFollowerOpenOrdersRequestV2): Promise<APIResponse<any>>;
|
|
717
|
+
sellSpotFollower(params: {
|
|
718
|
+
trackingNoList: string[];
|
|
719
|
+
symbol: string;
|
|
720
|
+
}): Promise<APIResponse<any>>;
|
|
721
|
+
unfollowSpotTrader(params: {
|
|
722
|
+
traderId: string;
|
|
723
|
+
}): Promise<APIResponse<any>>;
|
|
438
724
|
/**
|
|
439
725
|
*
|
|
440
726
|
*
|
|
@@ -442,14 +728,31 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
442
728
|
*
|
|
443
729
|
*
|
|
444
730
|
*/
|
|
445
|
-
getEarnSavingsProducts(params
|
|
731
|
+
getEarnSavingsProducts(params?: {
|
|
732
|
+
coin?: string;
|
|
733
|
+
filter?: string;
|
|
734
|
+
}): Promise<APIResponse<any>>;
|
|
446
735
|
getEarnSavingsAccount(): Promise<APIResponse<any>>;
|
|
447
|
-
getEarnSavingsAssets(params:
|
|
448
|
-
getEarnSavingsRecords(params:
|
|
449
|
-
getEarnSavingsSubscription(params:
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
736
|
+
getEarnSavingsAssets(params: GetEarnSavingsAssetsRequestV2): Promise<APIResponse<any>>;
|
|
737
|
+
getEarnSavingsRecords(params: GetEarnSavingsRecordsRequestV2): Promise<APIResponse<any>>;
|
|
738
|
+
getEarnSavingsSubscription(params: {
|
|
739
|
+
productId: string;
|
|
740
|
+
periodType: string;
|
|
741
|
+
}): Promise<APIResponse<any>>;
|
|
742
|
+
earnSubscribeSavings(params: {
|
|
743
|
+
productId: string;
|
|
744
|
+
periodType: string;
|
|
745
|
+
amount: string;
|
|
746
|
+
}): Promise<APIResponse<any>>;
|
|
747
|
+
getEarnSavingsSubscriptionResult(params: {
|
|
748
|
+
productId: string;
|
|
749
|
+
periodType: string;
|
|
750
|
+
}): Promise<APIResponse<any>>;
|
|
751
|
+
earnRedeemSavings(params: RedeemSavingsRequestV2): Promise<APIResponse<any>>;
|
|
752
|
+
getEarnSavingsRedemptionResult(params: {
|
|
753
|
+
orderId: string;
|
|
754
|
+
periodType: string;
|
|
755
|
+
}): Promise<APIResponse<any>>;
|
|
453
756
|
/**
|
|
454
757
|
*
|
|
455
758
|
*
|
|
@@ -457,7 +760,9 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
457
760
|
*
|
|
458
761
|
*
|
|
459
762
|
*/
|
|
460
|
-
getEarnAccount(params?:
|
|
763
|
+
getEarnAccount(params?: {
|
|
764
|
+
coin?: string;
|
|
765
|
+
}): Promise<APIResponse<any>>;
|
|
461
766
|
/**
|
|
462
767
|
*
|
|
463
768
|
*
|
|
@@ -465,13 +770,24 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
465
770
|
*
|
|
466
771
|
*
|
|
467
772
|
*/
|
|
468
|
-
getSharkfinProducts(params:
|
|
773
|
+
getSharkfinProducts(params: {
|
|
774
|
+
coin: string;
|
|
775
|
+
limit?: string;
|
|
776
|
+
idLessThan?: string;
|
|
777
|
+
}): Promise<APIResponse<any>>;
|
|
469
778
|
getSharkfinAccount(): Promise<APIResponse<any>>;
|
|
470
|
-
getSharkfinAssets(params:
|
|
471
|
-
getSharkfinRecords(params:
|
|
472
|
-
getSharkfinSubscription(params:
|
|
473
|
-
|
|
474
|
-
|
|
779
|
+
getSharkfinAssets(params: GetSharkfinAssetsRequestV2): Promise<APIResponse<any>>;
|
|
780
|
+
getSharkfinRecords(params: GetSharkfinRecordsRequestV2): Promise<APIResponse<any>>;
|
|
781
|
+
getSharkfinSubscription(params: {
|
|
782
|
+
productId: string;
|
|
783
|
+
}): Promise<APIResponse<any>>;
|
|
784
|
+
subscribeSharkfin(params: {
|
|
785
|
+
productId: string;
|
|
786
|
+
amount: string;
|
|
787
|
+
}): Promise<APIResponse<any>>;
|
|
788
|
+
getSharkfinSubscriptionResult(params: {
|
|
789
|
+
orderId: string;
|
|
790
|
+
}): Promise<APIResponse<any>>;
|
|
475
791
|
/**
|
|
476
792
|
*
|
|
477
793
|
*
|
|
@@ -479,15 +795,21 @@ export declare class RestClientV2 extends BaseRestClient {
|
|
|
479
795
|
*
|
|
480
796
|
*
|
|
481
797
|
*/
|
|
482
|
-
getLoanCurrencies(params?:
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
798
|
+
getLoanCurrencies(params?: {
|
|
799
|
+
coin?: string;
|
|
800
|
+
}): Promise<APIResponse<any>>;
|
|
801
|
+
getLoanEstInterestAndBorrowable(params: GetLoanEstInterestAndBorrowableRequestV2): Promise<APIResponse<any>>;
|
|
802
|
+
borrowLoan(params: BorrowLoanRequestV2): Promise<APIResponse<any>>;
|
|
803
|
+
getOngoingLoanOrders(params?: {
|
|
804
|
+
orderId?: string;
|
|
805
|
+
loanCoin?: string;
|
|
806
|
+
pledgeCoin?: string;
|
|
807
|
+
}): Promise<APIResponse<any>>;
|
|
808
|
+
repayLoan(params: RepayLoanRequestV2): Promise<APIResponse<any>>;
|
|
809
|
+
getRepayHistory(params: GetLoanRepayHistoryRequestV2): Promise<APIResponse<any>>;
|
|
810
|
+
updateLoanPledgeRate(params: ModifyLoanPledgeRateRequestV2): Promise<APIResponse<any>>;
|
|
811
|
+
getLoanPledgeRateHistory(params: GetLoanPledgeRateHistoryRequestV2): Promise<APIResponse<any>>;
|
|
812
|
+
getLoanHistory(params: GetLoanHistoryRequestV2): Promise<APIResponse<any>>;
|
|
813
|
+
getLoanDebts(): Promise<APIResponse<any>>;
|
|
814
|
+
getLoanLiquidationRecords(params: GetLiquidationRecordsRequestV2): Promise<APIResponse<any>>;
|
|
493
815
|
}
|