kucoin-api 2.5.2 → 2.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/cjs/BrokerClient.d.ts +23 -2
- package/dist/cjs/BrokerClient.js +23 -0
- package/dist/cjs/BrokerClient.js.map +1 -1
- package/dist/cjs/FuturesClient.d.ts +1 -0
- package/dist/cjs/FuturesClient.js +1 -0
- package/dist/cjs/FuturesClient.js.map +1 -1
- package/dist/cjs/SpotClient.d.ts +1 -0
- package/dist/cjs/SpotClient.js +1 -0
- package/dist/cjs/SpotClient.js.map +1 -1
- package/dist/cjs/UnifiedAPIClient.d.ts +58 -5
- package/dist/cjs/UnifiedAPIClient.js +83 -4
- package/dist/cjs/UnifiedAPIClient.js.map +1 -1
- package/dist/cjs/lib/BaseRestClient.d.ts +2 -2
- package/dist/cjs/lib/BaseRestClient.js +8 -11
- package/dist/cjs/lib/BaseRestClient.js.map +1 -1
- package/dist/cjs/lib/requestUtils.d.ts +8 -0
- package/dist/cjs/lib/requestUtils.js +33 -0
- package/dist/cjs/lib/requestUtils.js.map +1 -1
- package/dist/cjs/types/request/broker.types.d.ts +32 -1
- package/dist/cjs/types/request/uta-types.d.ts +43 -0
- package/dist/cjs/types/response/broker.types.d.ts +15 -1
- package/dist/cjs/types/response/futures.types.d.ts +1 -1
- package/dist/cjs/types/response/uta-types.d.ts +82 -2
- package/dist/mjs/BrokerClient.d.ts +23 -2
- package/dist/mjs/BrokerClient.js +23 -0
- package/dist/mjs/BrokerClient.js.map +1 -1
- package/dist/mjs/FuturesClient.d.ts +1 -0
- package/dist/mjs/FuturesClient.js +1 -0
- package/dist/mjs/FuturesClient.js.map +1 -1
- package/dist/mjs/SpotClient.d.ts +1 -0
- package/dist/mjs/SpotClient.js +1 -0
- package/dist/mjs/SpotClient.js.map +1 -1
- package/dist/mjs/UnifiedAPIClient.d.ts +58 -5
- package/dist/mjs/UnifiedAPIClient.js +84 -5
- package/dist/mjs/UnifiedAPIClient.js.map +1 -1
- package/dist/mjs/lib/BaseRestClient.d.ts +2 -2
- package/dist/mjs/lib/BaseRestClient.js +9 -12
- package/dist/mjs/lib/BaseRestClient.js.map +1 -1
- package/dist/mjs/lib/requestUtils.d.ts +8 -0
- package/dist/mjs/lib/requestUtils.js +31 -0
- package/dist/mjs/lib/requestUtils.js.map +1 -1
- package/dist/mjs/types/request/broker.types.d.ts +32 -1
- package/dist/mjs/types/request/uta-types.d.ts +43 -0
- package/dist/mjs/types/response/broker.types.d.ts +15 -1
- package/dist/mjs/types/response/futures.types.d.ts +1 -1
- package/dist/mjs/types/response/uta-types.d.ts +82 -2
- package/llms.txt +9889 -9619
- package/package.json +4 -6
|
@@ -44,9 +44,40 @@ export interface BrokerTransferRequest {
|
|
|
44
44
|
}
|
|
45
45
|
export interface GetBrokerDepositListRequest {
|
|
46
46
|
currency?: string;
|
|
47
|
-
status?: 'PROCESSING' | 'SUCCESS' | 'FAILURE';
|
|
47
|
+
status?: 'PROCESSING' | 'SUCCESS' | 'FAILURE' | 'PRE_SUCCESS' | 'WAIT_TRM_MGT' | 'TRM_MGT_REJECTED' | 'ROLLBACKING' | 'ROLLBACK' | 'WAIT_RISK_MGT' | 'RISK_MGT_REJECTED';
|
|
48
48
|
hash?: string;
|
|
49
49
|
startTimestamp?: number;
|
|
50
50
|
endTimestamp?: number;
|
|
51
51
|
limit?: number;
|
|
52
52
|
}
|
|
53
|
+
export interface FastApiWithdrawValidationFactor {
|
|
54
|
+
factorType: string;
|
|
55
|
+
factorValue: string;
|
|
56
|
+
}
|
|
57
|
+
export interface FastApiWithdrawValidation {
|
|
58
|
+
factors: FastApiWithdrawValidationFactor[];
|
|
59
|
+
transactionId: string;
|
|
60
|
+
}
|
|
61
|
+
export interface FastApiWithdrawApplyRequest {
|
|
62
|
+
address: string;
|
|
63
|
+
amount: number;
|
|
64
|
+
currency: string;
|
|
65
|
+
memo: string;
|
|
66
|
+
remark: string;
|
|
67
|
+
chain?: string;
|
|
68
|
+
feeDeductType?: 'EXTERNAL' | 'INTERNAL';
|
|
69
|
+
isInner?: boolean;
|
|
70
|
+
wallet?: string;
|
|
71
|
+
withdrawType?: 'ADDRESS' | 'MAIL' | 'PHONE' | 'UID';
|
|
72
|
+
validation?: FastApiWithdrawValidation;
|
|
73
|
+
tin?: string;
|
|
74
|
+
country?: string;
|
|
75
|
+
lastName?: string;
|
|
76
|
+
firstName?: string;
|
|
77
|
+
identityNo?: string;
|
|
78
|
+
companyName?: string;
|
|
79
|
+
identityType?: string;
|
|
80
|
+
receiverType?: 'COMPANY' | 'INDIVIDUAL';
|
|
81
|
+
questionnaire?: string;
|
|
82
|
+
reasonOfTransfer?: string;
|
|
83
|
+
}
|
|
@@ -138,6 +138,35 @@ export interface GetDepositAddressRequestUTA {
|
|
|
138
138
|
currency: string;
|
|
139
139
|
chain?: string;
|
|
140
140
|
}
|
|
141
|
+
export interface GetWithdrawalQuotasRequestUTA {
|
|
142
|
+
currency: string;
|
|
143
|
+
chainId?: string;
|
|
144
|
+
}
|
|
145
|
+
export interface SubmitWithdrawRequestUTA {
|
|
146
|
+
currency: string;
|
|
147
|
+
toAddress: string;
|
|
148
|
+
amount: string;
|
|
149
|
+
withdrawType: 'ADDRESS' | 'UID' | 'MAIL' | 'PHONE';
|
|
150
|
+
chainId?: string;
|
|
151
|
+
memo?: string;
|
|
152
|
+
isInner?: boolean;
|
|
153
|
+
remark?: string;
|
|
154
|
+
feeDeductType?: 'INTERNAL' | 'EXTERNAL';
|
|
155
|
+
}
|
|
156
|
+
export interface AddSubAccountRequestUTA {
|
|
157
|
+
password: string;
|
|
158
|
+
subName: string;
|
|
159
|
+
access: 'Spot' | 'Futures' | 'Margin' | string;
|
|
160
|
+
remarks?: string;
|
|
161
|
+
}
|
|
162
|
+
export interface AddSubAccountApiRequestUTA {
|
|
163
|
+
subName: string;
|
|
164
|
+
passphrase: string;
|
|
165
|
+
remark: string;
|
|
166
|
+
permission?: string;
|
|
167
|
+
ipWhitelist?: string;
|
|
168
|
+
expire?: '-1' | '30' | '90' | '180' | '360';
|
|
169
|
+
}
|
|
141
170
|
/**
|
|
142
171
|
* Order Endpoints
|
|
143
172
|
*/
|
|
@@ -176,6 +205,8 @@ export interface PlaceOrderRequestUTA {
|
|
|
176
205
|
tpTriggerPriceType?: 'TP' | 'IP' | 'MP';
|
|
177
206
|
slTriggerPrice?: string;
|
|
178
207
|
slTriggerPriceType?: 'TP' | 'IP' | 'MP';
|
|
208
|
+
/** Close position for symbol; ignores side/size and cancels pending close orders. Default false */
|
|
209
|
+
closeOrder?: boolean;
|
|
179
210
|
}
|
|
180
211
|
export interface BatchPlaceOrderRequestUTA {
|
|
181
212
|
tradeType: 'SPOT' | 'FUTURES' | 'ISOLATED' | 'CROSS' | 'MARGIN';
|
|
@@ -255,6 +286,18 @@ export interface GetPositionListRequestUTA {
|
|
|
255
286
|
pageNumber?: number;
|
|
256
287
|
pageSize?: number;
|
|
257
288
|
}
|
|
289
|
+
export interface BatchModifyMarginModeRequestUTA {
|
|
290
|
+
/** Trading pair symbol(s), comma-separated for batch */
|
|
291
|
+
symbol: string;
|
|
292
|
+
marginMode: 'CROSS' | 'ISOLATED';
|
|
293
|
+
}
|
|
294
|
+
export interface ModifyIsolatedFuturesMarginRequestUTA {
|
|
295
|
+
type: 'DEPOSIT' | 'WITHDRAW';
|
|
296
|
+
amount: string;
|
|
297
|
+
symbol: string;
|
|
298
|
+
tradeType: 'FUTURES' | 'MARGIN';
|
|
299
|
+
positionSide?: 'LONG' | 'SHORT' | 'BOTH';
|
|
300
|
+
}
|
|
258
301
|
/** Third-party custody (OES) custodian codes */
|
|
259
302
|
export type ThirdPartyCustodyCustodianUTA = 'BITGO_SG' | 'BITGO_SD' | 'CACTUS' | 'CEFFU';
|
|
260
303
|
/**
|
|
@@ -43,6 +43,7 @@ export interface BrokerSubAccountApi {
|
|
|
43
43
|
}
|
|
44
44
|
export type BrokerTransferAccountType = 'MAIN' | 'TRADE' | 'CONTRACT' | 'MARGIN' | 'ISOLATED';
|
|
45
45
|
export type BrokerTransferStatus = 'PROCESSING' | 'SUCCESS' | 'FAILURE';
|
|
46
|
+
export type BrokerDepositStatus = 'PROCESSING' | 'SUCCESS' | 'FAILURE' | 'PRE_SUCCESS' | 'WAIT_TRM_MGT' | 'TRM_MGT_REJECTED' | 'ROLLBACKING' | 'ROLLBACK' | 'WAIT_RISK_MGT' | 'RISK_MGT_REJECTED';
|
|
46
47
|
export interface BrokerTransferHistory {
|
|
47
48
|
orderId: string;
|
|
48
49
|
currency: string;
|
|
@@ -67,12 +68,25 @@ export interface BrokerDepositRecord {
|
|
|
67
68
|
currency: string;
|
|
68
69
|
isInner: boolean;
|
|
69
70
|
walletTxId: string;
|
|
70
|
-
status:
|
|
71
|
+
status: BrokerDepositStatus;
|
|
71
72
|
remark: string;
|
|
72
73
|
chain: string;
|
|
73
74
|
createdAt: number;
|
|
74
75
|
updatedAt: number;
|
|
76
|
+
statusRemark?: string;
|
|
77
|
+
preConfirms?: number;
|
|
78
|
+
confirms?: number;
|
|
79
|
+
currentConfirms?: number;
|
|
80
|
+
}
|
|
81
|
+
export interface FastApiWithdrawApplyInitialResponse {
|
|
82
|
+
transactionId: string;
|
|
83
|
+
allFactors: string[][];
|
|
84
|
+
sentFactors: string[][];
|
|
85
|
+
}
|
|
86
|
+
export interface FastApiWithdrawApplyCompleteResponse {
|
|
87
|
+
withdrawalId: string;
|
|
75
88
|
}
|
|
89
|
+
export type FastApiWithdrawApplyResponse = FastApiWithdrawApplyInitialResponse | FastApiWithdrawApplyCompleteResponse;
|
|
76
90
|
export type BrokerWithdrawalStatus = 'PROCESSING' | 'WALLET_PROCESSING' | 'REVIEW' | 'SUCCESS' | 'FAILURE';
|
|
77
91
|
export interface BrokerWithdrawalRecord {
|
|
78
92
|
id: string;
|
|
@@ -362,7 +362,7 @@ export interface FuturesFill {
|
|
|
362
362
|
settleCurrency: string;
|
|
363
363
|
orderType: 'market' | 'limit';
|
|
364
364
|
displayType: 'limit' | 'market' | 'limit_stop' | 'market_stop';
|
|
365
|
-
tradeType: 'trade' | '
|
|
365
|
+
tradeType: 'trade' | 'liquid' | 'adl' | 'settlement';
|
|
366
366
|
subTradeType: string | null;
|
|
367
367
|
/** Trade time (execution time), standardized to nanoseconds as of 2026.01.12 */
|
|
368
368
|
tradeTime: number;
|
|
@@ -296,7 +296,7 @@ export interface GetSubAccountResponseUTA {
|
|
|
296
296
|
export interface GetTransferQuotasResponseUTA {
|
|
297
297
|
currency: string;
|
|
298
298
|
transferable: string;
|
|
299
|
-
accountType:
|
|
299
|
+
accountType: 'FUNDING' | 'SPOT' | 'FUTURES' | 'ISOLATED' | 'UNIFIED';
|
|
300
300
|
}
|
|
301
301
|
export interface FlexTransferResponseUTA {
|
|
302
302
|
orderId: string;
|
|
@@ -326,6 +326,7 @@ export interface AccountLedgerItemUTA {
|
|
|
326
326
|
currency: string;
|
|
327
327
|
direction: 'IN' | 'OUT';
|
|
328
328
|
businessType: string;
|
|
329
|
+
/** Change in funds balance. Always positive as of 2026.04.28; use direction (IN/OUT) for flow. */
|
|
329
330
|
amount: string;
|
|
330
331
|
balance: string;
|
|
331
332
|
fee: string;
|
|
@@ -355,13 +356,73 @@ export interface DepositAddressUTA {
|
|
|
355
356
|
address: string;
|
|
356
357
|
memo: string;
|
|
357
358
|
chainId: string;
|
|
358
|
-
to: '
|
|
359
|
+
to: 'FUNDING' | 'SPOT' | 'UNIFIED';
|
|
359
360
|
currency: string;
|
|
360
361
|
contractAddress: string;
|
|
361
362
|
chainName: string;
|
|
362
363
|
expirationDate: string;
|
|
363
364
|
remark: string;
|
|
364
365
|
}
|
|
366
|
+
export interface WithdrawalQuotasUTA {
|
|
367
|
+
currency: string;
|
|
368
|
+
limitBTCAmount: string;
|
|
369
|
+
usedBTCAmount: string;
|
|
370
|
+
quotaCurrency: string;
|
|
371
|
+
limitQuotaCurrencyAmount: string;
|
|
372
|
+
usedQuotaCurrencyAmount: string;
|
|
373
|
+
remainAmount: string;
|
|
374
|
+
availableAmount: string;
|
|
375
|
+
withdrawMinFee: string;
|
|
376
|
+
innerWithdrawMinFee: string;
|
|
377
|
+
withdrawMinSize: string;
|
|
378
|
+
isWithdrawEnabled: boolean;
|
|
379
|
+
precision: number;
|
|
380
|
+
reason: string | null;
|
|
381
|
+
lockedAmount: string;
|
|
382
|
+
chainId: string;
|
|
383
|
+
chainName: string;
|
|
384
|
+
}
|
|
385
|
+
export interface SubmitWithdrawResponseUTA {
|
|
386
|
+
withdrawalId: string;
|
|
387
|
+
}
|
|
388
|
+
export interface AddSubAccountResponseUTA {
|
|
389
|
+
uid: number;
|
|
390
|
+
subName: string;
|
|
391
|
+
remarks: string;
|
|
392
|
+
access: string;
|
|
393
|
+
}
|
|
394
|
+
export interface AddSubAccountApiResponseUTA {
|
|
395
|
+
subName: string;
|
|
396
|
+
remark: string;
|
|
397
|
+
apiKey: string;
|
|
398
|
+
apiSecret: string;
|
|
399
|
+
apiVersion: number;
|
|
400
|
+
passphrase: string;
|
|
401
|
+
permission: string;
|
|
402
|
+
ipWhitelist?: string;
|
|
403
|
+
createdAt: number;
|
|
404
|
+
}
|
|
405
|
+
export interface KYCRegionUTA {
|
|
406
|
+
code: string;
|
|
407
|
+
enName: string;
|
|
408
|
+
}
|
|
409
|
+
export interface ApiKeyInfoUTA {
|
|
410
|
+
uid: number;
|
|
411
|
+
parentUid?: number;
|
|
412
|
+
region: string;
|
|
413
|
+
kycStatus: 0 | 1;
|
|
414
|
+
subName?: string;
|
|
415
|
+
remark: string;
|
|
416
|
+
apiKey: string;
|
|
417
|
+
apiVersion: number;
|
|
418
|
+
permission: string;
|
|
419
|
+
ipWhitelist?: string;
|
|
420
|
+
isMaster: boolean;
|
|
421
|
+
createdAt: number;
|
|
422
|
+
expiredAt?: number | null;
|
|
423
|
+
thirdPartyApp?: string;
|
|
424
|
+
siteType?: 'global' | 'turkey' | 'australia' | 'europe' | 'thailand';
|
|
425
|
+
}
|
|
365
426
|
/**
|
|
366
427
|
* Order Response Types
|
|
367
428
|
*/
|
|
@@ -535,6 +596,8 @@ export interface PositionUTA {
|
|
|
535
596
|
size: string;
|
|
536
597
|
entryPrice: string;
|
|
537
598
|
positionValue: string;
|
|
599
|
+
/** Margin occupied by the futures position */
|
|
600
|
+
positionMargin: string;
|
|
538
601
|
markPrice: string;
|
|
539
602
|
leverage: string;
|
|
540
603
|
unrealizedPnL: string;
|
|
@@ -546,6 +609,10 @@ export interface PositionUTA {
|
|
|
546
609
|
creationTime: number;
|
|
547
610
|
/** Estimated liquidation price (as of 2026.04.09) */
|
|
548
611
|
liquidationPrice: string;
|
|
612
|
+
/** ADL ranking percentile (0.12 = 12%). Added 2026.05.15 */
|
|
613
|
+
adlPercentage: string;
|
|
614
|
+
/** Isolated futures risk ratio (0.65 = 65%). Empty for cross margin positions */
|
|
615
|
+
riskRatio: string;
|
|
549
616
|
}
|
|
550
617
|
export interface PositionHistoryItemUTA {
|
|
551
618
|
closeId: string;
|
|
@@ -592,3 +659,16 @@ export interface PositionTierUTA {
|
|
|
592
659
|
initialMarginRate: string;
|
|
593
660
|
maintainMarginRate: string;
|
|
594
661
|
}
|
|
662
|
+
export interface BatchModifyMarginModeItemUTA {
|
|
663
|
+
symbol: string;
|
|
664
|
+
marginMode: string;
|
|
665
|
+
code: string;
|
|
666
|
+
msg: string;
|
|
667
|
+
}
|
|
668
|
+
export interface BatchModifyMarginModeResponseUTA {
|
|
669
|
+
ts: number;
|
|
670
|
+
items: BatchModifyMarginModeItemUTA[];
|
|
671
|
+
}
|
|
672
|
+
export interface ModifyIsolatedFuturesMarginResponseUTA {
|
|
673
|
+
ts: number;
|
|
674
|
+
}
|