kucoin-api 1.0.23 → 2.0.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/README.md +3 -3
- package/dist/cjs/FuturesClient.d.ts +300 -111
- package/dist/cjs/FuturesClient.js +286 -110
- package/dist/cjs/FuturesClient.js.map +1 -1
- package/dist/cjs/SpotClient.d.ts +879 -306
- package/dist/cjs/SpotClient.js +900 -338
- package/dist/cjs/SpotClient.js.map +1 -1
- package/dist/mjs/FuturesClient.d.ts +300 -111
- package/dist/mjs/FuturesClient.js +286 -110
- package/dist/mjs/FuturesClient.js.map +1 -1
- package/dist/mjs/SpotClient.d.ts +879 -306
- package/dist/mjs/SpotClient.js +900 -338
- package/dist/mjs/SpotClient.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/SpotClient.d.ts
CHANGED
|
@@ -43,55 +43,124 @@ export declare class SpotClient extends BaseRestClient {
|
|
|
43
43
|
generateNewOrderID(): string;
|
|
44
44
|
getServerTime(): Promise<APISuccessResponse<number>>;
|
|
45
45
|
getServiceStatus(): Promise<APISuccessResponse<ServiceStatus>>;
|
|
46
|
-
getAnnouncements(params?: GetAnnouncementsRequest): Promise<APISuccessResponse<Announcements>>;
|
|
47
46
|
/**
|
|
48
47
|
*
|
|
49
|
-
* REST -
|
|
48
|
+
* REST - Account Info - Account & Funding
|
|
49
|
+
*
|
|
50
|
+
*/
|
|
51
|
+
/**
|
|
52
|
+
* Get Account Summary Info
|
|
50
53
|
*
|
|
54
|
+
* This endpoint can be used to obtain account summary information.
|
|
51
55
|
*/
|
|
52
56
|
getAccountSummary(): Promise<APISuccessResponse<SpotAccountSummary>>;
|
|
57
|
+
/**
|
|
58
|
+
* Get API Key Information
|
|
59
|
+
*
|
|
60
|
+
* Get information about the API key being used. Works for both master and sub user API keys.
|
|
61
|
+
*/
|
|
62
|
+
getApikeyInfo(): Promise<APISuccessResponse<{
|
|
63
|
+
remark: string;
|
|
64
|
+
apiKey: string;
|
|
65
|
+
apiVersion: number;
|
|
66
|
+
permission: string;
|
|
67
|
+
ipWhitelist: string;
|
|
68
|
+
createdAt: number;
|
|
69
|
+
uid: number;
|
|
70
|
+
isMaster: boolean;
|
|
71
|
+
}>>;
|
|
72
|
+
/**
|
|
73
|
+
* Get Account Type - Spot
|
|
74
|
+
*
|
|
75
|
+
* This interface determines whether the current user is a spot high-frequency user or a spot low-frequency user.
|
|
76
|
+
*/
|
|
77
|
+
getUserType(): Promise<APISuccessResponse<boolean>>;
|
|
53
78
|
/**
|
|
54
79
|
* Get a list of acounts and their balance states (spot/margin/trade_hf)
|
|
55
80
|
*
|
|
56
|
-
* Get Account List - Spot
|
|
81
|
+
* Get Account List - Spot
|
|
82
|
+
*/
|
|
83
|
+
getBalances(params?: GetBalancesRequest): Promise<APISuccessResponse<Balances[]>>;
|
|
84
|
+
/**
|
|
85
|
+
* Get Account Detail - Spot
|
|
86
|
+
*
|
|
87
|
+
* Get Information for a single spot account. Use this endpoint when you know the accountId.
|
|
57
88
|
*/
|
|
58
|
-
getBalances(params?: GetBalancesRequest): Promise<Promise<APISuccessResponse<Balances[]>>>;
|
|
59
89
|
getAccountDetail(params: {
|
|
60
90
|
accountId: any;
|
|
61
91
|
}): Promise<APISuccessResponse<Account>>;
|
|
92
|
+
/**
|
|
93
|
+
* Get Account - Cross Margin
|
|
94
|
+
*
|
|
95
|
+
* Request via this endpoint to get the info of the cross margin account.
|
|
96
|
+
*/
|
|
97
|
+
getMarginBalance(params?: GetMarginBalanceRequest): Promise<APISuccessResponse<MarginBalance>>;
|
|
98
|
+
/**
|
|
99
|
+
* Get Account - Isolated Margin
|
|
100
|
+
*
|
|
101
|
+
* Request via this endpoint to get the info of the isolated margin account.
|
|
102
|
+
*/
|
|
103
|
+
getIsolatedMarginBalance(params?: GetIsolatedMarginBalanceRequest): Promise<APISuccessResponse<IsolatedMarginBalance[]>>;
|
|
62
104
|
/**
|
|
63
105
|
* Get Account Ledgers - Spot/Margin
|
|
106
|
+
*
|
|
107
|
+
* This interface is for transaction records from all types of your accounts, supporting inquiry of various currencies.
|
|
108
|
+
* Items are paginated and sorted to show the latest first.
|
|
109
|
+
* See the Pagination section for retrieving additional entries after the first page.
|
|
64
110
|
*/
|
|
65
111
|
getTransactions(params?: GetSpotTransactionsRequest): Promise<APISuccessResponse<SpotAccountTransactions>>;
|
|
66
112
|
/**
|
|
67
113
|
* Get Account Ledgers - trade_hf
|
|
114
|
+
*
|
|
115
|
+
* This API endpoint returns all transfer (in and out) records in high-frequency trading account and supports multi-coin queries.
|
|
116
|
+
* The query results are sorted in descending order by createdAt and id.
|
|
68
117
|
*/
|
|
69
118
|
getHFTransactions(params: AccountHFTransactionsRequest): Promise<APISuccessResponse<SpotAccountTransaction[]>>;
|
|
70
119
|
/**
|
|
71
120
|
* Get Account Ledgers - margin_hf
|
|
121
|
+
*
|
|
122
|
+
* This API endpoint returns all transfer (in and out) records in high-frequency margin trading account and supports multi-coin queries.
|
|
123
|
+
* The query results are sorted in descending order by createdAt and id.
|
|
72
124
|
*/
|
|
73
125
|
getHFMarginTransactions(params: AccountHFMarginTransactionsRequest): Promise<APISuccessResponse<AccountHFMarginTransactions[]>>;
|
|
74
126
|
/**
|
|
75
127
|
*
|
|
76
|
-
* REST -
|
|
128
|
+
* REST - Account Info - Sub Account
|
|
77
129
|
*
|
|
78
130
|
*/
|
|
79
131
|
/**
|
|
80
|
-
*
|
|
81
|
-
*
|
|
132
|
+
* Add SubAccount
|
|
133
|
+
*
|
|
134
|
+
* This endpoint is used to create a sub-account.
|
|
82
135
|
*/
|
|
83
|
-
getSubAccountsV1(): Promise<APISuccessResponse<SubAccountInfo[]>>;
|
|
84
|
-
getSubAccountsV2(params?: {
|
|
85
|
-
currentPage?: number;
|
|
86
|
-
pageSize?: number;
|
|
87
|
-
}): Promise<APISuccessResponse<SubAccountsV2>>;
|
|
88
136
|
createSubAccount(params: CreateSubAccountRequest): Promise<APISuccessResponse<CreateSubAccount>>;
|
|
137
|
+
/**
|
|
138
|
+
* Add SubAccount Margin Permission
|
|
139
|
+
*
|
|
140
|
+
* This endpoint can be used to add sub-accounts Margin permission.
|
|
141
|
+
* Before using this endpoints, you need to ensure that the master account apikey has Margin permissions and the Margin function has been activated.
|
|
142
|
+
*/
|
|
89
143
|
enableSubAccountMargin(params: {
|
|
90
144
|
uid: string;
|
|
91
145
|
}): Promise<void>;
|
|
146
|
+
/**
|
|
147
|
+
* Add SubAccount Futures Permission
|
|
148
|
+
*
|
|
149
|
+
* This endpoint can be used to add sub-accounts Futures permission.
|
|
150
|
+
* Before using this endpoints, you need to ensure that the master account apikey has Futures permissions and the Futures function has been activated.
|
|
151
|
+
*/
|
|
92
152
|
enableSubAccountFutures(params: {
|
|
93
153
|
uid: string;
|
|
94
154
|
}): Promise<void>;
|
|
155
|
+
/**
|
|
156
|
+
* Get SubAccount List - Summary Info
|
|
157
|
+
*
|
|
158
|
+
* This endpoint can be used to get a paginated list of sub-accounts. Pagination is required.
|
|
159
|
+
*/
|
|
160
|
+
getSubAccountsV2(params?: {
|
|
161
|
+
currentPage?: number;
|
|
162
|
+
pageSize?: number;
|
|
163
|
+
}): Promise<APISuccessResponse<SubAccountsV2>>;
|
|
95
164
|
/**
|
|
96
165
|
* @deprecated This method is deprecated.
|
|
97
166
|
* It is recommended to use the GET /api/v2/sub/accounts/balance endpoint instead of this endpoint
|
|
@@ -100,139 +169,159 @@ export declare class SpotClient extends BaseRestClient {
|
|
|
100
169
|
subUserId: string;
|
|
101
170
|
includeBaseAmount: boolean;
|
|
102
171
|
}): Promise<APISuccessResponse<SubAccountBalance>>;
|
|
103
|
-
|
|
172
|
+
/**
|
|
173
|
+
* Get SubAccount List - Spot Balance(V2)
|
|
174
|
+
*
|
|
175
|
+
* This endpoint can be used to get paginated Spot sub-account information.
|
|
176
|
+
* Pagination is required.
|
|
177
|
+
*/
|
|
104
178
|
getSubAccountBalancesV2(params?: {
|
|
105
179
|
currentPage?: number;
|
|
106
180
|
pageSize?: number;
|
|
107
181
|
}): Promise<APISuccessResponse<SubAccountBalancesV2>>;
|
|
108
182
|
/**
|
|
109
183
|
*
|
|
110
|
-
* REST -
|
|
184
|
+
* REST - Account Info - Sub Account API
|
|
111
185
|
*
|
|
186
|
+
*/
|
|
187
|
+
/**
|
|
188
|
+
* Add SubAccount API
|
|
112
189
|
*
|
|
190
|
+
* This endpoint can be used to create APIs for sub-accounts.
|
|
113
191
|
*/
|
|
114
|
-
getSubAPIs(params: {
|
|
115
|
-
apiKey?: string;
|
|
116
|
-
subName: string;
|
|
117
|
-
}): Promise<APISuccessResponse<SubAccountAPIInfo[]>>;
|
|
118
192
|
createSubAPI(params: CreateSubAccountAPIRequest): Promise<APISuccessResponse<CreateSubAPI>>;
|
|
119
|
-
updateSubAPI(params: UpdateSubAccountAPIRequest): Promise<APISuccessResponse<UpdateSubAPI>>;
|
|
120
|
-
deleteSubAPI(params: DeleteSubAccountAPIRequest): Promise<APISuccessResponse<DeleteSubAccountAPI>>;
|
|
121
193
|
/**
|
|
194
|
+
* Modify SubAccount API
|
|
122
195
|
*
|
|
123
|
-
*
|
|
196
|
+
* This endpoint can be used to update APIs for sub-accounts.
|
|
197
|
+
*/
|
|
198
|
+
updateSubAPI(params: UpdateSubAccountAPIRequest): Promise<APISuccessResponse<UpdateSubAPI>>;
|
|
199
|
+
/**
|
|
200
|
+
* Get SubAccount API List
|
|
124
201
|
*
|
|
202
|
+
* This endpoint can be used to obtain a list of APIs pertaining to a sub-account.
|
|
203
|
+
* (Not contain ND Broker Sub Account)
|
|
125
204
|
*/
|
|
205
|
+
getSubAPIs(params: {
|
|
206
|
+
apiKey?: string;
|
|
207
|
+
subName: string;
|
|
208
|
+
}): Promise<APISuccessResponse<SubAccountAPIInfo[]>>;
|
|
126
209
|
/**
|
|
127
|
-
*
|
|
128
|
-
*
|
|
210
|
+
* Delete SubAccount API
|
|
211
|
+
*
|
|
212
|
+
* This endpoint can be used to delete an API for a sub-account.
|
|
129
213
|
*/
|
|
130
|
-
|
|
131
|
-
debtRatio: string;
|
|
132
|
-
accounts: MarginAccountBalance[];
|
|
133
|
-
}>>;
|
|
134
|
-
getMarginBalance(params?: GetMarginBalanceRequest): Promise<APISuccessResponse<MarginBalance>>;
|
|
135
|
-
getIsolatedMarginBalance(params?: GetIsolatedMarginBalanceRequest): Promise<APISuccessResponse<IsolatedMarginBalance[]>>;
|
|
214
|
+
deleteSubAPI(params: DeleteSubAccountAPIRequest): Promise<APISuccessResponse<DeleteSubAccountAPI>>;
|
|
136
215
|
/**
|
|
137
216
|
*
|
|
138
|
-
* REST -
|
|
217
|
+
* REST - Account Info - Deposit
|
|
139
218
|
*
|
|
140
219
|
*/
|
|
141
220
|
/**
|
|
142
|
-
*
|
|
221
|
+
* Add Deposit Address(V3)
|
|
222
|
+
*
|
|
223
|
+
* Request via this endpoint to create a deposit address for a currency you intend to deposit.
|
|
143
224
|
*/
|
|
144
|
-
createDepositAddress(params: {
|
|
145
|
-
currency: string;
|
|
146
|
-
chain?: string;
|
|
147
|
-
}): Promise<APISuccessResponse<DepositAddress>>;
|
|
148
225
|
createDepositAddressV3(params: CreateDepositAddressV3Request): Promise<APISuccessResponse<CreateDepositAddressV3Response>>;
|
|
149
226
|
/**
|
|
150
|
-
*
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
}): Promise<APISuccessResponse<DepositAddressV2[]>>;
|
|
155
|
-
/**
|
|
156
|
-
* @deprecated This method is deprecated. Please use getDepositAddressesV3 instead.
|
|
227
|
+
* Get Deposit Address(V3)
|
|
228
|
+
*
|
|
229
|
+
* Get all deposit addresses for the currency you intend to deposit.
|
|
230
|
+
* If the returned data is empty, you may need to Add Deposit Address first.
|
|
157
231
|
*/
|
|
158
|
-
getDepositAddressV1(params: {
|
|
159
|
-
currency: string;
|
|
160
|
-
chain?: string;
|
|
161
|
-
}): Promise<APISuccessResponse<DepositAddress>>;
|
|
162
232
|
getDepositAddressesV3(params: {
|
|
163
233
|
currency: string;
|
|
164
234
|
amount?: string;
|
|
165
235
|
chain?: string;
|
|
166
236
|
}): Promise<APISuccessResponse<DepositAddress[]>>;
|
|
167
|
-
getDeposits(params?: GetDepositsRequest): Promise<APISuccessResponse<Deposits>>;
|
|
168
237
|
/**
|
|
169
|
-
*
|
|
170
|
-
*
|
|
238
|
+
* Get Deposit History
|
|
239
|
+
*
|
|
240
|
+
* Request via this endpoint to get deposit list Items are paginated and sorted to show the latest first.
|
|
241
|
+
* See the Pagination section for retrieving additional entries after the first page.
|
|
171
242
|
*/
|
|
172
|
-
|
|
243
|
+
getDeposits(params?: GetDepositsRequest): Promise<APISuccessResponse<Deposits>>;
|
|
173
244
|
/**
|
|
174
245
|
*
|
|
175
|
-
* REST -
|
|
246
|
+
* REST - Account Info - Withdrawals
|
|
176
247
|
*
|
|
177
248
|
*/
|
|
178
|
-
getWithdrawals(params?: GetWithdrawalsRequest): Promise<APISuccessResponse<Withdrawals>>;
|
|
179
249
|
/**
|
|
180
|
-
*
|
|
181
|
-
*
|
|
250
|
+
* Get Withdrawal Quotas
|
|
251
|
+
*
|
|
252
|
+
* This interface can obtain the withdrawal quotas information of this currency.
|
|
182
253
|
*/
|
|
183
|
-
getHistoricalWithdrawalsV1(params?: GetWithdrawalsRequest): Promise<APISuccessResponse<HistoricalWithdrawalsV1>>;
|
|
184
254
|
getWithdrawalQuotas(params: {
|
|
185
255
|
currency: string;
|
|
186
256
|
chain?: string;
|
|
187
257
|
}): Promise<APISuccessResponse<WithdrawalQuotas>>;
|
|
188
258
|
/**
|
|
189
|
-
*
|
|
259
|
+
* Withdraw(V3)
|
|
260
|
+
*
|
|
261
|
+
* Use this interface to withdraw the specified currency
|
|
190
262
|
*/
|
|
191
|
-
submitWithdraw(params: ApplyWithdrawRequest): Promise<APISuccessResponse<{
|
|
192
|
-
withdrawalId: string;
|
|
193
|
-
}>>;
|
|
194
263
|
submitWithdrawV3(params: SubmitWithdrawV3Request): Promise<APISuccessResponse<{
|
|
195
264
|
withdrawalId: string;
|
|
196
265
|
}>>;
|
|
266
|
+
/**
|
|
267
|
+
* Cancel Withdrawal
|
|
268
|
+
*
|
|
269
|
+
* This interface can cancel the withdrawal, Only withdrawals requests of PROCESSING status could be canceled.
|
|
270
|
+
*/
|
|
197
271
|
cancelWithdrawal(params: {
|
|
198
272
|
withdrawalId: string;
|
|
199
273
|
}): Promise<APISuccessResponse<{
|
|
200
274
|
withdrawalId: string;
|
|
201
275
|
}>>;
|
|
202
276
|
/**
|
|
277
|
+
* Get Withdrawal History
|
|
203
278
|
*
|
|
204
|
-
*
|
|
279
|
+
* Request via this endpoint to get withdrawal list Items are paginated and sorted to show the latest first.
|
|
280
|
+
* See the Pagination section for retrieving additional entries after the first page.
|
|
281
|
+
*/
|
|
282
|
+
getWithdrawals(params?: GetWithdrawalsRequest): Promise<APISuccessResponse<Withdrawals>>;
|
|
283
|
+
/**
|
|
284
|
+
*
|
|
285
|
+
* REST - Account Info - Transfer
|
|
205
286
|
*
|
|
206
287
|
*/
|
|
207
|
-
getTransferable(params: GetTransferableRequest): Promise<APISuccessResponse<TransferableFunds>>;
|
|
208
|
-
submitFlexTransfer(params: FlexTransferRequest): Promise<APISuccessResponse<{
|
|
209
|
-
orderId: string;
|
|
210
|
-
}>>;
|
|
211
288
|
/**
|
|
212
|
-
*
|
|
213
|
-
*
|
|
289
|
+
* Get Transfer Quotas
|
|
290
|
+
*
|
|
291
|
+
* This endpoint returns the transferable balance of a specified account.
|
|
214
292
|
*/
|
|
215
|
-
|
|
216
|
-
orderId: string;
|
|
217
|
-
}>>;
|
|
293
|
+
getTransferable(params: GetTransferableRequest): Promise<APISuccessResponse<TransferableFunds>>;
|
|
218
294
|
/**
|
|
219
|
-
*
|
|
220
|
-
*
|
|
295
|
+
* Flex Transfer
|
|
296
|
+
*
|
|
297
|
+
* This interface can be used for transfers between master and sub accounts and inner transfers
|
|
221
298
|
*/
|
|
222
|
-
|
|
299
|
+
submitFlexTransfer(params: FlexTransferRequest): Promise<APISuccessResponse<{
|
|
223
300
|
orderId: string;
|
|
224
301
|
}>>;
|
|
225
302
|
/**
|
|
226
303
|
*
|
|
227
|
-
* REST -
|
|
304
|
+
* REST - Account Info - Trade Fee
|
|
228
305
|
*
|
|
229
306
|
*/
|
|
307
|
+
/**
|
|
308
|
+
* Get Basic Fee - Spot/Margin
|
|
309
|
+
*
|
|
310
|
+
* This interface is for the spot/margin basic fee rate of users
|
|
311
|
+
*/
|
|
230
312
|
getBasicUserFee(params: {
|
|
231
313
|
currencyType: string;
|
|
232
314
|
}): Promise<APISuccessResponse<{
|
|
233
315
|
takerFeeRate: string;
|
|
234
316
|
makerFeeRate: string;
|
|
235
317
|
}>>;
|
|
318
|
+
/**
|
|
319
|
+
* Get Actual Fee - Spot/Margin
|
|
320
|
+
*
|
|
321
|
+
* This interface is for the actual fee rate of the trading pair.
|
|
322
|
+
* You can inquire about fee rates of 10 trading pairs each time at most.
|
|
323
|
+
* The fee rate of your sub-account is the same as that of the master account.
|
|
324
|
+
*/
|
|
236
325
|
getTradingPairFee(params: {
|
|
237
326
|
symbol: string;
|
|
238
327
|
}): Promise<APISuccessResponse<{
|
|
@@ -242,241 +331,341 @@ export declare class SpotClient extends BaseRestClient {
|
|
|
242
331
|
}[]>>;
|
|
243
332
|
/**
|
|
244
333
|
*
|
|
245
|
-
* REST - SPOT TRADING -Market
|
|
334
|
+
* REST - SPOT TRADING - Market Data
|
|
246
335
|
*
|
|
247
336
|
*/
|
|
248
|
-
|
|
337
|
+
/**
|
|
338
|
+
* Get Announcements
|
|
339
|
+
*
|
|
340
|
+
* This interface can obtain the latest news announcements, and the default page search is for announcements within a month.
|
|
341
|
+
*/
|
|
342
|
+
getAnnouncements(params?: GetAnnouncementsRequest): Promise<APISuccessResponse<Announcements>>;
|
|
343
|
+
/**
|
|
344
|
+
* Get Currency
|
|
345
|
+
*
|
|
346
|
+
* Request via this endpoint to get the currency details of a specified currency.
|
|
347
|
+
*/
|
|
249
348
|
getCurrency(params: {
|
|
250
349
|
currency: string;
|
|
251
350
|
chain?: string;
|
|
252
351
|
}): Promise<APISuccessResponse<CurrencyInfo>>;
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
352
|
+
/**
|
|
353
|
+
* Get All Currencies
|
|
354
|
+
*
|
|
355
|
+
* Request via this endpoint to get the currency list. Not all currencies currently can be used for trading.
|
|
356
|
+
*/
|
|
357
|
+
getCurrencies(): Promise<APISuccessResponse<CurrencyInfo[]>>;
|
|
358
|
+
/**
|
|
359
|
+
* Get Symbol
|
|
360
|
+
*
|
|
361
|
+
* Request via this endpoint to get detail currency pairs for trading.
|
|
362
|
+
* If you want to get the market information of the trading symbol, please use Get All Tickers.
|
|
363
|
+
*/
|
|
256
364
|
getSymbol(params: {
|
|
257
365
|
symbol: string;
|
|
258
366
|
}): Promise<APISuccessResponse<SymbolInfo>>;
|
|
367
|
+
/**
|
|
368
|
+
* Get All Symbols
|
|
369
|
+
*
|
|
370
|
+
* Request via this endpoint to get detail currency pairs for trading.
|
|
371
|
+
* If you want to get the market information of the trading symbol, please use Get All Tickers.
|
|
372
|
+
*/
|
|
373
|
+
getSymbols(params?: {
|
|
374
|
+
market?: string;
|
|
375
|
+
}): Promise<APISuccessResponse<SymbolInfo[]>>;
|
|
376
|
+
/**
|
|
377
|
+
* Get Ticker
|
|
378
|
+
*
|
|
379
|
+
* Request via this endpoint to get Level 1 Market Data.
|
|
380
|
+
* The returned value includes the best bid price and size,
|
|
381
|
+
* the best ask price and size as well as the last traded price and the last traded size.
|
|
382
|
+
*/
|
|
259
383
|
getTicker(params: {
|
|
260
384
|
symbol: string;
|
|
261
385
|
}): Promise<APISuccessResponse<Ticker>>;
|
|
386
|
+
/**
|
|
387
|
+
* Get All Tickers
|
|
388
|
+
*
|
|
389
|
+
* Request market tickers for all the trading pairs in the market (including 24h volume), takes a snapshot every 2 seconds.
|
|
390
|
+
*/
|
|
262
391
|
getTickers(): Promise<APISuccessResponse<{
|
|
263
392
|
time: number;
|
|
264
393
|
ticker: Ticker[];
|
|
265
394
|
}>>;
|
|
266
|
-
|
|
395
|
+
/**
|
|
396
|
+
* Get Trade History
|
|
397
|
+
*
|
|
398
|
+
* Request via this endpoint to get the trade history of the specified symbol,
|
|
399
|
+
* the returned quantity is the last 100 transaction records.
|
|
400
|
+
*/
|
|
401
|
+
getTradeHistories(params: {
|
|
267
402
|
symbol: string;
|
|
268
|
-
}): Promise<APISuccessResponse<
|
|
269
|
-
|
|
403
|
+
}): Promise<APISuccessResponse<TradeHistory[]>>;
|
|
404
|
+
/**
|
|
405
|
+
* Get Klines
|
|
406
|
+
*
|
|
407
|
+
* Get the Kline of the symbol.
|
|
408
|
+
* Data are returned in grouped buckets based on requested type.
|
|
409
|
+
*/
|
|
410
|
+
getKlines(params: GetSpotKlinesRequest): Promise<APISuccessResponse<Kline[]>>;
|
|
411
|
+
/**
|
|
412
|
+
* Get Part OrderBook
|
|
413
|
+
*
|
|
414
|
+
* Query for part orderbook depth data. Level 20(aggregated by price)
|
|
415
|
+
*/
|
|
270
416
|
getOrderBookLevel20(params: {
|
|
271
417
|
symbol: string;
|
|
272
418
|
}): Promise<APISuccessResponse<OrderBookLevel>>;
|
|
419
|
+
/**
|
|
420
|
+
* Get Part OrderBook
|
|
421
|
+
*
|
|
422
|
+
* Query for part orderbook depth data. Level 100(aggregated by price)
|
|
423
|
+
*/
|
|
273
424
|
getOrderBookLevel100(params: {
|
|
274
425
|
symbol: string;
|
|
275
426
|
}): Promise<APISuccessResponse<OrderBookLevel>>;
|
|
427
|
+
/**
|
|
428
|
+
* Get Full OrderBook
|
|
429
|
+
*
|
|
430
|
+
* Query for full orderbook depth data. (aggregated by price)
|
|
431
|
+
*/
|
|
276
432
|
getFullOrderBook(params: {
|
|
277
433
|
symbol: string;
|
|
278
434
|
}): Promise<APISuccessResponse<OrderBookLevel>>;
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
435
|
+
/**
|
|
436
|
+
* Get Fiat Price
|
|
437
|
+
*
|
|
438
|
+
* Request via this endpoint to get the fiat price of the currencies for the available trading pairs.
|
|
439
|
+
*/
|
|
283
440
|
getFiatPrice(params?: {
|
|
284
441
|
base?: string;
|
|
285
442
|
currencies?: string;
|
|
286
443
|
}): Promise<any>;
|
|
287
444
|
/**
|
|
445
|
+
* Get 24hr Stats
|
|
288
446
|
*
|
|
289
|
-
*
|
|
447
|
+
* Request via this endpoint to get the statistics of the specified ticker in the last 24 hours.
|
|
448
|
+
*/
|
|
449
|
+
get24hrStats(params: {
|
|
450
|
+
symbol: string;
|
|
451
|
+
}): Promise<APISuccessResponse<Symbol24hrStats>>;
|
|
452
|
+
/**
|
|
453
|
+
* Get Market List
|
|
290
454
|
*
|
|
455
|
+
* Request via this endpoint to get the transaction currency for the entire trading market.
|
|
456
|
+
*/
|
|
457
|
+
getMarkets(): Promise<APISuccessResponse<string[]>>;
|
|
458
|
+
/**
|
|
459
|
+
*
|
|
460
|
+
* REST - SPOT TRADING - Orders
|
|
461
|
+
*
|
|
462
|
+
*/
|
|
463
|
+
/**
|
|
464
|
+
* Add Order
|
|
465
|
+
*
|
|
466
|
+
* Place order to the Spot trading system, you can place two major types of orders: limit and market.
|
|
467
|
+
* Orders can only be placed if your account has sufficient funds. Once an order is placed, your funds will be put on hold for the duration of the order.
|
|
468
|
+
* The amount of funds on hold depends on the order type and parameters specified.
|
|
291
469
|
*/
|
|
292
|
-
getUserType(): Promise<APISuccessResponse<boolean>>;
|
|
293
470
|
submitHFOrder(params: SubmitHFOrderRequest): Promise<APISuccessResponse<{
|
|
294
471
|
orderId: string;
|
|
295
472
|
clientOid: string;
|
|
296
473
|
}>>;
|
|
297
|
-
|
|
474
|
+
/**
|
|
475
|
+
* Add Order Sync
|
|
476
|
+
*
|
|
477
|
+
* Place order to the spot trading system
|
|
478
|
+
*
|
|
479
|
+
* The difference between this interface and "Add order" is that this interface will synchronously return the order information after the order matching is completed.
|
|
480
|
+
*/
|
|
298
481
|
submitHFOrderSync(params: SubmitHFOrderRequest): Promise<APISuccessResponse<SubmitHFOrderSyncResponse>>;
|
|
482
|
+
/**
|
|
483
|
+
* Add Order Test
|
|
484
|
+
*
|
|
485
|
+
* Order test endpoint, the request parameters and return parameters of this endpoint are exactly the same as the order endpoint,
|
|
486
|
+
* and can be used to verify whether the signature is correct and other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried.
|
|
487
|
+
*/
|
|
488
|
+
submitHFOrderTest(): Promise<any>;
|
|
489
|
+
/**
|
|
490
|
+
* Batch Add Orders
|
|
491
|
+
*
|
|
492
|
+
* This endpoint supports sequential batch order placement from a single endpoint. A maximum of 20 orders can be placed simultaneously.
|
|
493
|
+
*/
|
|
299
494
|
submitHFMultipleOrders(params: {
|
|
300
495
|
orderList: SubmitMultipleHFOrdersRequest[];
|
|
301
496
|
}): Promise<APISuccessResponse<SubmitMultipleHFOrdersResponse[]>>;
|
|
497
|
+
/**
|
|
498
|
+
* Batch Add Orders Sync
|
|
499
|
+
*
|
|
500
|
+
* This endpoint supports sequential batch order placement from a single endpoint. A maximum of 20 orders can be placed simultaneously.
|
|
501
|
+
* The difference between this interface and "Batch Add Orders" is that this interface will synchronously return the order information after the order matching is completed.
|
|
502
|
+
*/
|
|
302
503
|
submitHFMultipleOrdersSync(params: {
|
|
303
504
|
orderList: SubmitMultipleHFOrdersRequest[];
|
|
304
505
|
}): Promise<APISuccessResponse<SubmitMultipleHFOrdersSyncResponse[]>>;
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
506
|
+
/**
|
|
507
|
+
* Cancel Order By OrderId
|
|
508
|
+
*
|
|
509
|
+
* This endpoint can be used to cancel a spot order by orderId.
|
|
510
|
+
* This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket.
|
|
511
|
+
*/
|
|
309
512
|
cancelHFOrder(params: {
|
|
310
513
|
orderId: string;
|
|
311
514
|
symbol: string;
|
|
312
515
|
}): Promise<APISuccessResponse<{
|
|
313
516
|
orderId: string;
|
|
314
517
|
}>>;
|
|
518
|
+
/**
|
|
519
|
+
* Cancel Order By OrderId Sync
|
|
520
|
+
*
|
|
521
|
+
* This endpoint can be used to cancel a spot order by orderId.
|
|
522
|
+
* The difference between this interface and "Cancel Order By OrderId" is that this interface will synchronously return the order information after the order canceling is completed.
|
|
523
|
+
*/
|
|
315
524
|
cancelHFOrderSync(params: {
|
|
316
525
|
orderId: string;
|
|
317
526
|
symbol: string;
|
|
318
527
|
}): Promise<APISuccessResponse<SyncCancelHFOrderResponse>>;
|
|
528
|
+
/**
|
|
529
|
+
* Cancel Order By ClientOid
|
|
530
|
+
*
|
|
531
|
+
* This endpoint can be used to cancel a spot order by clientOid.
|
|
532
|
+
* This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket.
|
|
533
|
+
*/
|
|
319
534
|
cancelHFOrderByClientOId(params: {
|
|
320
535
|
clientOid: string;
|
|
321
536
|
symbol: string;
|
|
322
537
|
}): Promise<APISuccessResponse<{
|
|
323
538
|
clientOid: string;
|
|
324
539
|
}>>;
|
|
540
|
+
/**
|
|
541
|
+
* Cancel Order By ClientOid Sync
|
|
542
|
+
*
|
|
543
|
+
* This endpoint can be used to cancel a spot order by clientOid.
|
|
544
|
+
* The difference between this interface and "Cancel Order By ClientOid" is that this interface will synchronously return the order information after the order canceling is completed.
|
|
545
|
+
*/
|
|
325
546
|
cancelHFOrderSyncByClientOId(params: {
|
|
326
547
|
clientOid: string;
|
|
327
548
|
symbol: string;
|
|
328
549
|
}): Promise<APISuccessResponse<SyncCancelHFOrderResponse>>;
|
|
550
|
+
/**
|
|
551
|
+
* Cancel Partial Order
|
|
552
|
+
*
|
|
553
|
+
* This interface can cancel the specified quantity of the order according to the orderId.
|
|
554
|
+
*/
|
|
329
555
|
cancelHFOrdersNumber(params: CancelSpecifiedNumberHFOrdersRequest): Promise<any>;
|
|
556
|
+
/**
|
|
557
|
+
* Cancel All Orders By Symbol
|
|
558
|
+
*
|
|
559
|
+
* This endpoint can cancel all spot orders for specific symbol.
|
|
560
|
+
*/
|
|
330
561
|
cancelHFAllOrdersBySymbol(params: {
|
|
331
562
|
symbol: string;
|
|
332
563
|
}): Promise<APISuccessResponse<{
|
|
333
564
|
orderId: string;
|
|
334
565
|
cancelSize: string;
|
|
335
566
|
}>>;
|
|
567
|
+
/**
|
|
568
|
+
* Cancel All Orders
|
|
569
|
+
*
|
|
570
|
+
* This endpoint can cancel all spot orders for all symbol.
|
|
571
|
+
*/
|
|
336
572
|
cancelHFAllOrders(): Promise<APISuccessResponse<CancelAllHFOrdersResponse>>;
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
items: HFOrder[];
|
|
573
|
+
/**
|
|
574
|
+
* Modify Order
|
|
575
|
+
*
|
|
576
|
+
* This interface can modify the price and quantity of the order according to orderId or clientOid.
|
|
577
|
+
*/
|
|
578
|
+
updateHFOrder(params: ModifyHFOrderRequest): Promise<APISuccessResponse<{
|
|
579
|
+
newOrderId: string;
|
|
580
|
+
clientOid: string;
|
|
346
581
|
}>>;
|
|
582
|
+
/**
|
|
583
|
+
* Get Order By OrderId
|
|
584
|
+
*
|
|
585
|
+
* This endpoint can be used to obtain information for a single Spot order using the order id.
|
|
586
|
+
*/
|
|
347
587
|
getHFOrderDetailsByOrderId(params: {
|
|
348
588
|
orderId: string;
|
|
349
589
|
symbol: string;
|
|
350
590
|
}): Promise<APISuccessResponse<HFOrder>>;
|
|
591
|
+
/**
|
|
592
|
+
* Get Order By ClientOid
|
|
593
|
+
*
|
|
594
|
+
* This endpoint can be used to obtain information for a single Spot order using the clientOid.
|
|
595
|
+
*/
|
|
351
596
|
getHFOrderDetailsByClientOid(params: {
|
|
352
597
|
clientOid: string;
|
|
353
598
|
symbol: string;
|
|
354
599
|
}): Promise<APISuccessResponse<HFOrder>>;
|
|
355
|
-
cancelHFOrderAutoSetting(params: {
|
|
356
|
-
timeout: number;
|
|
357
|
-
symbols?: string;
|
|
358
|
-
}): Promise<APISuccessResponse<{
|
|
359
|
-
currentTime: number;
|
|
360
|
-
triggerTime: number;
|
|
361
|
-
}>>;
|
|
362
|
-
cancelHFOrderAutoSettingQuery(): Promise<APISuccessResponse<AutoCancelHFOrderSettingQueryResponse>>;
|
|
363
|
-
getHFFilledOrders(params: GetHFFilledListRequest): Promise<APISuccessResponse<{
|
|
364
|
-
items: HFFilledOrder[];
|
|
365
|
-
lastId: number;
|
|
366
|
-
}>>;
|
|
367
600
|
/**
|
|
601
|
+
* Get Symbols With Open Order
|
|
368
602
|
*
|
|
369
|
-
*
|
|
370
|
-
*
|
|
371
|
-
*/
|
|
372
|
-
/**
|
|
373
|
-
* @deprecated This method is deprecated.
|
|
374
|
-
* It is recommended to use the POST /api/v1/hf/orders endpoint instead of this endpoint
|
|
603
|
+
* This interface can query all spot symbol that has active orders
|
|
375
604
|
*/
|
|
376
|
-
|
|
377
|
-
|
|
605
|
+
getHFActiveSymbols(): Promise<APISuccessResponse<{
|
|
606
|
+
symbols: string[];
|
|
378
607
|
}>>;
|
|
379
608
|
/**
|
|
380
|
-
*
|
|
381
|
-
*
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
/**
|
|
385
|
-
* @deprecated This method is deprecated.
|
|
386
|
-
* It is recommended to use the POST /api/v1/hf/orders/multi endpoint instead of this endpoint
|
|
609
|
+
* Get Open Orders
|
|
610
|
+
*
|
|
611
|
+
* This interface is to obtain all Spot active order lists, and the return value of the active order interface is the paged data of all uncompleted order lists.
|
|
612
|
+
* The returned data is sorted in descending order according to the latest update time of the order.
|
|
387
613
|
*/
|
|
388
|
-
|
|
614
|
+
getHFActiveOrders(params: {
|
|
389
615
|
symbol: string;
|
|
390
|
-
|
|
391
|
-
}): Promise<APISuccessResponse<MultipleOrdersResponse[]>>;
|
|
392
|
-
/**
|
|
393
|
-
* @deprecated This method is deprecated.
|
|
394
|
-
* It is recommended to use the DELETE /api/v1/hf/orders/{orderId} endpoint instead of this endpoint
|
|
395
|
-
*/
|
|
396
|
-
cancelOrderById(params: {
|
|
397
|
-
orderId: string;
|
|
398
|
-
}): Promise<APISuccessResponse<{
|
|
399
|
-
cancelledOrderIds: string[];
|
|
400
|
-
}>>;
|
|
616
|
+
}): Promise<APISuccessResponse<HFOrder[]>>;
|
|
401
617
|
/**
|
|
402
|
-
*
|
|
403
|
-
*
|
|
618
|
+
* Get Closed Orders
|
|
619
|
+
*
|
|
620
|
+
* This interface is to obtain all Spot completed order lists, and the return value of the completed order interface is the paged data of all completed order lists.
|
|
621
|
+
* The returned data is sorted in descending order according to the latest update time of the order.
|
|
404
622
|
*/
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
cancelledOrderId: string;
|
|
409
|
-
clientOid: string;
|
|
623
|
+
getHFCompletedOrders(params: GetHFCompletedOrdersRequest): Promise<APISuccessResponse<{
|
|
624
|
+
lastId: number;
|
|
625
|
+
items: HFOrder[];
|
|
410
626
|
}>>;
|
|
411
627
|
/**
|
|
412
|
-
*
|
|
413
|
-
*
|
|
628
|
+
* Get Trade History
|
|
629
|
+
*
|
|
630
|
+
* This endpoint can be used to obtain a list of the latest Spot transaction details.
|
|
414
631
|
*/
|
|
415
|
-
|
|
416
|
-
|
|
632
|
+
getHFFilledOrders(params: GetHFFilledListRequest): Promise<APISuccessResponse<{
|
|
633
|
+
items: HFFilledOrder[];
|
|
634
|
+
lastId: number;
|
|
417
635
|
}>>;
|
|
418
636
|
/**
|
|
419
|
-
*
|
|
420
|
-
* It is recommended to use the GET /api/v1/hf/orders/active endpoint instead of this endpoint
|
|
421
|
-
*/
|
|
422
|
-
getOrders(params?: GetOrderListRequest): Promise<APISuccessResponse<SpotOrderList>>;
|
|
423
|
-
/**
|
|
424
|
-
* @deprecated This method is deprecated.
|
|
425
|
-
* It is recommended to use the GET /api/v1/hf/orders/active endpoint instead of this endpoint
|
|
426
|
-
*/
|
|
427
|
-
getRecentOrders(params?: {
|
|
428
|
-
currentPage?: number;
|
|
429
|
-
pageSize?: number;
|
|
430
|
-
}): Promise<APISuccessResponse<SpotOrder[]>>;
|
|
431
|
-
/**
|
|
432
|
-
* @deprecated This method is deprecated.
|
|
433
|
-
* It is recommended to use the GET /api/v1/hf/orders/{params.orderId} endpoint instead of this endpoint
|
|
434
|
-
*/
|
|
435
|
-
getOrderByOrderId(params: {
|
|
436
|
-
orderId: string;
|
|
437
|
-
}): Promise<APISuccessResponse<SpotOrder>>;
|
|
438
|
-
/**
|
|
439
|
-
* @deprecated This method is deprecated.
|
|
440
|
-
* It is recommended to use the GET /api/v1/hf/orders/client-order/{params.clientOid} endpoint instead of this endpoint
|
|
441
|
-
*/
|
|
442
|
-
getOrderByClientOid(params: {
|
|
443
|
-
clientOid: string;
|
|
444
|
-
}): Promise<APISuccessResponse<SpotOrder>>;
|
|
445
|
-
/**
|
|
637
|
+
* Get DCP
|
|
446
638
|
*
|
|
447
|
-
*
|
|
448
|
-
*
|
|
449
|
-
*/
|
|
450
|
-
/**
|
|
451
|
-
* @deprecated This method is deprecated.
|
|
452
|
-
* It is recommended to use the GET /api/v1/hf/fills endpoint instead of this endpoint
|
|
453
|
-
*/
|
|
454
|
-
getFills(params?: GetFillsRequest): Promise<APISuccessResponse<SpotOrderFills>>;
|
|
455
|
-
/**
|
|
456
|
-
* @deprecated This method is deprecated.
|
|
457
|
-
* It is recommended to use the GET /api/v1/hf/fills endpoint instead of this endpoint
|
|
639
|
+
* Get Disconnection Protect(Deadman Swich)
|
|
640
|
+
* Through this interface, you can query the settings of automatic order cancellation
|
|
458
641
|
*/
|
|
459
|
-
|
|
642
|
+
cancelHFOrderAutoSettingQuery(): Promise<APISuccessResponse<AutoCancelHFOrderSettingQueryResponse>>;
|
|
460
643
|
/**
|
|
644
|
+
* Set DCP
|
|
461
645
|
*
|
|
462
|
-
*
|
|
463
|
-
*
|
|
646
|
+
* Set Disconnection Protect(Deadman Swich)
|
|
647
|
+
* Through this interface, Call this interface to automatically cancel all orders of the set trading pair after the specified time.
|
|
648
|
+
* If this interface is not called again for renewal or cancellation before the set time, the system will help the user to cancel the order of the corresponding trading pair. Otherwise it will not.
|
|
464
649
|
*/
|
|
465
|
-
|
|
466
|
-
|
|
650
|
+
cancelHFOrderAutoSetting(params: {
|
|
651
|
+
timeout: number;
|
|
652
|
+
symbols?: string;
|
|
653
|
+
}): Promise<APISuccessResponse<{
|
|
654
|
+
currentTime: number;
|
|
655
|
+
triggerTime: number;
|
|
467
656
|
}>>;
|
|
468
657
|
/**
|
|
469
|
-
*
|
|
658
|
+
* Add Stop Order
|
|
470
659
|
*
|
|
471
|
-
*
|
|
660
|
+
* Place stop order to the Spot trading system.
|
|
472
661
|
*/
|
|
473
|
-
|
|
662
|
+
submitStopOrder(params: SubmitStopOrderRequest): Promise<APISuccessResponse<{
|
|
474
663
|
orderId: string;
|
|
475
|
-
}): Promise<APISuccessResponse<{
|
|
476
|
-
cancelledOrderIds: string[];
|
|
477
664
|
}>>;
|
|
478
665
|
/**
|
|
479
|
-
*
|
|
666
|
+
* Cancel Stop Order By ClientOid
|
|
667
|
+
*
|
|
668
|
+
* This endpoint can be used to cancel a spot stop order by clientOid.
|
|
480
669
|
*/
|
|
481
670
|
cancelStopOrderByClientOid(params: {
|
|
482
671
|
clientOid: string;
|
|
@@ -486,38 +675,60 @@ export declare class SpotClient extends BaseRestClient {
|
|
|
486
675
|
clientOid: string;
|
|
487
676
|
}>>;
|
|
488
677
|
/**
|
|
489
|
-
*
|
|
678
|
+
* Cancel Stop Order By OrderId
|
|
679
|
+
*
|
|
680
|
+
* Request via this endpoint to cancel a single stop order previously placed.
|
|
681
|
+
*/
|
|
682
|
+
cancelStopOrderById(params: {
|
|
683
|
+
orderId: string;
|
|
684
|
+
}): Promise<APISuccessResponse<{
|
|
685
|
+
cancelledOrderIds: string[];
|
|
686
|
+
}>>;
|
|
687
|
+
/**
|
|
688
|
+
* Batch Cancel Stop Orders
|
|
689
|
+
*
|
|
690
|
+
* Request via this interface to cancel a batch of stop orders.
|
|
490
691
|
*/
|
|
491
692
|
cancelStopOrders(params?: CancelStopOrdersRequest): Promise<APISuccessResponse<{
|
|
492
693
|
cancelledOrderIds: string[];
|
|
493
694
|
}>>;
|
|
494
695
|
/**
|
|
495
|
-
*
|
|
696
|
+
* Get Stop Orders List
|
|
697
|
+
*
|
|
698
|
+
* Request via this endpoint to get your current untriggered stop order list.
|
|
496
699
|
*/
|
|
497
700
|
getStopOrders(params?: GetStopOrdersListRequest): Promise<APISuccessResponse<StopOrders>>;
|
|
498
701
|
/**
|
|
499
|
-
*
|
|
702
|
+
* Get Stop Order By OrderId
|
|
703
|
+
*
|
|
704
|
+
* Request via this interface to get a stop order information via the order ID.
|
|
705
|
+
|
|
706
|
+
|
|
500
707
|
*/
|
|
501
708
|
getStopOrderByOrderId(params: {
|
|
502
709
|
orderId: string;
|
|
503
710
|
}): Promise<APISuccessResponse<StopOrderItem>>;
|
|
504
711
|
/**
|
|
505
|
-
*
|
|
712
|
+
* Get Stop Order By ClientOid
|
|
713
|
+
*
|
|
714
|
+
*
|
|
506
715
|
*/
|
|
507
716
|
getStopOrderByClientOid(params: {
|
|
508
717
|
clientOid: string;
|
|
509
718
|
symbol?: string;
|
|
510
719
|
}): Promise<APISuccessResponse<StopOrderItem[]>>;
|
|
511
720
|
/**
|
|
721
|
+
* Add OCO Order
|
|
512
722
|
*
|
|
513
|
-
*
|
|
514
|
-
*
|
|
723
|
+
* Place OCO order to the Spot trading system
|
|
515
724
|
*/
|
|
516
725
|
submitOCOOrder(params: SubmitOCOOrderRequest): Promise<APISuccessResponse<{
|
|
517
726
|
orderId: string;
|
|
518
727
|
}>>;
|
|
519
728
|
/**
|
|
520
|
-
*
|
|
729
|
+
* Cancel OCO Order By OrderId
|
|
730
|
+
*
|
|
731
|
+
* Request via this endpoint to cancel a single oco order previously placed.
|
|
521
732
|
*/
|
|
522
733
|
cancelOCOOrderById(params: {
|
|
523
734
|
orderId: string;
|
|
@@ -525,7 +736,9 @@ export declare class SpotClient extends BaseRestClient {
|
|
|
525
736
|
cancelledOrderIds: string[];
|
|
526
737
|
}>>;
|
|
527
738
|
/**
|
|
528
|
-
*
|
|
739
|
+
* Cancel OCO Order By ClientOid
|
|
740
|
+
*
|
|
741
|
+
* Request via this endpoint to cancel a single oco order previously placed.
|
|
529
742
|
*/
|
|
530
743
|
cancelOCOOrderByClientOid(params: {
|
|
531
744
|
clientOid: string;
|
|
@@ -533,7 +746,9 @@ export declare class SpotClient extends BaseRestClient {
|
|
|
533
746
|
cancelledOrderIds: string[];
|
|
534
747
|
}>>;
|
|
535
748
|
/**
|
|
536
|
-
* Batch
|
|
749
|
+
* Batch Cancel OCO Order
|
|
750
|
+
*
|
|
751
|
+
* This interface can batch cancel OCO orders through orderIds.
|
|
537
752
|
*/
|
|
538
753
|
cancelMultipleOCOOrders(params?: {
|
|
539
754
|
orderIds?: string;
|
|
@@ -542,137 +757,225 @@ export declare class SpotClient extends BaseRestClient {
|
|
|
542
757
|
cancelledOrderIds: string[];
|
|
543
758
|
}>>;
|
|
544
759
|
/**
|
|
545
|
-
*
|
|
760
|
+
* Get OCO Order By OrderId
|
|
761
|
+
*
|
|
762
|
+
* Request via this interface to get a oco order information via the order ID.
|
|
546
763
|
*/
|
|
547
764
|
getOCOOrderByOrderId(params: {
|
|
548
765
|
orderId: string;
|
|
549
766
|
}): Promise<APISuccessResponse<OCOOrderListItem>>;
|
|
550
767
|
/**
|
|
551
|
-
*
|
|
768
|
+
* Get OCO Order By ClientOid
|
|
769
|
+
*
|
|
770
|
+
* Request via this interface to get a oco order information via the clientOid.
|
|
552
771
|
*/
|
|
553
772
|
getOCOOrderByClientOid(params: {
|
|
554
773
|
clientOid: string;
|
|
555
774
|
}): Promise<APISuccessResponse<OCOOrderListItem>>;
|
|
556
775
|
/**
|
|
557
|
-
*
|
|
776
|
+
* Get OCO Order Details
|
|
777
|
+
*
|
|
778
|
+
* Request via this interface to get a oco order information via the order ID.
|
|
558
779
|
*/
|
|
559
780
|
getOCOOrderDetails(params: {
|
|
560
781
|
orderId: string;
|
|
561
782
|
}): Promise<APISuccessResponse<OCOOrderDetails>>;
|
|
562
783
|
/**
|
|
563
|
-
*
|
|
784
|
+
* Get OCO Order List
|
|
785
|
+
*
|
|
786
|
+
* Request via this endpoint to get your current OCO order list.
|
|
564
787
|
*/
|
|
565
788
|
getOCOOrders(params: GetOCOOrdersRequest): Promise<APISuccessResponse<OCOOrders>>;
|
|
566
789
|
/**
|
|
567
790
|
*
|
|
568
|
-
* REST - MARGIN TRADING -
|
|
791
|
+
* REST - MARGIN TRADING - Market Data
|
|
792
|
+
*
|
|
793
|
+
*/
|
|
794
|
+
/**
|
|
795
|
+
* Get Symbols - Cross Margin
|
|
796
|
+
*
|
|
797
|
+
* This endpoint allows querying the configuration of cross margin symbol.
|
|
798
|
+
*/
|
|
799
|
+
getMarginActivePairsV3(params?: {
|
|
800
|
+
symbol?: string;
|
|
801
|
+
}): Promise<APISuccessResponse<{
|
|
802
|
+
timestamp: number;
|
|
803
|
+
items: any[];
|
|
804
|
+
}>>;
|
|
805
|
+
/**
|
|
806
|
+
* Get Margin Config
|
|
807
|
+
*
|
|
808
|
+
* Request via this endpoint to get the configure info of the cross margin.
|
|
809
|
+
*/
|
|
810
|
+
getMarginConfigInfo(): Promise<APISuccessResponse<MarginConfigInfo>>;
|
|
811
|
+
/**
|
|
812
|
+
* Get ETF Info
|
|
813
|
+
*
|
|
814
|
+
* This interface returns leveraged token information
|
|
815
|
+
*/
|
|
816
|
+
getMarginLeveragedToken(params?: {
|
|
817
|
+
currency?: string;
|
|
818
|
+
}): Promise<APISuccessResponse<MarginLevTokenInfo[]>>;
|
|
819
|
+
/**
|
|
820
|
+
* Get Mark Price List
|
|
821
|
+
*
|
|
822
|
+
* This endpoint returns the current Mark price for all margin trading pairs.
|
|
823
|
+
*/
|
|
824
|
+
getMarginMarkPrices(): Promise<APISuccessResponse<MarginMarkPrice[]>>;
|
|
825
|
+
/**
|
|
826
|
+
* Get Mark Price Detail
|
|
827
|
+
*
|
|
828
|
+
* This endpoint returns the current Mark price for specified margin trading pairs.
|
|
829
|
+
*/
|
|
830
|
+
getMarginMarkPrice(params: {
|
|
831
|
+
symbol: string;
|
|
832
|
+
}): Promise<APISuccessResponse<MarginMarkPrice>>;
|
|
833
|
+
/**
|
|
834
|
+
* Get Symbols - Isolated Margin
|
|
835
|
+
*
|
|
836
|
+
* This endpoint allows querying the configuration of isolated margin symbol.
|
|
837
|
+
*/
|
|
838
|
+
getIsolatedMarginSymbolsConfig(): Promise<APISuccessResponse<IsolatedMarginSymbolsConfig[]>>;
|
|
839
|
+
/**
|
|
840
|
+
*
|
|
841
|
+
* REST - MARGIN TRADING - Orders
|
|
842
|
+
*
|
|
843
|
+
*/
|
|
844
|
+
/**
|
|
845
|
+
* Add Order
|
|
569
846
|
*
|
|
847
|
+
* Place order to the Cross-margin or Isolated-margin trading system
|
|
570
848
|
*/
|
|
571
849
|
submitHFMarginOrder(params: SubmitHFMarginOrderRequest): Promise<APISuccessResponse<{
|
|
572
850
|
orderNo: string;
|
|
573
851
|
}>>;
|
|
852
|
+
/**
|
|
853
|
+
* Add Order Test
|
|
854
|
+
*
|
|
855
|
+
* This interface is used to test the order submission.
|
|
856
|
+
*/
|
|
574
857
|
submitHFMarginOrderTest(): Promise<any>;
|
|
858
|
+
/**
|
|
859
|
+
* Cancel Order By OrderId
|
|
860
|
+
*
|
|
861
|
+
* This endpoint can be used to cancel a margin order by orderId.
|
|
862
|
+
*/
|
|
575
863
|
cancelHFMarginOrder(params: {
|
|
576
864
|
orderId: string;
|
|
577
865
|
symbol: string;
|
|
578
866
|
}): Promise<APISuccessResponse<{
|
|
579
867
|
orderId: string;
|
|
580
868
|
}>>;
|
|
869
|
+
/**
|
|
870
|
+
* Cancel Order By ClientOid
|
|
871
|
+
*
|
|
872
|
+
* This endpoint can be used to cancel a margin order by clientOid.
|
|
873
|
+
*/
|
|
581
874
|
cancelHFMarginOrderByClientOid(params: {
|
|
582
875
|
clientOid: string;
|
|
583
876
|
symbol: string;
|
|
584
877
|
}): Promise<APISuccessResponse<{
|
|
585
878
|
clientOid: string;
|
|
586
879
|
}>>;
|
|
880
|
+
/**
|
|
881
|
+
* Cancel All Orders By Symbol
|
|
882
|
+
*
|
|
883
|
+
* This interface can cancel all open Margin orders by symbol
|
|
884
|
+
*/
|
|
587
885
|
cancelHFAllMarginOrders(params: HFMarginOrder): Promise<any>;
|
|
886
|
+
/**
|
|
887
|
+
* Get Symbols With Open Order
|
|
888
|
+
*
|
|
889
|
+
* This interface can query all Margin symbol that has active orders
|
|
890
|
+
*/
|
|
891
|
+
getHFMarginOpenSymbols(params: {
|
|
892
|
+
tradeType: string;
|
|
893
|
+
}): Promise<APISuccessResponse<{
|
|
894
|
+
symbolSize: number;
|
|
895
|
+
symbols: string[];
|
|
896
|
+
}>>;
|
|
897
|
+
/**
|
|
898
|
+
* Get Open Orders
|
|
899
|
+
*
|
|
900
|
+
* This interface is to obtain all Margin active order lists, and the return value of the active order interface is the paged data of all uncompleted order lists.
|
|
901
|
+
*/
|
|
588
902
|
getHFActiveMarginOrders(params: HFMarginRequestOrder): Promise<APISuccessResponse<HFMarginOrder[]>>;
|
|
903
|
+
/**
|
|
904
|
+
* Get Closed Orders
|
|
905
|
+
*
|
|
906
|
+
* This interface is to obtain all Margin Closed order lists
|
|
907
|
+
*/
|
|
589
908
|
getHFMarginFilledOrders(params: GetHFMarginFilledRequest): Promise<APISuccessResponse<{
|
|
590
909
|
lastId: number;
|
|
591
910
|
items: HFMarginFilledOrder[];
|
|
592
911
|
}>>;
|
|
912
|
+
/**
|
|
913
|
+
* Get Trade History
|
|
914
|
+
*
|
|
915
|
+
* This endpoint can be used to obtain a list of the latest Margin transaction details.
|
|
916
|
+
*/
|
|
917
|
+
getHFMarginFills(params: getHFMarginFillsRequest): Promise<APISuccessResponse<{
|
|
918
|
+
lastId: number;
|
|
919
|
+
items: HFMarginTransactionRecord[];
|
|
920
|
+
}>>;
|
|
921
|
+
/**
|
|
922
|
+
* Get Order By OrderId
|
|
923
|
+
*
|
|
924
|
+
* This endpoint can be used to obtain a Margin order by orderId.
|
|
925
|
+
*/
|
|
593
926
|
getHFMarginOrderByOrderId(params: {
|
|
594
927
|
orderId: string;
|
|
595
928
|
symbol: string;
|
|
596
929
|
}): Promise<APISuccessResponse<HFMarginOrder>>;
|
|
930
|
+
/**
|
|
931
|
+
* Get Order By ClientOid
|
|
932
|
+
*
|
|
933
|
+
* This endpoint can be used to obtain a Margin order by clientOid.
|
|
934
|
+
*/
|
|
597
935
|
getHFMarginOrderByClientOid(params: {
|
|
598
936
|
clientOid: string;
|
|
599
937
|
symbol: string;
|
|
600
938
|
}): Promise<APISuccessResponse<HFMarginOrder>>;
|
|
601
|
-
getHFMarginFills(params: getHFMarginFillsRequest): Promise<APISuccessResponse<{
|
|
602
|
-
lastId: number;
|
|
603
|
-
items: HFMarginTransactionRecord[];
|
|
604
|
-
}>>;
|
|
605
|
-
getHFMarginOpenSymbols(params: {
|
|
606
|
-
tradeType: string;
|
|
607
|
-
}): Promise<APISuccessResponse<{
|
|
608
|
-
symbolSize: number;
|
|
609
|
-
symbols: string[];
|
|
610
|
-
}>>;
|
|
611
939
|
/**
|
|
612
940
|
*
|
|
613
|
-
* REST - MARGIN TRADING -
|
|
941
|
+
* REST - MARGIN TRADING - Debit
|
|
614
942
|
*
|
|
615
943
|
*/
|
|
616
944
|
/**
|
|
617
|
-
*
|
|
618
|
-
*
|
|
945
|
+
* Borrow
|
|
946
|
+
*
|
|
947
|
+
* This API endpoint is used to initiate an application for cross or isolated margin borrowing.
|
|
619
948
|
*/
|
|
620
|
-
|
|
949
|
+
marginBorrowV3(params: MarginBorrowV3Request): Promise<APISuccessResponse<MarginOrderV3>>;
|
|
621
950
|
/**
|
|
622
|
-
*
|
|
623
|
-
*
|
|
951
|
+
* Get Borrow History
|
|
952
|
+
*
|
|
953
|
+
* This API endpoint is used to get the borrowing orders for cross and isolated margin accounts
|
|
624
954
|
*/
|
|
625
|
-
|
|
955
|
+
getMarginBorrowHistoryV3(params: MarginHistoryV3Request): Promise<APISuccessResponse<MarginHistoryRecord[]>>;
|
|
626
956
|
/**
|
|
957
|
+
* Repay
|
|
627
958
|
*
|
|
628
|
-
*
|
|
629
|
-
*
|
|
959
|
+
* This API endpoint is used to initiate an application for cross or isolated margin repayment.
|
|
630
960
|
*/
|
|
631
|
-
|
|
632
|
-
currency?: string;
|
|
633
|
-
}): Promise<APISuccessResponse<MarginLevTokenInfo[]>>;
|
|
634
|
-
getMarginMarkPrices(): Promise<APISuccessResponse<MarginMarkPrice[]>>;
|
|
635
|
-
getMarginMarkPrice(params: {
|
|
636
|
-
symbol: string;
|
|
637
|
-
}): Promise<APISuccessResponse<MarginMarkPrice>>;
|
|
638
|
-
getMarginConfigInfo(): Promise<APISuccessResponse<MarginConfigInfo>>;
|
|
639
|
-
getMarginRiskLimitConfig(params: MarginRiskLimitRequest): Promise<APISuccessResponse<MarginRiskLimit[]>>;
|
|
961
|
+
marginRepayV3(params: MarginRepayV3Request): Promise<APISuccessResponse<MarginOrderV3>>;
|
|
640
962
|
/**
|
|
963
|
+
* Get Repay History
|
|
641
964
|
*
|
|
642
|
-
*
|
|
643
|
-
*
|
|
965
|
+
* This API endpoint is used to get the repayment orders for cross and isolated margin accounts
|
|
644
966
|
*/
|
|
645
|
-
|
|
967
|
+
getMarginRepayHistoryV3(params: MarginHistoryV3Request): Promise<APISuccessResponse<MarginHistoryRecord[]>>;
|
|
646
968
|
/**
|
|
647
|
-
*
|
|
648
|
-
*
|
|
969
|
+
* Get Interest History
|
|
970
|
+
*
|
|
971
|
+
* Request via this endpoint to get the interest records of the cross/isolated margin lending.
|
|
649
972
|
*/
|
|
650
|
-
|
|
651
|
-
balanceCurrency?: 'USDT' | 'KCS' | 'BTC';
|
|
652
|
-
}): Promise<APISuccessResponse<IsolatedMarginAccountInfo>>;
|
|
653
|
-
/**
|
|
654
|
-
* @deprecated This method is deprecated.
|
|
655
|
-
* It is recommended to use the GET /api/v3/isolated/accounts endpoint instead of this endpoint
|
|
656
|
-
*/
|
|
657
|
-
getIsolatedMarginAccount(params: {
|
|
658
|
-
symbol: string;
|
|
659
|
-
}): Promise<APISuccessResponse<SingleIsolatedMarginAccountInfo>>;
|
|
973
|
+
getMarginInterestRecordsV3(params?: MarginInterestRecordsRequest): Promise<APISuccessResponse<MarginInterestRecords>>;
|
|
660
974
|
/**
|
|
975
|
+
* Modify Leverage
|
|
661
976
|
*
|
|
662
|
-
*
|
|
663
|
-
*
|
|
977
|
+
* This endpoint allows modifying the leverage multiplier for cross margin or isolated margin.
|
|
664
978
|
*/
|
|
665
|
-
marginBorrowV3(params: MarginBorrowV3Request): Promise<APISuccessResponse<MarginOrderV3>>;
|
|
666
|
-
marginRepayV3(params: MarginRepayV3Request): Promise<APISuccessResponse<MarginOrderV3>>;
|
|
667
|
-
getMarginBorrowHistoryV3(params: MarginHistoryV3Request): Promise<APISuccessResponse<MarginHistoryRecord[]>>;
|
|
668
|
-
getMarginRepayHistoryV3(params: MarginHistoryV3Request): Promise<APISuccessResponse<MarginHistoryRecord[]>>;
|
|
669
|
-
getMarginInterestRecordsV3(params?: MarginInterestRecordsRequest): Promise<APISuccessResponse<MarginInterestRecords>>;
|
|
670
|
-
getMarginActivePairsV3(params?: {
|
|
671
|
-
symbol?: string;
|
|
672
|
-
}): Promise<APISuccessResponse<{
|
|
673
|
-
timestamp: number;
|
|
674
|
-
items: any[];
|
|
675
|
-
}>>;
|
|
676
979
|
updateMarginLeverageV3(params: {
|
|
677
980
|
symbol?: string;
|
|
678
981
|
leverage: string;
|
|
@@ -680,56 +983,102 @@ export declare class SpotClient extends BaseRestClient {
|
|
|
680
983
|
}): Promise<APISuccessResponse<any>>;
|
|
681
984
|
/**
|
|
682
985
|
*
|
|
683
|
-
* REST - MARGIN TRADING -
|
|
986
|
+
* REST - MARGIN TRADING - Credit
|
|
684
987
|
*
|
|
685
988
|
*/
|
|
989
|
+
/**
|
|
990
|
+
* Get Loan Market
|
|
991
|
+
*
|
|
992
|
+
* This API endpoint is used to get the information about the currencies available for lending.
|
|
993
|
+
*/
|
|
686
994
|
getLendingCurrencyV3(params?: {
|
|
687
995
|
currency?: string;
|
|
688
996
|
}): Promise<APISuccessResponse<LendingCurrencyV3>>;
|
|
997
|
+
/**
|
|
998
|
+
* Get Loan Market Interest Rate
|
|
999
|
+
*
|
|
1000
|
+
* This API endpoint is used to get the interest rates of the margin lending market over the past 7 days.
|
|
1001
|
+
*/
|
|
689
1002
|
getLendingInterestRateV3(params: {
|
|
690
1003
|
currency: string;
|
|
691
1004
|
}): Promise<APISuccessResponse<{
|
|
692
1005
|
time: string;
|
|
693
1006
|
marketInterestRate: string;
|
|
694
1007
|
}[]>>;
|
|
1008
|
+
/**
|
|
1009
|
+
* Purchase
|
|
1010
|
+
*
|
|
1011
|
+
* Invest credit in the market and earn interest,Please ensure that the funds are in the main(funding) account
|
|
1012
|
+
*/
|
|
695
1013
|
submitLendingSubscriptionV3(params: InitiateLendingSubscriptionV3Request): Promise<APISuccessResponse<{
|
|
696
1014
|
orderNo: string;
|
|
697
1015
|
}[]>>;
|
|
1016
|
+
/**
|
|
1017
|
+
* Modify Purchase
|
|
1018
|
+
*
|
|
1019
|
+
* This API endpoint is used to update the interest rates of subscription orders, which will take effect at the beginning of the next hour.
|
|
1020
|
+
*/
|
|
1021
|
+
updateLendingSubscriptionOrdersV3(params: ModifyLendingSubscriptionOrdersV3Request): Promise<any>;
|
|
1022
|
+
/**
|
|
1023
|
+
* Get Purchase Orders
|
|
1024
|
+
*
|
|
1025
|
+
* This API endpoint provides pagination query for the purchase orders.
|
|
1026
|
+
*/
|
|
1027
|
+
getLendingSubscriptionOrdersV3(params: GetLendingSubscriptionOrdersV3Request): Promise<APISuccessResponse<LendingRedemption>>;
|
|
1028
|
+
/**
|
|
1029
|
+
* Redeem
|
|
1030
|
+
*
|
|
1031
|
+
* Redeem your loan order
|
|
1032
|
+
*/
|
|
698
1033
|
submitLendingRedemptionV3(params: InitiateLendingRedemptionV3Request): Promise<APISuccessResponse<{
|
|
699
1034
|
orderNo: string;
|
|
700
1035
|
}[]>>;
|
|
701
|
-
|
|
1036
|
+
/**
|
|
1037
|
+
* Get Redeem Orders
|
|
1038
|
+
*
|
|
1039
|
+
* This API endpoint provides pagination query for the redeem orders.
|
|
1040
|
+
*/
|
|
702
1041
|
getLendingRedemptionOrdersV3(params: GetLendingRedemptionOrdersV3Request): Promise<APISuccessResponse<LendingRedemption>>;
|
|
703
|
-
getLendingSubscriptionOrdersV3(params: GetLendingSubscriptionOrdersV3Request): Promise<APISuccessResponse<LendingRedemption>>;
|
|
704
1042
|
/**
|
|
705
1043
|
*
|
|
706
|
-
* REST -
|
|
1044
|
+
* REST - MARGIN TRADING - Risk Limit
|
|
707
1045
|
*
|
|
708
1046
|
*/
|
|
709
1047
|
/**
|
|
710
|
-
*
|
|
1048
|
+
* Get Margin Risk Limit
|
|
711
1049
|
*
|
|
712
|
-
*
|
|
713
|
-
* If the subscription fails, it returns the corresponding error code.
|
|
1050
|
+
* Request via this endpoint to get the Configure and Risk limit info of the margin.
|
|
714
1051
|
*/
|
|
715
|
-
|
|
1052
|
+
getMarginRiskLimitConfig(params: MarginRiskLimitRequest): Promise<APISuccessResponse<MarginRiskLimit[]>>;
|
|
716
1053
|
/**
|
|
717
|
-
* Initiate redemption by holding ID
|
|
718
1054
|
*
|
|
719
|
-
*
|
|
1055
|
+
* REST - COPY TRADING
|
|
1056
|
+
*
|
|
720
1057
|
*/
|
|
721
|
-
submitRedemption(params: InitiateRedemptionRequest): Promise<APISuccessResponse<InitiateRedemptionResponse>>;
|
|
722
1058
|
/**
|
|
723
|
-
*
|
|
1059
|
+
*
|
|
1060
|
+
* REST - EARN
|
|
1061
|
+
*
|
|
1062
|
+
*/
|
|
1063
|
+
/**
|
|
1064
|
+
/**
|
|
1065
|
+
* Earn Purchase
|
|
1066
|
+
*
|
|
1067
|
+
* This endpoint allows subscribing earn product
|
|
1068
|
+
*/
|
|
1069
|
+
subscribeEarnFixedIncome(params: SubscribeEarnFixedIncomeRequest): Promise<APISuccessResponse<SubscribeEarnFixedIncomeResponse>>;
|
|
1070
|
+
/**
|
|
1071
|
+
* Get Earn Redeem Preview
|
|
724
1072
|
*
|
|
725
1073
|
* This endpoint retrieves redemption preview information by holding ID. If the current holding is fully redeemed or in the process of being redeemed, it indicates that the holding does not exist.
|
|
726
1074
|
*/
|
|
727
1075
|
getEarnRedeemPreview(params: GetEarnRedeemPreviewRequest): Promise<APISuccessResponse<GetEarnRedeemPreviewResponse>>;
|
|
728
1076
|
/**
|
|
1077
|
+
* Earn Redeem
|
|
729
1078
|
*
|
|
730
|
-
*
|
|
731
|
-
*
|
|
1079
|
+
* This endpoint allows initiating redemption by holding ID. If the current holding is fully redeemed or in the process of being redeemed, it indicates that the holding does not exist.
|
|
732
1080
|
*/
|
|
1081
|
+
submitRedemption(params: InitiateRedemptionRequest): Promise<APISuccessResponse<InitiateRedemptionResponse>>;
|
|
733
1082
|
/**
|
|
734
1083
|
* Get Earn Savings Products
|
|
735
1084
|
*
|
|
@@ -738,12 +1087,6 @@ export declare class SpotClient extends BaseRestClient {
|
|
|
738
1087
|
getEarnSavingsProducts(params?: {
|
|
739
1088
|
currency?: string;
|
|
740
1089
|
}): Promise<APISuccessResponse<EarnProduct[]>>;
|
|
741
|
-
/**
|
|
742
|
-
* Get Earn Fixed Income Current Holdings
|
|
743
|
-
*
|
|
744
|
-
* This endpoint retrieves current holding assets of fixed income products. If no current holding assets are available, an empty list is returned.
|
|
745
|
-
*/
|
|
746
|
-
getEarnFixedIncomeHoldAssets(params?: GetEarnFixedIncomeHoldAssetsRequest): Promise<APISuccessResponse<EarnFixedIncomeHoldAssets>>;
|
|
747
1090
|
/**
|
|
748
1091
|
* Get Earn Limited-Time Promotion Products
|
|
749
1092
|
*
|
|
@@ -753,25 +1096,26 @@ export declare class SpotClient extends BaseRestClient {
|
|
|
753
1096
|
currency?: string;
|
|
754
1097
|
}): Promise<APISuccessResponse<EarnProduct[]>>;
|
|
755
1098
|
/**
|
|
1099
|
+
* Get Earn Account Holdings
|
|
756
1100
|
*
|
|
757
|
-
*
|
|
758
|
-
*
|
|
1101
|
+
* This endpoint retrieves current holding assets of fixed income products. If no current holding assets are available, an empty list is returned.
|
|
759
1102
|
*/
|
|
1103
|
+
getEarnFixedIncomeHoldAssets(params?: GetEarnFixedIncomeHoldAssetsRequest): Promise<APISuccessResponse<EarnFixedIncomeHoldAssets>>;
|
|
760
1104
|
/**
|
|
761
|
-
* Get Earn
|
|
762
|
-
*
|
|
763
|
-
* This endpoint retrieves KCS Staking products. If no KCS Staking products are available, an empty list is returned.
|
|
1105
|
+
* Get Earn Staking Products
|
|
764
1106
|
*
|
|
1107
|
+
* This endpoint retrieves staking products. If no staking products are available, an empty list is returned.
|
|
765
1108
|
*/
|
|
766
|
-
|
|
1109
|
+
getEarnStakingProducts(params?: {
|
|
767
1110
|
currency?: string;
|
|
768
1111
|
}): Promise<APISuccessResponse<EarnProduct[]>>;
|
|
769
1112
|
/**
|
|
770
|
-
* Get Earn Staking Products
|
|
1113
|
+
* Get Earn KCS Staking Products
|
|
1114
|
+
*
|
|
1115
|
+
* This endpoint retrieves KCS Staking products. If no KCS Staking products are available, an empty list is returned.
|
|
771
1116
|
*
|
|
772
|
-
* This endpoint retrieves staking products. If no staking products are available, an empty list is returned.
|
|
773
1117
|
*/
|
|
774
|
-
|
|
1118
|
+
getEarnKcsStakingProducts(params?: {
|
|
775
1119
|
currency?: string;
|
|
776
1120
|
}): Promise<APISuccessResponse<EarnProduct[]>>;
|
|
777
1121
|
/**
|
|
@@ -784,18 +1128,20 @@ export declare class SpotClient extends BaseRestClient {
|
|
|
784
1128
|
/**
|
|
785
1129
|
*
|
|
786
1130
|
* REST - VIP LENDING
|
|
1131
|
+
*
|
|
787
1132
|
*/
|
|
788
1133
|
/**
|
|
789
|
-
* Get
|
|
1134
|
+
* Get Account Detail - VIP Lending
|
|
790
1135
|
*
|
|
1136
|
+
* The following information is only applicable to loans.
|
|
1137
|
+
* Get information on off-exchange funding and loans.
|
|
791
1138
|
* This endpoint is only for querying accounts that are currently involved in loans.
|
|
792
|
-
*
|
|
793
1139
|
*/
|
|
794
1140
|
getOtcLoan(): Promise<APISuccessResponse<OtcLoan>>;
|
|
795
1141
|
/**
|
|
796
|
-
* Get
|
|
1142
|
+
* Get Accounts - VIP Lending
|
|
797
1143
|
*
|
|
798
|
-
* This
|
|
1144
|
+
* Accounts participating in OTC lending, This interface is only for querying accounts currently running OTC lending.
|
|
799
1145
|
*/
|
|
800
1146
|
getOtcLoanAccounts(): Promise<APISuccessResponse<OtcLoanAccount[]>>;
|
|
801
1147
|
/**
|
|
@@ -807,15 +1153,17 @@ export declare class SpotClient extends BaseRestClient {
|
|
|
807
1153
|
* Get Affiliate User Rebate Information
|
|
808
1154
|
*
|
|
809
1155
|
* This endpoint allows getting affiliate user rebate information.
|
|
810
|
-
*
|
|
811
|
-
* @param params - The parameters for the request
|
|
812
|
-
* @returns A promise that resolves to the affiliate user rebate information
|
|
813
1156
|
*/
|
|
814
1157
|
getAffiliateUserRebateInfo(params: {
|
|
815
1158
|
date: string;
|
|
816
1159
|
maxCount?: number;
|
|
817
1160
|
offset: string;
|
|
818
1161
|
}): Promise<APISuccessResponse<any>>;
|
|
1162
|
+
/**
|
|
1163
|
+
*
|
|
1164
|
+
* REST - BROKER
|
|
1165
|
+
*
|
|
1166
|
+
*/
|
|
819
1167
|
/**
|
|
820
1168
|
* Get download link for broker rebate orders
|
|
821
1169
|
*
|
|
@@ -833,4 +1181,229 @@ export declare class SpotClient extends BaseRestClient {
|
|
|
833
1181
|
*/
|
|
834
1182
|
getPublicWSConnectionToken(): Promise<APISuccessResponse<WsConnectionInfo>>;
|
|
835
1183
|
getPrivateWSConnectionToken(): Promise<APISuccessResponse<WsConnectionInfo>>;
|
|
1184
|
+
/**
|
|
1185
|
+
*
|
|
1186
|
+
* DEPRECATED
|
|
1187
|
+
*
|
|
1188
|
+
*/
|
|
1189
|
+
/**
|
|
1190
|
+
*
|
|
1191
|
+
* REST - ACCOUNT - Sub-Account
|
|
1192
|
+
* DEPRECATED
|
|
1193
|
+
*/
|
|
1194
|
+
/**
|
|
1195
|
+
* @deprecated This method is deprecated.
|
|
1196
|
+
* It is recommended to use the getSubAccountsV2() endpoint instead of this endpoint
|
|
1197
|
+
*/
|
|
1198
|
+
getSubAccountsV1(): Promise<APISuccessResponse<SubAccountInfo[]>>;
|
|
1199
|
+
/**
|
|
1200
|
+
* @deprecated This method is deprecated.
|
|
1201
|
+
* It is recommended to use the getSubAccountsV2() endpoint instead of this endpoint
|
|
1202
|
+
*/
|
|
1203
|
+
getSubAccountBalancesV1(): Promise<APISuccessResponse<SubAccountBalance>>;
|
|
1204
|
+
/**
|
|
1205
|
+
*
|
|
1206
|
+
* REST - FUNDING - Funding overview
|
|
1207
|
+
* DEPRECATED
|
|
1208
|
+
*/
|
|
1209
|
+
/**
|
|
1210
|
+
* @deprecated This method is deprecated.
|
|
1211
|
+
* It is recommended to use the getMarginBalance() endpoint instead of this endpoint
|
|
1212
|
+
*/
|
|
1213
|
+
getMarginBalances(): Promise<APISuccessResponse<{
|
|
1214
|
+
debtRatio: string;
|
|
1215
|
+
accounts: MarginAccountBalance[];
|
|
1216
|
+
}>>;
|
|
1217
|
+
/**
|
|
1218
|
+
*
|
|
1219
|
+
* REST - FUNDING -Deposit
|
|
1220
|
+
* DEPRECATED
|
|
1221
|
+
*/
|
|
1222
|
+
/**
|
|
1223
|
+
* @deprecated This method is deprecated. Please use createDepositAddressV3() instead.
|
|
1224
|
+
*/
|
|
1225
|
+
createDepositAddress(params: {
|
|
1226
|
+
currency: string;
|
|
1227
|
+
chain?: string;
|
|
1228
|
+
}): Promise<APISuccessResponse<DepositAddress>>;
|
|
1229
|
+
/**
|
|
1230
|
+
* @deprecated This method is deprecated. Please use getDepositAddressesV3() instead.
|
|
1231
|
+
*/
|
|
1232
|
+
getDepositAddressesV2(params: {
|
|
1233
|
+
currency: string;
|
|
1234
|
+
}): Promise<APISuccessResponse<DepositAddressV2[]>>;
|
|
1235
|
+
/**
|
|
1236
|
+
* @deprecated This method is deprecated. Please use getDepositAddressesV3() instead.
|
|
1237
|
+
*/
|
|
1238
|
+
getDepositAddressV1(params: {
|
|
1239
|
+
currency: string;
|
|
1240
|
+
chain?: string;
|
|
1241
|
+
}): Promise<APISuccessResponse<DepositAddress>>;
|
|
1242
|
+
/**
|
|
1243
|
+
* @deprecated This method is deprecated.
|
|
1244
|
+
* It is recommended to use the getDeposits() endpoint instead of this endpoint
|
|
1245
|
+
*/
|
|
1246
|
+
getHistoricalDepositsV1(params?: GetDepositsRequest): Promise<APISuccessResponse<V1HistoricalDeposits>>;
|
|
1247
|
+
/**
|
|
1248
|
+
*
|
|
1249
|
+
* REST - FUNDING -Withdrawals
|
|
1250
|
+
* DEPRECATED
|
|
1251
|
+
*/
|
|
1252
|
+
/**
|
|
1253
|
+
* @deprecated This method is deprecated.
|
|
1254
|
+
* It is recommended to use the getWithdrawals() endpoint instead of this endpoint
|
|
1255
|
+
*/
|
|
1256
|
+
getHistoricalWithdrawalsV1(params?: GetWithdrawalsRequest): Promise<APISuccessResponse<HistoricalWithdrawalsV1>>;
|
|
1257
|
+
/**
|
|
1258
|
+
* @deprecated This method is deprecated. Please use submitWithdrawV3() instead.
|
|
1259
|
+
*/
|
|
1260
|
+
submitWithdraw(params: ApplyWithdrawRequest): Promise<APISuccessResponse<{
|
|
1261
|
+
withdrawalId: string;
|
|
1262
|
+
}>>;
|
|
1263
|
+
/**
|
|
1264
|
+
*
|
|
1265
|
+
* REST - FUNDING - Transfer
|
|
1266
|
+
* DEPRECATED
|
|
1267
|
+
*/
|
|
1268
|
+
/**
|
|
1269
|
+
* @deprecated This method is deprecated.
|
|
1270
|
+
* It is recommended to use the submitFlexTransfer() endpoint instead of this endpoint
|
|
1271
|
+
*/
|
|
1272
|
+
submitTransferMasterSub(params: submitTransferMasterSubRequest): Promise<APISuccessResponse<{
|
|
1273
|
+
orderId: string;
|
|
1274
|
+
}>>;
|
|
1275
|
+
/**
|
|
1276
|
+
* @deprecated This method is deprecated.
|
|
1277
|
+
* It is recommended to use the submitFlexTransfer() endpoint instead of this endpoint
|
|
1278
|
+
*/
|
|
1279
|
+
submitInnerTransfer(params: InnerTransferRequest): Promise<APISuccessResponse<{
|
|
1280
|
+
orderId: string;
|
|
1281
|
+
}>>;
|
|
1282
|
+
/**
|
|
1283
|
+
*
|
|
1284
|
+
* REST - SPOT TRADING - Orders
|
|
1285
|
+
* DEPRECATED
|
|
1286
|
+
*/
|
|
1287
|
+
/**
|
|
1288
|
+
* @deprecated This method is deprecated.
|
|
1289
|
+
* It is recommended to use the HF trading endpoints instead of this endpoint
|
|
1290
|
+
*/
|
|
1291
|
+
submitOrder(params: SubmitOrderRequest): Promise<APISuccessResponse<{
|
|
1292
|
+
orderId: string;
|
|
1293
|
+
}>>;
|
|
1294
|
+
/**
|
|
1295
|
+
* @deprecated This method is deprecated.
|
|
1296
|
+
* It is recommended to use the HF trading endpoints instead of this endpoint
|
|
1297
|
+
*/
|
|
1298
|
+
submitOrderTest(): Promise<any>;
|
|
1299
|
+
/**
|
|
1300
|
+
* @deprecated This method is deprecated.
|
|
1301
|
+
* It is recommended to use the HF trading endpoints instead of this endpoint
|
|
1302
|
+
*/
|
|
1303
|
+
submitMultipleOrders(params: {
|
|
1304
|
+
symbol: string;
|
|
1305
|
+
orderList: SubmitMultipleOrdersRequest[];
|
|
1306
|
+
}): Promise<APISuccessResponse<MultipleOrdersResponse[]>>;
|
|
1307
|
+
/**
|
|
1308
|
+
* @deprecated This method is deprecated.
|
|
1309
|
+
* It is recommended to use the HF trading endpoints instead of this endpoint
|
|
1310
|
+
*/
|
|
1311
|
+
cancelOrderById(params: {
|
|
1312
|
+
orderId: string;
|
|
1313
|
+
}): Promise<APISuccessResponse<{
|
|
1314
|
+
cancelledOrderIds: string[];
|
|
1315
|
+
}>>;
|
|
1316
|
+
/**
|
|
1317
|
+
* @deprecated This method is deprecated.
|
|
1318
|
+
* It is recommended to use the HF trading endpoints instead of this endpoint
|
|
1319
|
+
*/
|
|
1320
|
+
cancelOrderByClientOid(params: {
|
|
1321
|
+
clientOid: string;
|
|
1322
|
+
}): Promise<APISuccessResponse<{
|
|
1323
|
+
cancelledOrderId: string;
|
|
1324
|
+
clientOid: string;
|
|
1325
|
+
}>>;
|
|
1326
|
+
/**
|
|
1327
|
+
* @deprecated This method is deprecated.
|
|
1328
|
+
* It is recommended to use the HF trading endpoints instead of this endpoint
|
|
1329
|
+
*/
|
|
1330
|
+
cancelAllOrders(params?: CancelAllOrdersRequest): Promise<APISuccessResponse<{
|
|
1331
|
+
cancelledOrderIds: string[];
|
|
1332
|
+
}>>;
|
|
1333
|
+
/**
|
|
1334
|
+
* @deprecated This method is deprecated.
|
|
1335
|
+
* It is recommended to use the HF trading endpoints instead of this endpoint
|
|
1336
|
+
*/
|
|
1337
|
+
getOrders(params?: GetOrderListRequest): Promise<APISuccessResponse<SpotOrderList>>;
|
|
1338
|
+
/**
|
|
1339
|
+
* @deprecated This method is deprecated.
|
|
1340
|
+
* It is recommended to use the HF trading endpoints instead of this endpoint
|
|
1341
|
+
*/
|
|
1342
|
+
getRecentOrders(params?: {
|
|
1343
|
+
currentPage?: number;
|
|
1344
|
+
pageSize?: number;
|
|
1345
|
+
}): Promise<APISuccessResponse<SpotOrder[]>>;
|
|
1346
|
+
/**
|
|
1347
|
+
* @deprecated This method is deprecated.
|
|
1348
|
+
* It is recommended to use the HF trading endpoints instead of this endpoint
|
|
1349
|
+
*/
|
|
1350
|
+
getOrderByOrderId(params: {
|
|
1351
|
+
orderId: string;
|
|
1352
|
+
}): Promise<APISuccessResponse<SpotOrder>>;
|
|
1353
|
+
/**
|
|
1354
|
+
* @deprecated This method is deprecated.
|
|
1355
|
+
* It is recommended to use the HF trading endpoints instead of this endpoint
|
|
1356
|
+
*/
|
|
1357
|
+
getOrderByClientOid(params: {
|
|
1358
|
+
clientOid: string;
|
|
1359
|
+
}): Promise<APISuccessResponse<SpotOrder>>;
|
|
1360
|
+
/**
|
|
1361
|
+
*
|
|
1362
|
+
* REST - SPOT TRADING -Fills
|
|
1363
|
+
* DEPRECATED
|
|
1364
|
+
*/
|
|
1365
|
+
/**
|
|
1366
|
+
* @deprecated This method is deprecated.
|
|
1367
|
+
* It is recommended to use the HF trading endpoints instead of this endpoint
|
|
1368
|
+
*/
|
|
1369
|
+
getFills(params?: GetFillsRequest): Promise<APISuccessResponse<SpotOrderFills>>;
|
|
1370
|
+
/**
|
|
1371
|
+
* @deprecated This method is deprecated.
|
|
1372
|
+
* It is recommended to use the HF trading endpoints instead of this endpoint
|
|
1373
|
+
*/
|
|
1374
|
+
getRecentFills(): Promise<APISuccessResponse<SpotOrderFill[]>>;
|
|
1375
|
+
/**
|
|
1376
|
+
*
|
|
1377
|
+
* REST - MARGIN TRADING - Orders
|
|
1378
|
+
* DEPRECATED
|
|
1379
|
+
*/
|
|
1380
|
+
/**
|
|
1381
|
+
* @deprecated This method is deprecated.
|
|
1382
|
+
* It is recommended to use the submitHFMarginOrder() endpoint instead of this endpoint
|
|
1383
|
+
*/
|
|
1384
|
+
submitMarginOrder(params: SubmitMarginOrderRequest): Promise<APISuccessResponse<SubmitMarginOrderResponse>>;
|
|
1385
|
+
/**
|
|
1386
|
+
* @deprecated This method is deprecated.
|
|
1387
|
+
* It is recommended to use the submitHFMarginOrderTest() endpoint instead of this endpoint
|
|
1388
|
+
*/
|
|
1389
|
+
submitMarginOrderTest(): Promise<any>;
|
|
1390
|
+
/**
|
|
1391
|
+
*
|
|
1392
|
+
* REST - MARGIN TRADING - Isolated Margin
|
|
1393
|
+
* DEPRECATED
|
|
1394
|
+
*/
|
|
1395
|
+
/**
|
|
1396
|
+
* @deprecated This method is deprecated.
|
|
1397
|
+
* It is recommended to use the getMarginBalance() endpoint instead of this endpoint
|
|
1398
|
+
*/
|
|
1399
|
+
getIsolatedMarginAccounts(params?: {
|
|
1400
|
+
balanceCurrency?: 'USDT' | 'KCS' | 'BTC';
|
|
1401
|
+
}): Promise<APISuccessResponse<IsolatedMarginAccountInfo>>;
|
|
1402
|
+
/**
|
|
1403
|
+
* @deprecated This method is deprecated.
|
|
1404
|
+
* It is recommended to use the getIsolatedMarginBalance() endpoint instead of this endpoint
|
|
1405
|
+
*/
|
|
1406
|
+
getIsolatedMarginAccount(params: {
|
|
1407
|
+
symbol: string;
|
|
1408
|
+
}): Promise<APISuccessResponse<SingleIsolatedMarginAccountInfo>>;
|
|
836
1409
|
}
|