kucoin-api 2.5.0 → 2.5.2

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.
@@ -174,6 +174,12 @@ export interface GetCurrentFundingRateResponseUTA {
174
174
  fundingTime: number;
175
175
  fundingRateCap: number;
176
176
  fundingRateFloor: number;
177
+ /** Current funding settlement interval (ms); as of 2026.04.19 */
178
+ currentGranularity: number;
179
+ /** New interval after change (ms); as of 2026.04.19 */
180
+ newGranularity: number;
181
+ /** When newGranularity takes effect (ms); as of 2026.04.19 */
182
+ newGranularityStartTime: number;
177
183
  }
178
184
  export interface FundingRateHistoryItemUTA {
179
185
  fundingRate: number;
@@ -183,6 +189,43 @@ export interface GetHistoryFundingRateResponseUTA {
183
189
  symbol: string;
184
190
  list: FundingRateHistoryItemUTA[];
185
191
  }
192
+ export interface ModifyMarginCrossLeverageResponseUTA {
193
+ currency?: string;
194
+ leverage?: string;
195
+ }
196
+ /** One row from Get Leverage (UTA) — margin uses currency, futures uses symbol */
197
+ export interface GetLeverageItemUTA {
198
+ leverage: string;
199
+ marginMode: string;
200
+ currency?: string;
201
+ symbol?: string;
202
+ }
203
+ export interface PrivateFundingFeeHistoryItemUTA {
204
+ symbol: string;
205
+ marginMode: 'CROSS' | 'ISOLATED';
206
+ fundingRate: string;
207
+ markPrice: string;
208
+ size: string;
209
+ positionValue: string;
210
+ fundingFee: string;
211
+ settleCurrency: string;
212
+ settlementTime: number;
213
+ }
214
+ export interface GetPrivateFundingFeeHistoryResponseUTA {
215
+ lastId: number;
216
+ items: PrivateFundingFeeHistoryItemUTA[];
217
+ }
218
+ export interface GetBorrowingRatesAndLimitsResponseUTA {
219
+ currentRateHourly: string;
220
+ currentRateDaily: string;
221
+ borrowLimitTotal: string;
222
+ borrowLimitTotalHold: string;
223
+ borrowLimitHold: string;
224
+ interestFreeBorrowLimit: string;
225
+ }
226
+ export interface BorrowableCurrencyUTA {
227
+ currency: string;
228
+ }
186
229
  export interface GetCrossMarginConfigResponseUTA {
187
230
  maxLeverage: number;
188
231
  alertRiskRatio: string;
@@ -203,6 +246,8 @@ export interface AccountCurrencyUTA {
203
246
  available: string;
204
247
  balance: string;
205
248
  equity: string;
249
+ /** Potential borrow reserved by open orders (UTA; as of 2026.04.19) */
250
+ potentialBorrow?: string;
206
251
  liability?: string;
207
252
  totalCrossMargin?: string;
208
253
  crossPosMargin?: string;
@@ -321,7 +366,7 @@ export interface DepositAddressUTA {
321
366
  * Order Response Types
322
367
  */
323
368
  export interface PlaceOrderResponseUTA {
324
- tradeType: 'SPOT' | 'FUTURES' | 'ISOLATED' | 'CROSS';
369
+ tradeType: 'SPOT' | 'FUTURES' | 'ISOLATED' | 'CROSS' | 'MARGIN';
325
370
  orderId: string;
326
371
  clientOid: string;
327
372
  /** Timestamp when system completes order request in nanoseconds. Classic mode not supported */
@@ -339,11 +384,11 @@ export interface BatchPlaceOrderItemResponseUTA {
339
384
  msg?: string;
340
385
  }
341
386
  export interface BatchPlaceOrderResponseUTA {
342
- tradeType: 'SPOT' | 'FUTURES' | 'ISOLATED' | 'CROSS';
387
+ tradeType: 'SPOT' | 'FUTURES' | 'ISOLATED' | 'CROSS' | 'MARGIN';
343
388
  items: BatchPlaceOrderItemResponseUTA[];
344
389
  }
345
390
  export interface OrderDetailsUTA {
346
- tradeType: 'SPOT' | 'FUTURES' | 'ISOLATED' | 'CROSS';
391
+ tradeType: 'SPOT' | 'FUTURES' | 'ISOLATED' | 'CROSS' | 'MARGIN';
347
392
  orderId: string;
348
393
  clientOid: string;
349
394
  /**
@@ -404,12 +449,12 @@ export interface GetOpenOrderListResponseUTA {
404
449
  pageSize?: number;
405
450
  totalNum?: number;
406
451
  totalPage?: number;
407
- tradeType: 'SPOT' | 'FUTURES' | 'ISOLATED' | 'CROSS';
452
+ tradeType: 'SPOT' | 'FUTURES' | 'ISOLATED' | 'CROSS' | 'MARGIN';
408
453
  items: OrderDetailsUTA[];
409
454
  }
410
455
  export interface GetOrderHistoryResponseUTA {
411
456
  lastId: number;
412
- tradeType: 'SPOT' | 'FUTURES' | 'ISOLATED' | 'CROSS';
457
+ tradeType: 'SPOT' | 'FUTURES' | 'ISOLATED' | 'CROSS' | 'MARGIN';
413
458
  items: OrderDetailsUTA[];
414
459
  }
415
460
  export interface TradeHistoryItemUTA {
@@ -435,11 +480,11 @@ export interface TradeHistoryItemUTA {
435
480
  }
436
481
  export interface GetTradeHistoryResponseUTA {
437
482
  lastId: number;
438
- tradeType: 'SPOT' | 'FUTURES' | 'ISOLATED' | 'CROSS';
483
+ tradeType: 'SPOT' | 'FUTURES' | 'ISOLATED' | 'CROSS' | 'MARGIN';
439
484
  items: TradeHistoryItemUTA[];
440
485
  }
441
486
  export interface CancelOrderResponseUTA {
442
- tradeType: 'SPOT' | 'FUTURES' | 'ISOLATED' | 'CROSS';
487
+ tradeType: 'SPOT' | 'FUTURES' | 'ISOLATED' | 'CROSS' | 'MARGIN';
443
488
  orderId?: string;
444
489
  clientOid?: string;
445
490
  /** Timestamp when system completes order cancellation request (nanoseconds). Only for unified accounts */
@@ -454,9 +499,26 @@ export interface BatchCancelOrderItemResponseUTA {
454
499
  ts?: number;
455
500
  }
456
501
  export interface BatchCancelOrdersResponseUTA {
457
- tradeType: 'SPOT' | 'FUTURES' | 'ISOLATED' | 'CROSS';
502
+ tradeType: 'SPOT' | 'FUTURES' | 'ISOLATED' | 'CROSS' | 'MARGIN';
458
503
  items: BatchCancelOrderItemResponseUTA[];
459
504
  }
505
+ /** Batch cancel by symbol - Classic response (orderId list) */
506
+ export interface BatchCancelOrdersBySymbolItemClassicUTA {
507
+ orderId: string;
508
+ }
509
+ /** Batch cancel by symbol - UTA response (full result per order) */
510
+ export interface BatchCancelOrdersBySymbolItemUTA {
511
+ code?: string;
512
+ msg?: string;
513
+ orderId?: string;
514
+ ts?: number;
515
+ clientOid?: string | null;
516
+ }
517
+ export interface BatchCancelOrdersBySymbolResponseUTA {
518
+ tradeType: 'SPOT' | 'FUTURES' | 'MARGIN';
519
+ ts?: number;
520
+ items: BatchCancelOrdersBySymbolItemClassicUTA[] | BatchCancelOrdersBySymbolItemUTA[];
521
+ }
460
522
  export interface DCPResponseUTA {
461
523
  tradeType: 'SPOT' | 'FUTURES' | 'MARGIN';
462
524
  symbol: string[];
@@ -482,6 +544,8 @@ export interface PositionUTA {
482
544
  maintenanceMargin: string;
483
545
  /** Timestamp when position was first opened (nanoseconds, standardized as of 2026.01.12) */
484
546
  creationTime: number;
547
+ /** Estimated liquidation price (as of 2026.04.09) */
548
+ liquidationPrice: string;
485
549
  }
486
550
  export interface PositionHistoryItemUTA {
487
551
  closeId: string;
@@ -506,6 +570,19 @@ export interface GetPositionsHistoryResponseUTA {
506
570
  items: PositionHistoryItemUTA[];
507
571
  lastId?: number;
508
572
  }
573
+ /** Row from Get Third-Party Custody Currencies */
574
+ export interface ThirdPartyCustodyCurrencyUTA {
575
+ custodian: string;
576
+ currency: string;
577
+ precision: number;
578
+ }
579
+ /** Row from Get Third-Party Custody Account Currency Limits */
580
+ export interface ThirdPartyCustodyQuotaUTA {
581
+ custodian: string;
582
+ currency: string;
583
+ /** Remaining custodial quota (shared across custodian sub-accounts under master) */
584
+ custodyQuota: string;
585
+ }
509
586
  export interface PositionTierUTA {
510
587
  symbol: string;
511
588
  tier: number;