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