kucoin-api 2.6.3 → 2.6.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/dist/cjs/BrokerClient.d.ts +12 -2
- package/dist/cjs/BrokerClient.js +14 -0
- package/dist/cjs/BrokerClient.js.map +1 -1
- package/dist/cjs/UnifiedAPIClient.d.ts +23 -8
- package/dist/cjs/UnifiedAPIClient.js +104 -71
- package/dist/cjs/UnifiedAPIClient.js.map +1 -1
- package/dist/cjs/types/request/broker.types.d.ts +13 -0
- package/dist/cjs/types/request/uta-types.d.ts +62 -7
- package/dist/cjs/types/response/broker.types.d.ts +21 -0
- package/dist/cjs/types/response/futures.types.d.ts +4 -0
- package/dist/cjs/types/response/spot-trading.d.ts +4 -0
- package/dist/cjs/types/response/uta-types.d.ts +125 -27
- package/dist/cjs/types/websockets/ws-events.d.ts +63 -0
- package/dist/mjs/BrokerClient.d.ts +12 -2
- package/dist/mjs/BrokerClient.js +14 -0
- package/dist/mjs/BrokerClient.js.map +1 -1
- package/dist/mjs/UnifiedAPIClient.d.ts +23 -8
- package/dist/mjs/UnifiedAPIClient.js +104 -71
- package/dist/mjs/UnifiedAPIClient.js.map +1 -1
- package/dist/mjs/types/request/broker.types.d.ts +13 -0
- package/dist/mjs/types/request/uta-types.d.ts +62 -7
- package/dist/mjs/types/response/broker.types.d.ts +21 -0
- package/dist/mjs/types/response/futures.types.d.ts +4 -0
- package/dist/mjs/types/response/spot-trading.d.ts +4 -0
- package/dist/mjs/types/response/uta-types.d.ts +125 -27
- package/dist/mjs/types/websockets/ws-events.d.ts +63 -0
- package/llms.txt +733 -245
- package/package.json +1 -1
|
@@ -10,8 +10,15 @@ export interface GetAnnouncementsRequestUTA {
|
|
|
10
10
|
endTime?: number;
|
|
11
11
|
}
|
|
12
12
|
export interface GetCurrencyRequestUTA {
|
|
13
|
-
|
|
13
|
+
/** Required as of UTA V2 (2026.08.27) */
|
|
14
|
+
currency: string;
|
|
15
|
+
chain?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface GetCurrenciesRequestUTA {
|
|
18
|
+
/** Lowercase chain identifier, e.g. trx */
|
|
14
19
|
chain?: string;
|
|
20
|
+
/** Uppercase currency codes. Docs send repeated currencyList query params. */
|
|
21
|
+
currencyList?: string[] | string;
|
|
15
22
|
}
|
|
16
23
|
export interface GetSymbolRequestUTA {
|
|
17
24
|
tradeType: 'SPOT' | 'FUTURES' | 'ISOLATED' | 'CROSS';
|
|
@@ -37,10 +44,13 @@ export interface GetOrderBookRequestUTA {
|
|
|
37
44
|
rpiFilter?: 0 | 1;
|
|
38
45
|
}
|
|
39
46
|
export interface GetFiatPriceRequestUTA {
|
|
40
|
-
/** Fiat base currency, e.g. USD, EUR.
|
|
41
|
-
base
|
|
42
|
-
/**
|
|
43
|
-
|
|
47
|
+
/** Fiat base currency, e.g. USD, EUR. Required as of UTA V2 (2026.08.27) */
|
|
48
|
+
base: string;
|
|
49
|
+
/**
|
|
50
|
+
* Crypto symbols. UTA V2 expects a string array (2026.08.27).
|
|
51
|
+
* Comma-separated string still accepted for older callers.
|
|
52
|
+
*/
|
|
53
|
+
currencies?: string[] | string;
|
|
44
54
|
}
|
|
45
55
|
export interface GetRateLimitRequestUTA {
|
|
46
56
|
/** Comma-separated UIDs to query */
|
|
@@ -56,12 +66,20 @@ export interface SetSubAccountsRateLimitRequestUTA {
|
|
|
56
66
|
export interface GetKlinesRequestUTA {
|
|
57
67
|
tradeType: 'SPOT' | 'FUTURES';
|
|
58
68
|
symbol: string;
|
|
69
|
+
/**
|
|
70
|
+
* Replaces `{symbol}-index-price` / `-mark-price` / `-premium-index` suffixes (UTA V2 2026.08.27).
|
|
71
|
+
* Suffix encoding remains backward compatible.
|
|
72
|
+
*/
|
|
73
|
+
klineType?: 'TRADE' | 'INDEX' | 'MARK' | 'PREMIUM' | string;
|
|
59
74
|
interval: '1min' | '3min' | '5min' | '15min' | '30min' | '1hour' | '2hour' | '4hour' | '6hour' | '8hour' | '12hour' | '1day' | '1week' | '1month';
|
|
60
75
|
startAt?: number;
|
|
61
76
|
endAt?: number;
|
|
62
77
|
}
|
|
63
78
|
export interface GetCurrentFundingRateRequestUTA {
|
|
64
|
-
symbol
|
|
79
|
+
/** Contract symbol. Optional when productType is set (UTA V2 2026.08.27). */
|
|
80
|
+
symbol?: string;
|
|
81
|
+
/** Product type when querying by category instead of a single symbol. */
|
|
82
|
+
productType?: 'COIN-FUTURES' | string;
|
|
65
83
|
}
|
|
66
84
|
export interface GetHistoryFundingRateRequestUTA {
|
|
67
85
|
symbol: string;
|
|
@@ -80,6 +98,9 @@ export interface GetClassicAccountRequestUTA {
|
|
|
80
98
|
currency?: string;
|
|
81
99
|
}
|
|
82
100
|
export interface GetSubAccountRequestUTA {
|
|
101
|
+
/** UTA V2 request field (2026.08.27). Up to 50 UIDs, comma-separated */
|
|
102
|
+
uid?: string;
|
|
103
|
+
/** @deprecated UTA V2 renamed to uid (2026.08.27) */
|
|
83
104
|
UID?: string;
|
|
84
105
|
pageSize?: number;
|
|
85
106
|
lastId?: number;
|
|
@@ -93,10 +114,19 @@ export interface FlexTransferRequestUTA {
|
|
|
93
114
|
clientOid: string;
|
|
94
115
|
currency: string;
|
|
95
116
|
amount: string;
|
|
96
|
-
|
|
117
|
+
/** UTA V2 transfer type (2026.08.27). Replaces numeric `type`. */
|
|
118
|
+
transferType?: 'INTERNAL' | 'PARENT_TO_SUB' | 'SUB_TO_PARENT' | 'SUB_TO_SUB';
|
|
119
|
+
/** @deprecated UTA V2 uses transferType: 0=INTERNAL, 1=PARENT_TO_SUB, 2=SUB_TO_PARENT, 3=SUB_TO_SUB */
|
|
120
|
+
type?: '0' | '1' | '2' | '3';
|
|
97
121
|
fromAccountType: 'FUNDING' | 'SPOT' | 'FUTURES' | 'CROSS' | 'ISOLATED' | 'UNIFIED';
|
|
98
122
|
toAccountType: 'FUNDING' | 'SPOT' | 'FUTURES' | 'CROSS' | 'ISOLATED' | 'UNIFIED';
|
|
123
|
+
/** UTA V2 required isolated-account tag (2026.08.27). Replaces fromAccountSymbol. */
|
|
124
|
+
fromAccountTag?: string;
|
|
125
|
+
/** UTA V2 required isolated-account tag (2026.08.27). Replaces toAccountSymbol. */
|
|
126
|
+
toAccountTag?: string;
|
|
127
|
+
/** @deprecated UTA V2 uses fromAccountTag */
|
|
99
128
|
fromAccountSymbol?: string;
|
|
129
|
+
/** @deprecated UTA V2 uses toAccountTag */
|
|
100
130
|
toAccountSymbol?: string;
|
|
101
131
|
fromUid?: string;
|
|
102
132
|
toUid?: string;
|
|
@@ -157,13 +187,22 @@ export interface GetDepositAddressRequestUTA {
|
|
|
157
187
|
}
|
|
158
188
|
export interface GetWithdrawalQuotasRequestUTA {
|
|
159
189
|
currency: string;
|
|
190
|
+
/** UTA V2 chain identifier (2026.08.27). Replaces chainId. */
|
|
191
|
+
chain?: string;
|
|
192
|
+
/** @deprecated UTA V2 renamed to chain */
|
|
160
193
|
chainId?: string;
|
|
194
|
+
/** Required as of UTA V2 (2026.08.27) */
|
|
195
|
+
withdrawType?: 'ADDRESS' | 'UID' | 'MAIL' | 'PHONE';
|
|
196
|
+
isInner?: boolean;
|
|
161
197
|
}
|
|
162
198
|
export interface SubmitWithdrawRequestUTA {
|
|
163
199
|
currency: string;
|
|
164
200
|
toAddress: string;
|
|
165
201
|
amount: string;
|
|
166
202
|
withdrawType: 'ADDRESS' | 'UID' | 'MAIL' | 'PHONE';
|
|
203
|
+
/** UTA V2 chain identifier (2026.08.27). Replaces chainId. */
|
|
204
|
+
chain?: string;
|
|
205
|
+
/** @deprecated UTA V2 renamed to chain */
|
|
167
206
|
chainId?: string;
|
|
168
207
|
memo?: string;
|
|
169
208
|
isInner?: boolean;
|
|
@@ -215,6 +254,8 @@ export interface PlaceOrderRequestUTA {
|
|
|
215
254
|
autoBorrow?: boolean;
|
|
216
255
|
autoRepay?: boolean;
|
|
217
256
|
tags?: string;
|
|
257
|
+
/** Broker tag, max 50 chars. Decoupled from capped tags (2026.09.21) */
|
|
258
|
+
brokerTag?: string;
|
|
218
259
|
triggerDirection?: 'DOWN' | 'UP';
|
|
219
260
|
triggerPrice?: string;
|
|
220
261
|
triggerPriceType?: 'TP' | 'IP' | 'MP';
|
|
@@ -264,6 +305,20 @@ export interface GetTradeHistoryRequestUTA {
|
|
|
264
305
|
endAt?: number;
|
|
265
306
|
lastId?: string;
|
|
266
307
|
pageSize?: number;
|
|
308
|
+
/** Query all trade kinds (UTA V2 2026.08.27), e.g. NORMAL / ADL / LIQUID / SETTLEMENT */
|
|
309
|
+
fillType?: string;
|
|
310
|
+
}
|
|
311
|
+
export interface AmendOrderRequestUTA {
|
|
312
|
+
symbol: string;
|
|
313
|
+
orderId?: string;
|
|
314
|
+
clientOid?: string;
|
|
315
|
+
newPrice?: number | string;
|
|
316
|
+
newSize?: number | string;
|
|
317
|
+
tpTriggerPrice?: string;
|
|
318
|
+
slTriggerPrice?: string;
|
|
319
|
+
}
|
|
320
|
+
export interface GetIndexPriceRequestUTA {
|
|
321
|
+
symbol: string;
|
|
267
322
|
}
|
|
268
323
|
export interface CancelOrderRequestUTA {
|
|
269
324
|
tradeType: 'SPOT' | 'FUTURES' | 'ISOLATED' | 'CROSS' | 'MARGIN';
|
|
@@ -104,3 +104,24 @@ export interface BrokerWithdrawalRecord {
|
|
|
104
104
|
createdAt: number;
|
|
105
105
|
updatedAt: number;
|
|
106
106
|
}
|
|
107
|
+
export interface SetBrokerMarkupFeeResponse {
|
|
108
|
+
effectiveType: string;
|
|
109
|
+
subUids: string | null;
|
|
110
|
+
tradeType: string;
|
|
111
|
+
makerMarkUp: string;
|
|
112
|
+
takerMarkUp: string;
|
|
113
|
+
effectAt: number;
|
|
114
|
+
createdAt: number;
|
|
115
|
+
}
|
|
116
|
+
export interface BrokerMarkupFeeItem {
|
|
117
|
+
uid?: number;
|
|
118
|
+
spotMakerMarkUp: string;
|
|
119
|
+
spotTakerMarkUp: string;
|
|
120
|
+
futuresMakerMarkUp: string;
|
|
121
|
+
futuresTakerMarkUp: string;
|
|
122
|
+
updatedAt: number;
|
|
123
|
+
}
|
|
124
|
+
export interface GetBrokerMarkupFeeResponse {
|
|
125
|
+
defaultMarkUp: BrokerMarkupFeeItem;
|
|
126
|
+
items: BrokerMarkupFeeItem[];
|
|
127
|
+
}
|
|
@@ -186,6 +186,10 @@ export interface FuturesSymbolInfo {
|
|
|
186
186
|
mmrLimit: number;
|
|
187
187
|
mmrLevConstant: number;
|
|
188
188
|
supportCross: boolean;
|
|
189
|
+
assetClass?: string;
|
|
190
|
+
subMarketType?: string;
|
|
191
|
+
/** @deprecated Prefer assetClass and subMarketType (2026.09.21) */
|
|
192
|
+
marketType?: string;
|
|
189
193
|
}
|
|
190
194
|
export interface TickerDetail {
|
|
191
195
|
sequence: number;
|
|
@@ -67,6 +67,10 @@ export interface SymbolInfo {
|
|
|
67
67
|
callauctionSecondStageStartTime: number | null;
|
|
68
68
|
callauctionThirdStageStartTime: number | null;
|
|
69
69
|
tradingStartTime: number | null;
|
|
70
|
+
assetClass?: string;
|
|
71
|
+
subMarketType?: string;
|
|
72
|
+
/** @deprecated Prefer assetClass and subMarketType (2026.09.21) */
|
|
73
|
+
marketType?: string;
|
|
70
74
|
}
|
|
71
75
|
export interface Ticker {
|
|
72
76
|
sequence: string;
|
|
@@ -25,26 +25,43 @@ export interface CurrencyChainUTA {
|
|
|
25
25
|
minWithdrawFee: string;
|
|
26
26
|
isWithdrawEnabled: boolean;
|
|
27
27
|
isDepositEnabled: boolean;
|
|
28
|
-
confirms
|
|
28
|
+
confirms?: number;
|
|
29
29
|
preConfirms: number;
|
|
30
|
-
contractAddress
|
|
30
|
+
contractAddress?: string;
|
|
31
31
|
withdrawPrecision: number;
|
|
32
32
|
maxWithdrawSize: string | null;
|
|
33
33
|
maxDepositSize: string | null;
|
|
34
34
|
needTag: boolean;
|
|
35
|
-
|
|
35
|
+
/** @deprecated UTA V2 renamed to chain (2026.08.27) */
|
|
36
|
+
chainId?: string;
|
|
37
|
+
/** UTA V2 chain identifier (2026.08.27). Replaces chainId. */
|
|
38
|
+
chain?: string;
|
|
39
|
+
addressRegex?: string;
|
|
40
|
+
memoRegex?: string;
|
|
41
|
+
depositFeeRate?: string;
|
|
42
|
+
depositTierFee?: string;
|
|
43
|
+
fixedDepositFee?: string;
|
|
44
|
+
maxDepositFee?: string;
|
|
45
|
+
maxWithdrawFee?: string;
|
|
46
|
+
isMemoRequired?: boolean;
|
|
36
47
|
}
|
|
37
48
|
export interface GetCurrencyResponseUTA {
|
|
38
49
|
currency: string;
|
|
39
50
|
name: string;
|
|
40
51
|
fullName: string;
|
|
41
52
|
precision: number;
|
|
42
|
-
confirms
|
|
43
|
-
contractAddress
|
|
44
|
-
|
|
45
|
-
|
|
53
|
+
confirms?: number | null;
|
|
54
|
+
contractAddress?: string | null;
|
|
55
|
+
/** Removed from UTA V2 Get Currencies currency-level payload (2026.08.27) */
|
|
56
|
+
isMarginEnabled?: boolean;
|
|
57
|
+
/** Removed from UTA V2 Get Currencies currency-level payload (2026.08.27) */
|
|
58
|
+
isDebitEnabled?: boolean;
|
|
59
|
+
/** UTA V2 chain list (2026.08.27). Replaces items. */
|
|
46
60
|
list: CurrencyChainUTA[];
|
|
61
|
+
/** @deprecated UTA V2 renamed to list */
|
|
62
|
+
items?: CurrencyChainUTA[];
|
|
47
63
|
}
|
|
64
|
+
export type GetCurrenciesResponseUTA = GetCurrencyResponseUTA[];
|
|
48
65
|
export interface SymbolUTA {
|
|
49
66
|
symbol: string;
|
|
50
67
|
name?: string;
|
|
@@ -59,10 +76,11 @@ export interface SymbolUTA {
|
|
|
59
76
|
quoteOrderStep?: string;
|
|
60
77
|
tickSize?: string | number;
|
|
61
78
|
feeCurrency?: string;
|
|
62
|
-
tradingStatus?: string;
|
|
79
|
+
tradingStatus?: string | 'TradingEnabled' | 'TradingDisabled' | 'Init' | 'Open' | 'PrepareSettled' | 'BeingSettled' | 'Settled' | 'Paused' | 'Closed' | 'CancelOnly';
|
|
63
80
|
marginMode?: string;
|
|
64
81
|
priceLimitRatio?: string;
|
|
65
|
-
|
|
82
|
+
/** UTA V2: classA / classB / classC. Numeric 1/2/3 remains on older payloads. */
|
|
83
|
+
feeCategory?: number | 'classA' | 'classB' | 'classC' | string;
|
|
66
84
|
makerFeeCoefficient?: string;
|
|
67
85
|
takerFeeCoefficient?: string;
|
|
68
86
|
st?: boolean;
|
|
@@ -70,8 +88,8 @@ export interface SymbolUTA {
|
|
|
70
88
|
contractType?: string;
|
|
71
89
|
isInverse?: boolean;
|
|
72
90
|
launchTime?: number;
|
|
73
|
-
expiryTime?: number | null;
|
|
74
|
-
settlementTime?: number | null;
|
|
91
|
+
expiryTime?: number | string | null;
|
|
92
|
+
settlementTime?: number | string | null;
|
|
75
93
|
maxPrice?: string | number;
|
|
76
94
|
lotSize?: string | number;
|
|
77
95
|
/**
|
|
@@ -83,7 +101,7 @@ export interface SymbolUTA {
|
|
|
83
101
|
makerFeeRate?: string | number;
|
|
84
102
|
takerFeeRate?: string | number;
|
|
85
103
|
settlementFeeRate?: string | number | null;
|
|
86
|
-
maxLeverage?: number;
|
|
104
|
+
maxLeverage?: number | string;
|
|
87
105
|
indexSourceExchanges?: string[];
|
|
88
106
|
k?: string | number;
|
|
89
107
|
m?: string | number;
|
|
@@ -100,6 +118,16 @@ export interface SymbolUTA {
|
|
|
100
118
|
displaySymbol?: string;
|
|
101
119
|
/** Display base currency for Futures (added 2025.12.26 & 2026.01.12) */
|
|
102
120
|
displayBaseCurrency?: string;
|
|
121
|
+
maxMarketOrderSize?: string;
|
|
122
|
+
preMarketToPerpDate?: number | string | null;
|
|
123
|
+
minFunds?: string;
|
|
124
|
+
callauctionIsEnabled?: boolean;
|
|
125
|
+
callauctionPriceFloor?: string | null;
|
|
126
|
+
callauctionPriceCeiling?: string | null;
|
|
127
|
+
callauctionFirstStageStartTime?: number | string | null;
|
|
128
|
+
callauctionSecondStageStartTime?: number | string | null;
|
|
129
|
+
callauctionThirdStageStartTime?: number | string | null;
|
|
130
|
+
tradingStartTime?: number | string | null;
|
|
103
131
|
}
|
|
104
132
|
export interface GetSymbolResponseUTA {
|
|
105
133
|
tradeType: string;
|
|
@@ -180,10 +208,10 @@ export interface GetKlinesResponseUTA {
|
|
|
180
208
|
}
|
|
181
209
|
export interface GetCurrentFundingRateResponseUTA {
|
|
182
210
|
symbol: string;
|
|
183
|
-
nextFundingRate: number;
|
|
211
|
+
nextFundingRate: number | string;
|
|
184
212
|
fundingTime: number;
|
|
185
|
-
fundingRateCap: number;
|
|
186
|
-
fundingRateFloor: number;
|
|
213
|
+
fundingRateCap: number | string;
|
|
214
|
+
fundingRateFloor: number | string;
|
|
187
215
|
/** Current funding settlement interval (ms); as of 2026.04.19 */
|
|
188
216
|
currentGranularity: number;
|
|
189
217
|
/** New interval after change (ms); as of 2026.04.19 */
|
|
@@ -191,6 +219,21 @@ export interface GetCurrentFundingRateResponseUTA {
|
|
|
191
219
|
/** When newGranularity takes effect (ms); as of 2026.04.19 */
|
|
192
220
|
newGranularityStartTime: number;
|
|
193
221
|
}
|
|
222
|
+
export interface GetIndexPriceDecompositionUTA {
|
|
223
|
+
exchange: string;
|
|
224
|
+
price: string;
|
|
225
|
+
weight: string;
|
|
226
|
+
}
|
|
227
|
+
export interface GetIndexPriceItemUTA {
|
|
228
|
+
symbol: string;
|
|
229
|
+
granularity: number;
|
|
230
|
+
ts: number;
|
|
231
|
+
indexPrice: string;
|
|
232
|
+
decompositionList?: GetIndexPriceDecompositionUTA[];
|
|
233
|
+
}
|
|
234
|
+
export interface GetIndexPriceResponseUTA {
|
|
235
|
+
items: GetIndexPriceItemUTA[];
|
|
236
|
+
}
|
|
194
237
|
export interface FundingRateHistoryItemUTA {
|
|
195
238
|
fundingRate: number;
|
|
196
239
|
ts: number;
|
|
@@ -252,7 +295,10 @@ export interface GetServiceStatusResponseUTA {
|
|
|
252
295
|
*/
|
|
253
296
|
export interface AccountCurrencyUTA {
|
|
254
297
|
currency: string;
|
|
255
|
-
|
|
298
|
+
/** @deprecated UTA V2 renamed to locked (2026.08.27) */
|
|
299
|
+
hold?: string;
|
|
300
|
+
/** UTA V2 locked amount (2026.08.27). Replaces hold. */
|
|
301
|
+
locked?: string;
|
|
256
302
|
available: string;
|
|
257
303
|
balance: string;
|
|
258
304
|
equity: string;
|
|
@@ -269,7 +315,9 @@ export interface AccountCurrencyUTA {
|
|
|
269
315
|
isolatedOrderMargin?: string;
|
|
270
316
|
isolatedFundingFeeMargin?: string;
|
|
271
317
|
isolatedUnPnl?: string;
|
|
318
|
+
/** @deprecated UTA V2 renamed to liabilityPrincipal (2026.08.27) */
|
|
272
319
|
liabilityPrinciple?: string;
|
|
320
|
+
liabilityPrincipal?: string;
|
|
273
321
|
liabilityInterest?: string;
|
|
274
322
|
unrealisedPnl?: string;
|
|
275
323
|
}
|
|
@@ -295,11 +343,28 @@ export interface GetAccountOverviewResponseUTA {
|
|
|
295
343
|
}
|
|
296
344
|
export interface SubAccountUserUTA {
|
|
297
345
|
uid: number;
|
|
298
|
-
|
|
346
|
+
/** @deprecated UTA V2 renamed to accounts (2026.08.27) */
|
|
347
|
+
accountList?: {
|
|
299
348
|
accountType: 'FUNDING' | 'SPOT' | 'FUTURES' | 'CROSS' | 'ISOLATED' | 'OPTIONS' | 'UNIFIED';
|
|
300
349
|
accountSubType: string | null;
|
|
301
350
|
currencyList: AccountCurrencyUTA[];
|
|
302
351
|
}[];
|
|
352
|
+
/** UTA V2 accounts list (2026.08.27). Replaces accountList. OPTIONS removed. */
|
|
353
|
+
accounts?: {
|
|
354
|
+
accountType: 'FUNDING' | 'SPOT' | 'FUTURES' | 'CROSS' | 'ISOLATED' | 'UNIFIED';
|
|
355
|
+
/** UTA V2 renamed from accountSubType */
|
|
356
|
+
subAccountType?: string | null;
|
|
357
|
+
/** @deprecated UTA V2 renamed to subAccountType */
|
|
358
|
+
accountSubType?: string | null;
|
|
359
|
+
/** UTA V2 renamed from currencyList */
|
|
360
|
+
currencies?: AccountCurrencyUTA[];
|
|
361
|
+
/** @deprecated UTA V2 renamed to currencies */
|
|
362
|
+
currencyList?: AccountCurrencyUTA[];
|
|
363
|
+
/** UTA V2 renamed from liabilityPrinciple */
|
|
364
|
+
liabilityPrincipal?: string;
|
|
365
|
+
/** @deprecated UTA V2 renamed to liabilityPrincipal */
|
|
366
|
+
liabilityPrinciple?: string;
|
|
367
|
+
}[];
|
|
303
368
|
}
|
|
304
369
|
export interface GetSubAccountResponseUTA {
|
|
305
370
|
ts: number;
|
|
@@ -366,14 +431,20 @@ export interface GetInterestHistoryResponseUTA {
|
|
|
366
431
|
}
|
|
367
432
|
export interface DepositAddressUTA {
|
|
368
433
|
address: string;
|
|
369
|
-
memo
|
|
370
|
-
|
|
371
|
-
|
|
434
|
+
memo?: string;
|
|
435
|
+
/** @deprecated UTA V2 renamed to chain (2026.08.27) */
|
|
436
|
+
chainId?: string;
|
|
437
|
+
/** UTA V2 chain identifier (2026.08.27). Replaces chainId. */
|
|
438
|
+
chain?: string;
|
|
439
|
+
/** @deprecated UTA V2 renamed to toAccountType (2026.08.27) */
|
|
440
|
+
to?: 'FUNDING' | 'SPOT' | 'UNIFIED';
|
|
441
|
+
/** UTA V2 destination account type (2026.08.27). Replaces to. */
|
|
442
|
+
toAccountType?: 'FUNDING' | 'SPOT' | 'UNIFIED';
|
|
372
443
|
currency: string;
|
|
373
444
|
contractAddress: string;
|
|
374
445
|
chainName: string;
|
|
375
446
|
expirationDate: string;
|
|
376
|
-
remark
|
|
447
|
+
remark?: string;
|
|
377
448
|
}
|
|
378
449
|
export interface WithdrawalQuotasUTA {
|
|
379
450
|
currency: string;
|
|
@@ -382,16 +453,27 @@ export interface WithdrawalQuotasUTA {
|
|
|
382
453
|
quotaCurrency: string;
|
|
383
454
|
limitQuotaCurrencyAmount: string;
|
|
384
455
|
usedQuotaCurrencyAmount: string;
|
|
385
|
-
remainAmount
|
|
386
|
-
availableAmount
|
|
387
|
-
withdrawMinFee
|
|
388
|
-
innerWithdrawMinFee
|
|
456
|
+
remainAmount?: string;
|
|
457
|
+
availableAmount?: string;
|
|
458
|
+
withdrawMinFee?: string;
|
|
459
|
+
innerWithdrawMinFee?: string;
|
|
460
|
+
/** UTA V2 remaining quota (2026.08.27). Replaces remainAmount. */
|
|
461
|
+
remainingQuotaAmount?: string;
|
|
462
|
+
/** UTA V2 available withdraw amount (2026.08.27). Replaces availableAmount. */
|
|
463
|
+
availableWithdrawAmount?: string;
|
|
464
|
+
/** UTA V2 min withdraw fee (2026.08.27). Replaces withdrawMinFee. */
|
|
465
|
+
minWithdrawFee?: string;
|
|
466
|
+
/** UTA V2 min inner withdraw fee (2026.08.27). Replaces innerWithdrawMinFee. */
|
|
467
|
+
minInnerWithdrawFee?: string;
|
|
389
468
|
withdrawMinSize: string;
|
|
390
469
|
isWithdrawEnabled: boolean;
|
|
391
470
|
precision: number;
|
|
392
471
|
reason: string | null;
|
|
393
472
|
lockedAmount: string;
|
|
394
|
-
|
|
473
|
+
/** @deprecated UTA V2 renamed to chain (2026.08.27) */
|
|
474
|
+
chainId?: string;
|
|
475
|
+
/** UTA V2 chain identifier (2026.08.27). Replaces chainId. */
|
|
476
|
+
chain?: string;
|
|
395
477
|
chainName: string;
|
|
396
478
|
}
|
|
397
479
|
export interface SubmitWithdrawResponseUTA {
|
|
@@ -497,7 +579,8 @@ export interface OrderDetailsUTA {
|
|
|
497
579
|
* Time in Force. Added 'RPI' as of 2025.01.02
|
|
498
580
|
*/
|
|
499
581
|
timeInForce: 'GTC' | 'IOC' | 'GTT' | 'FOK' | 'RPI';
|
|
500
|
-
|
|
582
|
+
/** UTA V1+V2: enum value instead of descriptive cancellation reason (2026.08.27) */
|
|
583
|
+
cancelReason?: number | string;
|
|
501
584
|
cancelSize: string;
|
|
502
585
|
cancelAfter?: number;
|
|
503
586
|
triggerDirection?: 'UP' | 'DOWN';
|
|
@@ -511,6 +594,8 @@ export interface OrderDetailsUTA {
|
|
|
511
594
|
slOrderPrice?: string;
|
|
512
595
|
postOnly?: boolean;
|
|
513
596
|
tags?: string;
|
|
597
|
+
/** Broker tag, max 50 chars (2026.09.21) */
|
|
598
|
+
brokerTag?: string;
|
|
514
599
|
triggerOrderId?: string;
|
|
515
600
|
/** Order creation time in nanoseconds (standardized as of 2026.01.12) */
|
|
516
601
|
orderTime: number;
|
|
@@ -555,6 +640,19 @@ export interface TradeHistoryItemUTA {
|
|
|
555
640
|
executionTime: number;
|
|
556
641
|
/** Whether it is an RPI trade (added 2025.01.02, Futures only) */
|
|
557
642
|
isRpiTrade?: boolean;
|
|
643
|
+
/**
|
|
644
|
+
* Fill PnL. Empty string when data is before 2026.09.05 (UTC-8) (2026.09.21).
|
|
645
|
+
* When fillType is ADL/LIQUID/SETTLEMENT, size is a positive value (2026.08.20).
|
|
646
|
+
*/
|
|
647
|
+
fillPnl?: string;
|
|
648
|
+
clientOid?: string;
|
|
649
|
+
marginMode?: 'ISOLATED' | 'CROSS';
|
|
650
|
+
tradeType?: 'SPOT' | 'FUTURES' | 'ISOLATED' | 'CROSS' | 'MARGIN';
|
|
651
|
+
orderType?: 'LIMIT' | 'MARKET';
|
|
652
|
+
}
|
|
653
|
+
export interface AmendOrderResponseUTA {
|
|
654
|
+
orderId: string;
|
|
655
|
+
clientOid: string | null;
|
|
558
656
|
}
|
|
559
657
|
export interface GetTradeHistoryResponseUTA {
|
|
560
658
|
lastId: number;
|
|
@@ -77,10 +77,73 @@ export interface WsUTAFundingFeePublicPush {
|
|
|
77
77
|
s: string;
|
|
78
78
|
fR?: string;
|
|
79
79
|
fT?: number;
|
|
80
|
+
/** Current funding rate (UTA V2 `funding-fee` channel) */
|
|
81
|
+
fr?: string;
|
|
82
|
+
/** Funding time (UTA V2) */
|
|
83
|
+
ft?: number;
|
|
84
|
+
/** Last settled funding fee rate (UTA V2 2026.08.27) */
|
|
85
|
+
lfr?: string;
|
|
86
|
+
nt?: number;
|
|
87
|
+
gl?: number;
|
|
88
|
+
fc?: string;
|
|
89
|
+
ff?: string;
|
|
80
90
|
M?: number;
|
|
81
91
|
[key: string]: string | number | boolean | undefined;
|
|
82
92
|
};
|
|
83
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* UTA WebSocket public All Funding Fee Rates channel (`channel: funding-fee-all-symbols`).
|
|
96
|
+
* Added 2026.08.27.
|
|
97
|
+
* @see https://www.kucoin.com/docs-new/3470412w0
|
|
98
|
+
*/
|
|
99
|
+
export interface WsUTAAllFundingFeeRatesPublicPush {
|
|
100
|
+
T: string;
|
|
101
|
+
P: number;
|
|
102
|
+
d: WsUTAFundingFeePublicPush['d'][];
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* UTA WebSocket private execution push (`channel: execution`).
|
|
106
|
+
* Field `fP` added 2026.09.21. Empty before 2026.09.05 (UTC-8).
|
|
107
|
+
* When fT is ADL/LIQUID/SETTLEMENT, q is a positive value (2026.08.20).
|
|
108
|
+
* @see https://www.kucoin.com/docs-new/3470407w0
|
|
109
|
+
*/
|
|
110
|
+
export interface WsUTAExecutionPushData {
|
|
111
|
+
oi?: string;
|
|
112
|
+
s?: string;
|
|
113
|
+
S?: string;
|
|
114
|
+
oT?: string;
|
|
115
|
+
p?: string;
|
|
116
|
+
q?: string;
|
|
117
|
+
ti?: string;
|
|
118
|
+
E?: number;
|
|
119
|
+
lR?: string;
|
|
120
|
+
f?: string;
|
|
121
|
+
fC?: string;
|
|
122
|
+
fT?: string;
|
|
123
|
+
ci?: string;
|
|
124
|
+
/** Fill PnL. Empty string when data is before 2026.09.05 (UTC-8) */
|
|
125
|
+
fP?: string;
|
|
126
|
+
[key: string]: string | number | boolean | undefined;
|
|
127
|
+
}
|
|
128
|
+
export interface WsUTAExecutionPush {
|
|
129
|
+
T: string;
|
|
130
|
+
P: number;
|
|
131
|
+
d: WsUTAExecutionPushData;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* UTA WebSocket private order push (`channel: order` / `orderAll`).
|
|
135
|
+
* Field `brokerTag` added 2026.09.21.
|
|
136
|
+
* @see https://www.kucoin.com/docs-new/3470228w0
|
|
137
|
+
*/
|
|
138
|
+
export interface WsUTAOrderPushData {
|
|
139
|
+
brokerTag?: string;
|
|
140
|
+
[key: string]: string | number | boolean | undefined;
|
|
141
|
+
}
|
|
142
|
+
export interface WsUTAOrderPush {
|
|
143
|
+
T: string;
|
|
144
|
+
P: number;
|
|
145
|
+
d: WsUTAOrderPushData;
|
|
146
|
+
}
|
|
84
147
|
/**
|
|
85
148
|
* UTA WebSocket public Mark Price channel (`channel: markPrice`, FUTURES).
|
|
86
149
|
* Added 2026.07.01.
|