kucoin-api 1.0.22 → 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.
@@ -43,161 +43,271 @@ 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 - ACCOUNT - Basic Info
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/Margin/trade_hf
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 - ACCOUNT - Sub-Account
128
+ * REST - Account Info - Sub Account
77
129
  *
78
130
  */
79
- getSubAccountsV1(): Promise<APISuccessResponse<SubAccountInfo[]>>;
80
- getSubAccountsV2(params?: {
81
- currentPage?: number;
82
- pageSize?: number;
83
- }): Promise<APISuccessResponse<SubAccountsV2>>;
131
+ /**
132
+ * Add SubAccount
133
+ *
134
+ * This endpoint is used to create a sub-account.
135
+ */
84
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
+ */
85
143
  enableSubAccountMargin(params: {
86
144
  uid: string;
87
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
+ */
88
152
  enableSubAccountFutures(params: {
89
153
  uid: string;
90
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>>;
164
+ /**
165
+ * @deprecated This method is deprecated.
166
+ * It is recommended to use the GET /api/v2/sub/accounts/balance endpoint instead of this endpoint
167
+ */
91
168
  getSubAccountBalance(params: {
92
169
  subUserId: string;
93
170
  includeBaseAmount: boolean;
94
171
  }): Promise<APISuccessResponse<SubAccountBalance>>;
95
- getSubAccountBalancesV1(): Promise<APISuccessResponse<SubAccountBalance>>;
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
+ */
96
178
  getSubAccountBalancesV2(params?: {
97
179
  currentPage?: number;
98
180
  pageSize?: number;
99
181
  }): Promise<APISuccessResponse<SubAccountBalancesV2>>;
100
182
  /**
101
183
  *
102
- * REST - ACCOUNT - Sub-Account API
184
+ * REST - Account Info - Sub Account API
185
+ *
186
+ */
187
+ /**
188
+ * Add SubAccount API
189
+ *
190
+ * This endpoint can be used to create APIs for sub-accounts.
191
+ */
192
+ createSubAPI(params: CreateSubAccountAPIRequest): Promise<APISuccessResponse<CreateSubAPI>>;
193
+ /**
194
+ * Modify SubAccount API
103
195
  *
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
104
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)
105
204
  */
106
205
  getSubAPIs(params: {
107
206
  apiKey?: string;
108
207
  subName: string;
109
208
  }): Promise<APISuccessResponse<SubAccountAPIInfo[]>>;
110
- createSubAPI(params: CreateSubAccountAPIRequest): Promise<APISuccessResponse<CreateSubAPI>>;
111
- updateSubAPI(params: UpdateSubAccountAPIRequest): Promise<APISuccessResponse<UpdateSubAPI>>;
112
- deleteSubAPI(params: DeleteSubAccountAPIRequest): Promise<APISuccessResponse<DeleteSubAccountAPI>>;
113
209
  /**
210
+ * Delete SubAccount API
114
211
  *
115
- * REST - FUNDING - Funding overview
116
- *
212
+ * This endpoint can be used to delete an API for a sub-account.
117
213
  */
118
- getMarginBalances(): Promise<APISuccessResponse<{
119
- debtRatio: string;
120
- accounts: MarginAccountBalance[];
121
- }>>;
122
- getMarginBalance(params?: GetMarginBalanceRequest): Promise<APISuccessResponse<MarginBalance>>;
123
- getIsolatedMarginBalance(params?: GetIsolatedMarginBalanceRequest): Promise<APISuccessResponse<IsolatedMarginBalance[]>>;
214
+ deleteSubAPI(params: DeleteSubAccountAPIRequest): Promise<APISuccessResponse<DeleteSubAccountAPI>>;
124
215
  /**
125
216
  *
126
- * REST - FUNDING -Deposit
217
+ * REST - Account Info - Deposit
127
218
  *
128
219
  */
129
220
  /**
130
- * @deprecated This method is deprecated. Please use createDepositAddressV3 instead.
221
+ * Add Deposit Address(V3)
222
+ *
223
+ * Request via this endpoint to create a deposit address for a currency you intend to deposit.
131
224
  */
132
- createDepositAddress(params: {
133
- currency: string;
134
- chain?: string;
135
- }): Promise<APISuccessResponse<DepositAddress>>;
136
225
  createDepositAddressV3(params: CreateDepositAddressV3Request): Promise<APISuccessResponse<CreateDepositAddressV3Response>>;
137
226
  /**
138
- * @deprecated This method is deprecated. Please use getDepositAddressesV3 instead.
139
- */
140
- getDepositAddressesV2(params: {
141
- currency: string;
142
- }): Promise<APISuccessResponse<DepositAddressV2[]>>;
143
- /**
144
- * @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.
145
231
  */
146
- getDepositAddressV1(params: {
147
- currency: string;
148
- chain?: string;
149
- }): Promise<APISuccessResponse<DepositAddress>>;
150
232
  getDepositAddressesV3(params: {
151
233
  currency: string;
152
234
  amount?: string;
153
235
  chain?: string;
154
236
  }): Promise<APISuccessResponse<DepositAddress[]>>;
237
+ /**
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.
242
+ */
155
243
  getDeposits(params?: GetDepositsRequest): Promise<APISuccessResponse<Deposits>>;
156
- getHistoricalDepositsV1(params?: GetDepositsRequest): Promise<APISuccessResponse<V1HistoricalDeposits>>;
157
244
  /**
158
245
  *
159
- * REST - FUNDING -Withdrawals
246
+ * REST - Account Info - Withdrawals
160
247
  *
161
248
  */
162
- getWithdrawals(params?: GetWithdrawalsRequest): Promise<APISuccessResponse<Withdrawals>>;
163
- getHistoricalWithdrawalsV1(params?: GetWithdrawalsRequest): Promise<APISuccessResponse<HistoricalWithdrawalsV1>>;
249
+ /**
250
+ * Get Withdrawal Quotas
251
+ *
252
+ * This interface can obtain the withdrawal quotas information of this currency.
253
+ */
164
254
  getWithdrawalQuotas(params: {
165
255
  currency: string;
166
256
  chain?: string;
167
257
  }): Promise<APISuccessResponse<WithdrawalQuotas>>;
168
258
  /**
169
- * @deprecated This method is deprecated. Please use submitWithdrawalV3 instead.
259
+ * Withdraw(V3)
260
+ *
261
+ * Use this interface to withdraw the specified currency
170
262
  */
171
- submitWithdraw(params: ApplyWithdrawRequest): Promise<APISuccessResponse<{
172
- withdrawalId: string;
173
- }>>;
174
263
  submitWithdrawV3(params: SubmitWithdrawV3Request): Promise<APISuccessResponse<{
175
264
  withdrawalId: string;
176
265
  }>>;
266
+ /**
267
+ * Cancel Withdrawal
268
+ *
269
+ * This interface can cancel the withdrawal, Only withdrawals requests of PROCESSING status could be canceled.
270
+ */
177
271
  cancelWithdrawal(params: {
178
272
  withdrawalId: string;
179
273
  }): Promise<APISuccessResponse<{
180
274
  withdrawalId: string;
181
275
  }>>;
182
276
  /**
277
+ * Get Withdrawal History
183
278
  *
184
- * REST - FUNDING - Transfer
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
286
+ *
287
+ */
288
+ /**
289
+ * Get Transfer Quotas
185
290
  *
291
+ * This endpoint returns the transferable balance of a specified account.
186
292
  */
187
293
  getTransferable(params: GetTransferableRequest): Promise<APISuccessResponse<TransferableFunds>>;
294
+ /**
295
+ * Flex Transfer
296
+ *
297
+ * This interface can be used for transfers between master and sub accounts and inner transfers
298
+ */
188
299
  submitFlexTransfer(params: FlexTransferRequest): Promise<APISuccessResponse<{
189
300
  orderId: string;
190
301
  }>>;
191
- submitTransferMasterSub(params: submitTransferMasterSubRequest): Promise<APISuccessResponse<{
192
- orderId: string;
193
- }>>;
194
- submitInnerTransfer(params: InnerTransferRequest): Promise<APISuccessResponse<{
195
- orderId: string;
196
- }>>;
197
302
  /**
198
303
  *
199
- * REST - FUNDING - Trade Fee
304
+ * REST - Account Info - Trade Fee
305
+ *
306
+ */
307
+ /**
308
+ * Get Basic Fee - Spot/Margin
200
309
  *
310
+ * This interface is for the spot/margin basic fee rate of users
201
311
  */
202
312
  getBasicUserFee(params: {
203
313
  currencyType: string;
@@ -205,6 +315,13 @@ export declare class SpotClient extends BaseRestClient {
205
315
  takerFeeRate: string;
206
316
  makerFeeRate: string;
207
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
+ */
208
325
  getTradingPairFee(params: {
209
326
  symbol: string;
210
327
  }): Promise<APISuccessResponse<{
@@ -214,193 +331,341 @@ export declare class SpotClient extends BaseRestClient {
214
331
  }[]>>;
215
332
  /**
216
333
  *
217
- * REST - SPOT TRADING -Market data
334
+ * REST - SPOT TRADING - Market Data
218
335
  *
219
336
  */
220
- getCurrencies(): Promise<APISuccessResponse<CurrencyInfo[]>>;
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
+ */
221
348
  getCurrency(params: {
222
349
  currency: string;
223
350
  chain?: string;
224
351
  }): Promise<APISuccessResponse<CurrencyInfo>>;
225
- getSymbols(params?: {
226
- market?: string;
227
- }): Promise<APISuccessResponse<SymbolInfo[]>>;
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
+ */
228
364
  getSymbol(params: {
229
365
  symbol: string;
230
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
+ */
231
383
  getTicker(params: {
232
384
  symbol: string;
233
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
+ */
234
391
  getTickers(): Promise<APISuccessResponse<{
235
392
  time: number;
236
393
  ticker: Ticker[];
237
394
  }>>;
238
- get24hrStats(params: {
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: {
239
402
  symbol: string;
240
- }): Promise<APISuccessResponse<Symbol24hrStats>>;
241
- getMarkets(): Promise<APISuccessResponse<string[]>>;
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
+ */
242
416
  getOrderBookLevel20(params: {
243
417
  symbol: string;
244
418
  }): Promise<APISuccessResponse<OrderBookLevel>>;
419
+ /**
420
+ * Get Part OrderBook
421
+ *
422
+ * Query for part orderbook depth data. Level 100(aggregated by price)
423
+ */
245
424
  getOrderBookLevel100(params: {
246
425
  symbol: string;
247
426
  }): Promise<APISuccessResponse<OrderBookLevel>>;
427
+ /**
428
+ * Get Full OrderBook
429
+ *
430
+ * Query for full orderbook depth data. (aggregated by price)
431
+ */
248
432
  getFullOrderBook(params: {
249
433
  symbol: string;
250
434
  }): Promise<APISuccessResponse<OrderBookLevel>>;
251
- getTradeHistories(params: {
252
- symbol: string;
253
- }): Promise<APISuccessResponse<TradeHistory[]>>;
254
- getKlines(params: GetSpotKlinesRequest): Promise<APISuccessResponse<Kline[]>>;
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
+ */
255
440
  getFiatPrice(params?: {
256
441
  base?: string;
257
442
  currencies?: string;
258
443
  }): Promise<any>;
444
+ /**
445
+ * Get 24hr Stats
446
+ *
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
454
+ *
455
+ * Request via this endpoint to get the transaction currency for the entire trading market.
456
+ */
457
+ getMarkets(): Promise<APISuccessResponse<string[]>>;
259
458
  /**
260
459
  *
261
- * REST - SPOT TRADING - Spot HF trade
460
+ * REST - SPOT TRADING - Orders
262
461
  *
263
462
  */
264
- getUserType(): Promise<APISuccessResponse<boolean>>;
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.
469
+ */
265
470
  submitHFOrder(params: SubmitHFOrderRequest): Promise<APISuccessResponse<{
266
471
  orderId: string;
267
472
  clientOid: string;
268
473
  }>>;
269
- submitHFOrderTest(): Promise<any>;
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
+ */
270
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
+ */
271
494
  submitHFMultipleOrders(params: {
272
495
  orderList: SubmitMultipleHFOrdersRequest[];
273
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
+ */
274
503
  submitHFMultipleOrdersSync(params: {
275
504
  orderList: SubmitMultipleHFOrdersRequest[];
276
505
  }): Promise<APISuccessResponse<SubmitMultipleHFOrdersSyncResponse[]>>;
277
- updateHFOrder(params: ModifyHFOrderRequest): Promise<APISuccessResponse<{
278
- newOrderId: string;
279
- clientOid: string;
280
- }>>;
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
+ */
281
512
  cancelHFOrder(params: {
282
513
  orderId: string;
283
514
  symbol: string;
284
515
  }): Promise<APISuccessResponse<{
285
516
  orderId: string;
286
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
+ */
287
524
  cancelHFOrderSync(params: {
288
525
  orderId: string;
289
526
  symbol: string;
290
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
+ */
291
534
  cancelHFOrderByClientOId(params: {
292
535
  clientOid: string;
293
536
  symbol: string;
294
537
  }): Promise<APISuccessResponse<{
295
538
  clientOid: string;
296
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
+ */
297
546
  cancelHFOrderSyncByClientOId(params: {
298
547
  clientOid: string;
299
548
  symbol: string;
300
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
+ */
301
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
+ */
302
561
  cancelHFAllOrdersBySymbol(params: {
303
562
  symbol: string;
304
563
  }): Promise<APISuccessResponse<{
305
564
  orderId: string;
306
565
  cancelSize: string;
307
566
  }>>;
567
+ /**
568
+ * Cancel All Orders
569
+ *
570
+ * This endpoint can cancel all spot orders for all symbol.
571
+ */
308
572
  cancelHFAllOrders(): Promise<APISuccessResponse<CancelAllHFOrdersResponse>>;
309
- getHFActiveOrders(params: {
310
- symbol: string;
311
- }): Promise<APISuccessResponse<HFOrder[]>>;
312
- getHFActiveSymbols(): Promise<APISuccessResponse<{
313
- symbols: string[];
314
- }>>;
315
- getHFCompletedOrders(params: GetHFCompletedOrdersRequest): Promise<APISuccessResponse<{
316
- lastId: number;
317
- 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;
318
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
+ */
319
587
  getHFOrderDetailsByOrderId(params: {
320
588
  orderId: string;
321
589
  symbol: string;
322
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
+ */
323
596
  getHFOrderDetailsByClientOid(params: {
324
597
  clientOid: string;
325
598
  symbol: string;
326
599
  }): Promise<APISuccessResponse<HFOrder>>;
327
- cancelHFOrderAutoSetting(params: {
328
- timeout: number;
329
- symbols?: string;
330
- }): Promise<APISuccessResponse<{
331
- currentTime: number;
332
- triggerTime: number;
333
- }>>;
334
- cancelHFOrderAutoSettingQuery(): Promise<APISuccessResponse<AutoCancelHFOrderSettingQueryResponse>>;
335
- getHFFilledOrders(params: GetHFFilledListRequest): Promise<APISuccessResponse<{
336
- items: HFFilledOrder[];
337
- lastId: number;
338
- }>>;
339
600
  /**
601
+ * Get Symbols With Open Order
340
602
  *
341
- * REST - SPOT TRADING - Orders
342
- *
603
+ * This interface can query all spot symbol that has active orders
343
604
  */
344
- submitOrder(params: SubmitOrderRequest): Promise<APISuccessResponse<{
345
- orderId: string;
605
+ getHFActiveSymbols(): Promise<APISuccessResponse<{
606
+ symbols: string[];
346
607
  }>>;
347
- submitOrderTest(): Promise<any>;
348
- submitMultipleOrders(params: {
608
+ /**
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.
613
+ */
614
+ getHFActiveOrders(params: {
349
615
  symbol: string;
350
- orderList: SubmitMultipleOrdersRequest[];
351
- }): Promise<APISuccessResponse<MultipleOrdersResponse[]>>;
352
- cancelOrderById(params: {
353
- orderId: string;
354
- }): Promise<APISuccessResponse<{
355
- cancelledOrderIds: string[];
356
- }>>;
357
- cancelOrderByClientOid(params: {
358
- clientOid: string;
359
- }): Promise<APISuccessResponse<{
360
- cancelledOrderId: string;
361
- clientOid: string;
362
- }>>;
363
- cancelAllOrders(params?: CancelAllOrdersRequest): Promise<APISuccessResponse<{
364
- cancelledOrderIds: string[];
365
- }>>;
366
- getOrders(params?: GetOrderListRequest): Promise<APISuccessResponse<SpotOrderList>>;
367
- getRecentOrders(params?: {
368
- currentPage?: number;
369
- pageSize?: number;
370
- }): Promise<APISuccessResponse<SpotOrder[]>>;
371
- getOrderByOrderId(params: {
372
- orderId: string;
373
- }): Promise<APISuccessResponse<SpotOrder>>;
374
- getOrderByClientOid(params: {
375
- clientOid: string;
376
- }): Promise<APISuccessResponse<SpotOrder>>;
616
+ }): Promise<APISuccessResponse<HFOrder[]>>;
377
617
  /**
618
+ * Get Closed Orders
378
619
  *
379
- * REST - SPOT TRADING -Fills
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.
622
+ */
623
+ getHFCompletedOrders(params: GetHFCompletedOrdersRequest): Promise<APISuccessResponse<{
624
+ lastId: number;
625
+ items: HFOrder[];
626
+ }>>;
627
+ /**
628
+ * Get Trade History
380
629
  *
630
+ * This endpoint can be used to obtain a list of the latest Spot transaction details.
381
631
  */
382
- getFills(params?: GetFillsRequest): Promise<APISuccessResponse<SpotOrderFills>>;
383
- getRecentFills(): Promise<APISuccessResponse<SpotOrderFill[]>>;
632
+ getHFFilledOrders(params: GetHFFilledListRequest): Promise<APISuccessResponse<{
633
+ items: HFFilledOrder[];
634
+ lastId: number;
635
+ }>>;
384
636
  /**
637
+ * Get DCP
385
638
  *
386
- * REST - SPOT TRADING - Stop order
639
+ * Get Disconnection Protect(Deadman Swich)
640
+ * Through this interface, you can query the settings of automatic order cancellation
641
+ */
642
+ cancelHFOrderAutoSettingQuery(): Promise<APISuccessResponse<AutoCancelHFOrderSettingQueryResponse>>;
643
+ /**
644
+ * Set DCP
387
645
  *
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.
388
649
  */
389
- submitStopOrder(params: SubmitStopOrderRequest): Promise<APISuccessResponse<{
390
- orderId: string;
650
+ cancelHFOrderAutoSetting(params: {
651
+ timeout: number;
652
+ symbols?: string;
653
+ }): Promise<APISuccessResponse<{
654
+ currentTime: number;
655
+ triggerTime: number;
391
656
  }>>;
392
657
  /**
393
- * Cancels a single stop order by orderId. Applicable for both spot and margin trading.
658
+ * Add Stop Order
394
659
  *
395
- * This endpoint requires the "Spot Trading" or "Margin Trading" permission on your API key.
660
+ * Place stop order to the Spot trading system.
396
661
  */
397
- cancelStopOrderById(params: {
662
+ submitStopOrder(params: SubmitStopOrderRequest): Promise<APISuccessResponse<{
398
663
  orderId: string;
399
- }): Promise<APISuccessResponse<{
400
- cancelledOrderIds: string[];
401
664
  }>>;
402
665
  /**
403
- * Cancels a stop order by clientOid. Requires "Spot Trading" or "Margin Trading" permission.
666
+ * Cancel Stop Order By ClientOid
667
+ *
668
+ * This endpoint can be used to cancel a spot stop order by clientOid.
404
669
  */
405
670
  cancelStopOrderByClientOid(params: {
406
671
  clientOid: string;
@@ -410,38 +675,60 @@ export declare class SpotClient extends BaseRestClient {
410
675
  clientOid: string;
411
676
  }>>;
412
677
  /**
413
- * Cancels a batch of stop orders. Requires "Spot Trading" or "Margin Trading" permission.
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.
414
691
  */
415
692
  cancelStopOrders(params?: CancelStopOrdersRequest): Promise<APISuccessResponse<{
416
693
  cancelledOrderIds: string[];
417
694
  }>>;
418
695
  /**
419
- * Retrieves your current untriggered stop order list, paginated and sorted to show the latest first.
696
+ * Get Stop Orders List
697
+ *
698
+ * Request via this endpoint to get your current untriggered stop order list.
420
699
  */
421
700
  getStopOrders(params?: GetStopOrdersListRequest): Promise<APISuccessResponse<StopOrders>>;
422
701
  /**
423
- * Retrieves the details of a single stop order by its orderId.
702
+ * Get Stop Order By OrderId
703
+ *
704
+ * Request via this interface to get a stop order information via the order ID.
705
+
706
+
424
707
  */
425
708
  getStopOrderByOrderId(params: {
426
709
  orderId: string;
427
710
  }): Promise<APISuccessResponse<StopOrderItem>>;
428
711
  /**
429
- * Retrieves the details of a single stop order by its clientOid.
712
+ * Get Stop Order By ClientOid
713
+ *
714
+ *
430
715
  */
431
716
  getStopOrderByClientOid(params: {
432
717
  clientOid: string;
433
718
  symbol?: string;
434
719
  }): Promise<APISuccessResponse<StopOrderItem[]>>;
435
720
  /**
721
+ * Add OCO Order
436
722
  *
437
- * REST - SPOT TRADING - OCO order
438
- *
723
+ * Place OCO order to the Spot trading system
439
724
  */
440
725
  submitOCOOrder(params: SubmitOCOOrderRequest): Promise<APISuccessResponse<{
441
726
  orderId: string;
442
727
  }>>;
443
728
  /**
444
- * Cancels a single OCO order by orderId.
729
+ * Cancel OCO Order By OrderId
730
+ *
731
+ * Request via this endpoint to cancel a single oco order previously placed.
445
732
  */
446
733
  cancelOCOOrderById(params: {
447
734
  orderId: string;
@@ -449,7 +736,9 @@ export declare class SpotClient extends BaseRestClient {
449
736
  cancelledOrderIds: string[];
450
737
  }>>;
451
738
  /**
452
- * Cancels a single OCO order by clientOid.
739
+ * Cancel OCO Order By ClientOid
740
+ *
741
+ * Request via this endpoint to cancel a single oco order previously placed.
453
742
  */
454
743
  cancelOCOOrderByClientOid(params: {
455
744
  clientOid: string;
@@ -457,7 +746,9 @@ export declare class SpotClient extends BaseRestClient {
457
746
  cancelledOrderIds: string[];
458
747
  }>>;
459
748
  /**
460
- * Batch cancels OCO orders through orderIds.
749
+ * Batch Cancel OCO Order
750
+ *
751
+ * This interface can batch cancel OCO orders through orderIds.
461
752
  */
462
753
  cancelMultipleOCOOrders(params?: {
463
754
  orderIds?: string;
@@ -466,121 +757,225 @@ export declare class SpotClient extends BaseRestClient {
466
757
  cancelledOrderIds: string[];
467
758
  }>>;
468
759
  /**
469
- * Retrieves the details of a single OCO order by its orderId.
760
+ * Get OCO Order By OrderId
761
+ *
762
+ * Request via this interface to get a oco order information via the order ID.
470
763
  */
471
764
  getOCOOrderByOrderId(params: {
472
765
  orderId: string;
473
766
  }): Promise<APISuccessResponse<OCOOrderListItem>>;
474
767
  /**
475
- * Retrieves the details of a single OCO order by its clientOid.
768
+ * Get OCO Order By ClientOid
769
+ *
770
+ * Request via this interface to get a oco order information via the clientOid.
476
771
  */
477
772
  getOCOOrderByClientOid(params: {
478
773
  clientOid: string;
479
774
  }): Promise<APISuccessResponse<OCOOrderListItem>>;
480
775
  /**
481
- * Retrieves the details of a single OCO order by its orderId, including detailed information about the individual orders.
776
+ * Get OCO Order Details
777
+ *
778
+ * Request via this interface to get a oco order information via the order ID.
482
779
  */
483
780
  getOCOOrderDetails(params: {
484
781
  orderId: string;
485
782
  }): Promise<APISuccessResponse<OCOOrderDetails>>;
486
783
  /**
487
- * Retrieves your current OCO order list, paginated and sorted to show the latest first.
784
+ * Get OCO Order List
785
+ *
786
+ * Request via this endpoint to get your current OCO order list.
488
787
  */
489
788
  getOCOOrders(params: GetOCOOrdersRequest): Promise<APISuccessResponse<OCOOrders>>;
490
789
  /**
491
790
  *
492
- * REST - MARGIN TRADING -Margin HF trade
791
+ * REST - MARGIN TRADING - Market Data
493
792
  *
494
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
846
+ *
847
+ * Place order to the Cross-margin or Isolated-margin trading system
848
+ */
495
849
  submitHFMarginOrder(params: SubmitHFMarginOrderRequest): Promise<APISuccessResponse<{
496
850
  orderNo: string;
497
851
  }>>;
852
+ /**
853
+ * Add Order Test
854
+ *
855
+ * This interface is used to test the order submission.
856
+ */
498
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
+ */
499
863
  cancelHFMarginOrder(params: {
500
864
  orderId: string;
501
865
  symbol: string;
502
866
  }): Promise<APISuccessResponse<{
503
867
  orderId: string;
504
868
  }>>;
869
+ /**
870
+ * Cancel Order By ClientOid
871
+ *
872
+ * This endpoint can be used to cancel a margin order by clientOid.
873
+ */
505
874
  cancelHFMarginOrderByClientOid(params: {
506
875
  clientOid: string;
507
876
  symbol: string;
508
877
  }): Promise<APISuccessResponse<{
509
878
  clientOid: string;
510
879
  }>>;
880
+ /**
881
+ * Cancel All Orders By Symbol
882
+ *
883
+ * This interface can cancel all open Margin orders by symbol
884
+ */
511
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
+ */
512
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
+ */
513
908
  getHFMarginFilledOrders(params: GetHFMarginFilledRequest): Promise<APISuccessResponse<{
514
909
  lastId: number;
515
910
  items: HFMarginFilledOrder[];
516
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
+ */
517
926
  getHFMarginOrderByOrderId(params: {
518
927
  orderId: string;
519
928
  symbol: string;
520
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
+ */
521
935
  getHFMarginOrderByClientOid(params: {
522
936
  clientOid: string;
523
937
  symbol: string;
524
938
  }): Promise<APISuccessResponse<HFMarginOrder>>;
525
- getHFMarginFills(params: getHFMarginFillsRequest): Promise<APISuccessResponse<{
526
- lastId: number;
527
- items: HFMarginTransactionRecord[];
528
- }>>;
529
- getHFMarginOpenSymbols(params: {
530
- tradeType: string;
531
- }): Promise<APISuccessResponse<{
532
- symbolSize: number;
533
- symbols: string[];
534
- }>>;
535
939
  /**
536
940
  *
537
- * REST - MARGIN TRADING - Orders
941
+ * REST - MARGIN TRADING - Debit
538
942
  *
539
943
  */
540
- submitMarginOrder(params: SubmitMarginOrderRequest): Promise<APISuccessResponse<SubmitMarginOrderResponse>>;
541
- submitMarginOrderTest(): Promise<any>;
542
944
  /**
945
+ * Borrow
543
946
  *
544
- * REST - MARGIN TRADING - Margin info
545
- *
947
+ * This API endpoint is used to initiate an application for cross or isolated margin borrowing.
546
948
  */
547
- getMarginLeveragedToken(params?: {
548
- currency?: string;
549
- }): Promise<APISuccessResponse<MarginLevTokenInfo[]>>;
550
- getMarginMarkPrices(): Promise<APISuccessResponse<MarginMarkPrice[]>>;
551
- getMarginMarkPrice(params: {
552
- symbol: string;
553
- }): Promise<APISuccessResponse<MarginMarkPrice>>;
554
- getMarginConfigInfo(): Promise<APISuccessResponse<MarginConfigInfo>>;
555
- getMarginRiskLimitConfig(params: MarginRiskLimitRequest): Promise<APISuccessResponse<MarginRiskLimit[]>>;
949
+ marginBorrowV3(params: MarginBorrowV3Request): Promise<APISuccessResponse<MarginOrderV3>>;
556
950
  /**
951
+ * Get Borrow History
557
952
  *
558
- * REST - MARGIN TRADING - Isolated Margin
559
- *
953
+ * This API endpoint is used to get the borrowing orders for cross and isolated margin accounts
560
954
  */
561
- getIsolatedMarginSymbolsConfig(): Promise<APISuccessResponse<IsolatedMarginSymbolsConfig[]>>;
562
- getIsolatedMarginAccounts(params?: {
563
- balanceCurrency?: 'USDT' | 'KCS' | 'BTC';
564
- }): Promise<APISuccessResponse<IsolatedMarginAccountInfo>>;
565
- getIsolatedMarginAccount(params: {
566
- symbol: string;
567
- }): Promise<APISuccessResponse<SingleIsolatedMarginAccountInfo>>;
955
+ getMarginBorrowHistoryV3(params: MarginHistoryV3Request): Promise<APISuccessResponse<MarginHistoryRecord[]>>;
568
956
  /**
957
+ * Repay
569
958
  *
570
- * REST - MARGIN TRADING - Margin trading(v3)
571
- *
959
+ * This API endpoint is used to initiate an application for cross or isolated margin repayment.
572
960
  */
573
- marginBorrowV3(params: MarginBorrowV3Request): Promise<APISuccessResponse<MarginOrderV3>>;
574
961
  marginRepayV3(params: MarginRepayV3Request): Promise<APISuccessResponse<MarginOrderV3>>;
575
- getMarginBorrowHistoryV3(params: MarginHistoryV3Request): Promise<APISuccessResponse<MarginHistoryRecord[]>>;
962
+ /**
963
+ * Get Repay History
964
+ *
965
+ * This API endpoint is used to get the repayment orders for cross and isolated margin accounts
966
+ */
576
967
  getMarginRepayHistoryV3(params: MarginHistoryV3Request): Promise<APISuccessResponse<MarginHistoryRecord[]>>;
968
+ /**
969
+ * Get Interest History
970
+ *
971
+ * Request via this endpoint to get the interest records of the cross/isolated margin lending.
972
+ */
577
973
  getMarginInterestRecordsV3(params?: MarginInterestRecordsRequest): Promise<APISuccessResponse<MarginInterestRecords>>;
578
- getMarginActivePairsV3(params?: {
579
- symbol?: string;
580
- }): Promise<APISuccessResponse<{
581
- timestamp: number;
582
- items: any[];
583
- }>>;
974
+ /**
975
+ * Modify Leverage
976
+ *
977
+ * This endpoint allows modifying the leverage multiplier for cross margin or isolated margin.
978
+ */
584
979
  updateMarginLeverageV3(params: {
585
980
  symbol?: string;
586
981
  leverage: string;
@@ -588,56 +983,102 @@ export declare class SpotClient extends BaseRestClient {
588
983
  }): Promise<APISuccessResponse<any>>;
589
984
  /**
590
985
  *
591
- * REST - MARGIN TRADING - Lending market(v3)
986
+ * REST - MARGIN TRADING - Credit
592
987
  *
593
988
  */
989
+ /**
990
+ * Get Loan Market
991
+ *
992
+ * This API endpoint is used to get the information about the currencies available for lending.
993
+ */
594
994
  getLendingCurrencyV3(params?: {
595
995
  currency?: string;
596
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
+ */
597
1002
  getLendingInterestRateV3(params: {
598
1003
  currency: string;
599
1004
  }): Promise<APISuccessResponse<{
600
1005
  time: string;
601
1006
  marketInterestRate: string;
602
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
+ */
603
1013
  submitLendingSubscriptionV3(params: InitiateLendingSubscriptionV3Request): Promise<APISuccessResponse<{
604
1014
  orderNo: string;
605
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
+ */
606
1033
  submitLendingRedemptionV3(params: InitiateLendingRedemptionV3Request): Promise<APISuccessResponse<{
607
1034
  orderNo: string;
608
1035
  }[]>>;
609
- updateLendingSubscriptionOrdersV3(params: ModifyLendingSubscriptionOrdersV3Request): Promise<any>;
1036
+ /**
1037
+ * Get Redeem Orders
1038
+ *
1039
+ * This API endpoint provides pagination query for the redeem orders.
1040
+ */
610
1041
  getLendingRedemptionOrdersV3(params: GetLendingRedemptionOrdersV3Request): Promise<APISuccessResponse<LendingRedemption>>;
611
- getLendingSubscriptionOrdersV3(params: GetLendingSubscriptionOrdersV3Request): Promise<APISuccessResponse<LendingRedemption>>;
612
1042
  /**
613
1043
  *
614
- * REST - EARN -General
1044
+ * REST - MARGIN TRADING - Risk Limit
615
1045
  *
616
1046
  */
617
1047
  /**
618
- * Subscribe to Earn Fixed Income Products
1048
+ * Get Margin Risk Limit
619
1049
  *
620
- * This endpoint allows subscribing to fixed income products.
621
- * 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.
622
1051
  */
623
- subscribeEarnFixedIncome(params: SubscribeEarnFixedIncomeRequest): Promise<APISuccessResponse<SubscribeEarnFixedIncomeResponse>>;
1052
+ getMarginRiskLimitConfig(params: MarginRiskLimitRequest): Promise<APISuccessResponse<MarginRiskLimit[]>>;
624
1053
  /**
625
- * Initiate redemption by holding ID
626
1054
  *
627
- * 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.
1055
+ * REST - COPY TRADING
1056
+ *
628
1057
  */
629
- submitRedemption(params: InitiateRedemptionRequest): Promise<APISuccessResponse<InitiateRedemptionResponse>>;
630
1058
  /**
631
- * Get Earn Redeem Preview by Holding ID
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
632
1072
  *
633
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.
634
1074
  */
635
1075
  getEarnRedeemPreview(params: GetEarnRedeemPreviewRequest): Promise<APISuccessResponse<GetEarnRedeemPreviewResponse>>;
636
1076
  /**
1077
+ * Earn Redeem
637
1078
  *
638
- * REST - EARN -KUCOIN EARN
639
- *
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.
640
1080
  */
1081
+ submitRedemption(params: InitiateRedemptionRequest): Promise<APISuccessResponse<InitiateRedemptionResponse>>;
641
1082
  /**
642
1083
  * Get Earn Savings Products
643
1084
  *
@@ -646,12 +1087,6 @@ export declare class SpotClient extends BaseRestClient {
646
1087
  getEarnSavingsProducts(params?: {
647
1088
  currency?: string;
648
1089
  }): Promise<APISuccessResponse<EarnProduct[]>>;
649
- /**
650
- * Get Earn Fixed Income Current Holdings
651
- *
652
- * This endpoint retrieves current holding assets of fixed income products. If no current holding assets are available, an empty list is returned.
653
- */
654
- getEarnFixedIncomeHoldAssets(params?: GetEarnFixedIncomeHoldAssetsRequest): Promise<APISuccessResponse<EarnFixedIncomeHoldAssets>>;
655
1090
  /**
656
1091
  * Get Earn Limited-Time Promotion Products
657
1092
  *
@@ -661,25 +1096,26 @@ export declare class SpotClient extends BaseRestClient {
661
1096
  currency?: string;
662
1097
  }): Promise<APISuccessResponse<EarnProduct[]>>;
663
1098
  /**
1099
+ * Get Earn Account Holdings
664
1100
  *
665
- * REST - EARN - Staking
666
- *
1101
+ * This endpoint retrieves current holding assets of fixed income products. If no current holding assets are available, an empty list is returned.
667
1102
  */
1103
+ getEarnFixedIncomeHoldAssets(params?: GetEarnFixedIncomeHoldAssetsRequest): Promise<APISuccessResponse<EarnFixedIncomeHoldAssets>>;
668
1104
  /**
669
- * Get Earn KCS Staking Products
670
- *
671
- * This endpoint retrieves KCS Staking products. If no KCS Staking products are available, an empty list is returned.
1105
+ * Get Earn Staking Products
672
1106
  *
1107
+ * This endpoint retrieves staking products. If no staking products are available, an empty list is returned.
673
1108
  */
674
- getEarnKcsStakingProducts(params?: {
1109
+ getEarnStakingProducts(params?: {
675
1110
  currency?: string;
676
1111
  }): Promise<APISuccessResponse<EarnProduct[]>>;
677
1112
  /**
678
- * 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.
679
1116
  *
680
- * This endpoint retrieves staking products. If no staking products are available, an empty list is returned.
681
1117
  */
682
- getEarnStakingProducts(params?: {
1118
+ getEarnKcsStakingProducts(params?: {
683
1119
  currency?: string;
684
1120
  }): Promise<APISuccessResponse<EarnProduct[]>>;
685
1121
  /**
@@ -692,18 +1128,20 @@ export declare class SpotClient extends BaseRestClient {
692
1128
  /**
693
1129
  *
694
1130
  * REST - VIP LENDING
1131
+ *
695
1132
  */
696
1133
  /**
697
- * Get information on off-exchange funding and loans
1134
+ * Get Account Detail - VIP Lending
698
1135
  *
1136
+ * The following information is only applicable to loans.
1137
+ * Get information on off-exchange funding and loans.
699
1138
  * This endpoint is only for querying accounts that are currently involved in loans.
700
- *
701
1139
  */
702
1140
  getOtcLoan(): Promise<APISuccessResponse<OtcLoan>>;
703
1141
  /**
704
- * Get information on accounts involved in off-exchange loans
1142
+ * Get Accounts - VIP Lending
705
1143
  *
706
- * This endpoint is only for querying accounts that are currently involved in off-exchange funding and loans.
1144
+ * Accounts participating in OTC lending, This interface is only for querying accounts currently running OTC lending.
707
1145
  */
708
1146
  getOtcLoanAccounts(): Promise<APISuccessResponse<OtcLoanAccount[]>>;
709
1147
  /**
@@ -715,15 +1153,17 @@ export declare class SpotClient extends BaseRestClient {
715
1153
  * Get Affiliate User Rebate Information
716
1154
  *
717
1155
  * This endpoint allows getting affiliate user rebate information.
718
- *
719
- * @param params - The parameters for the request
720
- * @returns A promise that resolves to the affiliate user rebate information
721
1156
  */
722
1157
  getAffiliateUserRebateInfo(params: {
723
1158
  date: string;
724
1159
  maxCount?: number;
725
1160
  offset: string;
726
1161
  }): Promise<APISuccessResponse<any>>;
1162
+ /**
1163
+ *
1164
+ * REST - BROKER
1165
+ *
1166
+ */
727
1167
  /**
728
1168
  * Get download link for broker rebate orders
729
1169
  *
@@ -741,4 +1181,229 @@ export declare class SpotClient extends BaseRestClient {
741
1181
  */
742
1182
  getPublicWSConnectionToken(): Promise<APISuccessResponse<WsConnectionInfo>>;
743
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>>;
744
1409
  }