kucoin-api 2.5.2 → 2.5.3
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 +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 +56 -3
- package/dist/cjs/UnifiedAPIClient.js +70 -1
- package/dist/cjs/UnifiedAPIClient.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 +56 -3
- package/dist/mjs/UnifiedAPIClient.js +70 -1
- package/dist/mjs/UnifiedAPIClient.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 +2 -4
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BaseRestClient } from './lib/BaseRestClient.js';
|
|
2
2
|
import { RestClientType } from './lib/requestUtils.js';
|
|
3
|
-
import { BatchCancelOrdersBySymbolRequestUTA, BatchCancelOrdersRequestUTA, BatchPlaceOrderRequestUTA, CancelOrderRequestUTA, FlexTransferRequestUTA, GetAccountLedgerRequestUTA, GetAccountPositionTiersRequestUTA, GetAnnouncementsRequestUTA, GetBorrowingRatesAndLimitsRequestUTA, GetClassicAccountRequestUTA, GetCurrencyRequestUTA, GetCurrentFundingRateRequestUTA, GetDCPRequestUTA, GetDepositAddressRequestUTA, GetFeeRateRequestUTA, GetHistoryFundingRateRequestUTA, GetInterestHistoryRequestUTA, GetKlinesRequestUTA, GetLeverageRequestUTA, GetOpenOrderListRequestUTA, GetOrderBookRequestUTA, GetOrderDetailsRequestUTA, GetOrderHistoryRequestUTA, GetPositionListRequestUTA, GetPositionsHistoryRequestUTA, GetPrivateFundingFeeHistoryRequestUTA, GetServiceStatusRequestUTA, GetSubAccountRequestUTA, GetSymbolRequestUTA, GetThirdPartyCustodyCurrenciesRequestUTA, GetThirdPartyCustodyQuotaRequestUTA, GetTickerRequestUTA, GetTradeHistoryRequestUTA, GetTradesRequestUTA, GetTransferQuotasRequestUTA, ModifyLeverageRequestUTA, ModifyMarginCrossLeverageRequestUTA, PlaceOrderRequestUTA, SetAccountModeRequestUTA, SetDCPRequestUTA, SetSubAccountTransferPermissionRequestUTA } from './types/request/uta-types.js';
|
|
3
|
+
import { AddSubAccountApiRequestUTA, AddSubAccountRequestUTA, BatchCancelOrdersBySymbolRequestUTA, BatchCancelOrdersRequestUTA, BatchModifyMarginModeRequestUTA, BatchPlaceOrderRequestUTA, CancelOrderRequestUTA, FlexTransferRequestUTA, GetAccountLedgerRequestUTA, GetAccountPositionTiersRequestUTA, GetAnnouncementsRequestUTA, GetBorrowingRatesAndLimitsRequestUTA, GetClassicAccountRequestUTA, GetCurrencyRequestUTA, GetCurrentFundingRateRequestUTA, GetDCPRequestUTA, GetDepositAddressRequestUTA, GetFeeRateRequestUTA, GetHistoryFundingRateRequestUTA, GetInterestHistoryRequestUTA, GetKlinesRequestUTA, GetLeverageRequestUTA, GetOpenOrderListRequestUTA, GetOrderBookRequestUTA, GetOrderDetailsRequestUTA, GetOrderHistoryRequestUTA, GetPositionListRequestUTA, GetPositionsHistoryRequestUTA, GetPrivateFundingFeeHistoryRequestUTA, GetServiceStatusRequestUTA, GetSubAccountRequestUTA, GetSymbolRequestUTA, GetThirdPartyCustodyCurrenciesRequestUTA, GetThirdPartyCustodyQuotaRequestUTA, GetTickerRequestUTA, GetTradeHistoryRequestUTA, GetTradesRequestUTA, GetTransferQuotasRequestUTA, GetWithdrawalQuotasRequestUTA, ModifyIsolatedFuturesMarginRequestUTA, ModifyLeverageRequestUTA, ModifyMarginCrossLeverageRequestUTA, PlaceOrderRequestUTA, SetAccountModeRequestUTA, SetDCPRequestUTA, SetSubAccountTransferPermissionRequestUTA, SubmitWithdrawRequestUTA } from './types/request/uta-types.js';
|
|
4
4
|
import { APISuccessResponse } from './types/response/shared.types.js';
|
|
5
|
-
import { BatchCancelOrdersBySymbolResponseUTA, BatchCancelOrdersResponseUTA, BatchPlaceOrderResponseUTA, BorrowableCurrencyUTA, CancelOrderResponseUTA, DCPResponseUTA, DepositAddressUTA, FlexTransferResponseUTA, GetAccountLedgerResponseClassicUTA, GetAccountLedgerResponseUTA, GetAccountModeResponseUTA, GetAccountOverviewResponseUTA, GetAnnouncementsResponseUTA, GetBorrowingRatesAndLimitsResponseUTA, GetClassicAccountResponseUTA, GetCrossMarginConfigResponseUTA, GetCurrencyResponseUTA, GetCurrentFundingRateResponseUTA, GetFeeRateResponseUTA, GetHistoryFundingRateResponseUTA, GetInterestHistoryResponseUTA, GetKlinesResponseUTA, GetLeverageItemUTA, GetOpenOrderListResponseUTA, GetOrderBookResponseUTA, GetOrderHistoryResponseUTA, GetPositionsHistoryResponseUTA, GetPrivateFundingFeeHistoryResponseUTA, GetServiceStatusResponseUTA, GetSubAccountResponseUTA, GetSymbolResponseUTA, GetTickerResponseUTA, GetTradeHistoryResponseUTA, GetTradesResponseUTA, GetTransferQuotasResponseUTA, ModifyMarginCrossLeverageResponseUTA, OrderDetailsUTA, PlaceOrderResponseUTA, PositionTierUTA, PositionUTA, SubAccountTransferPermissionUTA, ThirdPartyCustodyCurrencyUTA, ThirdPartyCustodyQuotaUTA } from './types/response/uta-types.js';
|
|
5
|
+
import { AddSubAccountApiResponseUTA, AddSubAccountResponseUTA, ApiKeyInfoUTA, BatchCancelOrdersBySymbolResponseUTA, BatchCancelOrdersResponseUTA, BatchModifyMarginModeResponseUTA, BatchPlaceOrderResponseUTA, BorrowableCurrencyUTA, CancelOrderResponseUTA, DCPResponseUTA, DepositAddressUTA, FlexTransferResponseUTA, GetAccountLedgerResponseClassicUTA, GetAccountLedgerResponseUTA, GetAccountModeResponseUTA, GetAccountOverviewResponseUTA, GetAnnouncementsResponseUTA, GetBorrowingRatesAndLimitsResponseUTA, GetClassicAccountResponseUTA, GetCrossMarginConfigResponseUTA, GetCurrencyResponseUTA, GetCurrentFundingRateResponseUTA, GetFeeRateResponseUTA, GetHistoryFundingRateResponseUTA, GetInterestHistoryResponseUTA, GetKlinesResponseUTA, GetLeverageItemUTA, GetOpenOrderListResponseUTA, GetOrderBookResponseUTA, GetOrderHistoryResponseUTA, GetPositionsHistoryResponseUTA, GetPrivateFundingFeeHistoryResponseUTA, GetServiceStatusResponseUTA, GetSubAccountResponseUTA, GetSymbolResponseUTA, GetTickerResponseUTA, GetTradeHistoryResponseUTA, GetTradesResponseUTA, GetTransferQuotasResponseUTA, KYCRegionUTA, ModifyIsolatedFuturesMarginResponseUTA, ModifyMarginCrossLeverageResponseUTA, OrderDetailsUTA, PlaceOrderResponseUTA, PositionTierUTA, PositionUTA, SubAccountTransferPermissionUTA, SubmitWithdrawResponseUTA, ThirdPartyCustodyCurrencyUTA, ThirdPartyCustodyQuotaUTA, WithdrawalQuotasUTA } from './types/response/uta-types.js';
|
|
6
6
|
/**
|
|
7
7
|
* Unified Trading Account Client
|
|
8
8
|
*
|
|
@@ -112,6 +112,7 @@ export declare class UnifiedAPIClient extends BaseRestClient {
|
|
|
112
112
|
* Get Transfer Quotas
|
|
113
113
|
* This endpoint returns the transferable balance of a specified account.
|
|
114
114
|
* Note: AccountType enum value changed from TRADING to SPOT as of 2026.01.17.
|
|
115
|
+
* Note: UNIFIED accountType supported as of latest UTA update.
|
|
115
116
|
*/
|
|
116
117
|
getTransferQuotas(params: GetTransferQuotasRequestUTA): Promise<APISuccessResponse<GetTransferQuotasResponseUTA>>;
|
|
117
118
|
/**
|
|
@@ -150,6 +151,7 @@ export declare class UnifiedAPIClient extends BaseRestClient {
|
|
|
150
151
|
* Note: direction values unified to uppercase IN/OUT as of 2026.01.17.
|
|
151
152
|
* Note: For Futures - id changed from Number to String, balance/amount changed from Number to String as of 2026.01.17.
|
|
152
153
|
* Note: ts standardized to nanoseconds as of 2026.01.12.
|
|
154
|
+
* Note: amount is always returned as a positive number as of 2026.04.28; use direction (IN/OUT) to determine flow.
|
|
153
155
|
*/
|
|
154
156
|
getAccountLedger(params: GetAccountLedgerRequestUTA): Promise<APISuccessResponse<GetAccountLedgerResponseUTA | GetAccountLedgerResponseClassicUTA>>;
|
|
155
157
|
/**
|
|
@@ -184,6 +186,44 @@ export declare class UnifiedAPIClient extends BaseRestClient {
|
|
|
184
186
|
* URL unified to GET /api/ua/v1/asset/deposit/address as of 2026.01.17.
|
|
185
187
|
*/
|
|
186
188
|
getDepositAddress(params: GetDepositAddressRequestUTA): Promise<APISuccessResponse<DepositAddressUTA[]>>;
|
|
189
|
+
/**
|
|
190
|
+
* Get API Key Info (UTA)
|
|
191
|
+
* Get the API key information for the key used to call this endpoint.
|
|
192
|
+
* Works for both master and sub user API keys. Added 2026.05.15.
|
|
193
|
+
*/
|
|
194
|
+
getApiKeyInfo(): Promise<APISuccessResponse<ApiKeyInfoUTA>>;
|
|
195
|
+
/**
|
|
196
|
+
* Get KYC Regions (UTA)
|
|
197
|
+
* Obtain the list of KYC regions. Added 2026.05.15.
|
|
198
|
+
*/
|
|
199
|
+
getKYCRegions(): Promise<APISuccessResponse<KYCRegionUTA[]>>;
|
|
200
|
+
/**
|
|
201
|
+
* Add Sub-Account (UTA)
|
|
202
|
+
* Create a sub-account. Added 2026.05.15.
|
|
203
|
+
*/
|
|
204
|
+
addSubAccount(params: AddSubAccountRequestUTA): Promise<APISuccessResponse<AddSubAccountResponseUTA>>;
|
|
205
|
+
/**
|
|
206
|
+
* Add Sub-Account API (UTA)
|
|
207
|
+
* Create an API key for a sub-account. Added 2026.05.15.
|
|
208
|
+
*/
|
|
209
|
+
addSubAccountApi(params: AddSubAccountApiRequestUTA): Promise<APISuccessResponse<AddSubAccountApiResponseUTA>>;
|
|
210
|
+
/**
|
|
211
|
+
* Get Withdrawal Quotas (UTA)
|
|
212
|
+
* Obtain withdrawal quota information for a currency. Added 2026.05.15.
|
|
213
|
+
*/
|
|
214
|
+
getWithdrawalQuotas(params: GetWithdrawalQuotasRequestUTA): Promise<APISuccessResponse<WithdrawalQuotasUTA>>;
|
|
215
|
+
/**
|
|
216
|
+
* Withdraw (UTA)
|
|
217
|
+
* Withdraw the specified currency. Added 2026.05.15.
|
|
218
|
+
*/
|
|
219
|
+
submitWithdraw(params: SubmitWithdrawRequestUTA): Promise<APISuccessResponse<SubmitWithdrawResponseUTA>>;
|
|
220
|
+
/**
|
|
221
|
+
* Cancel Withdrawal (UTA)
|
|
222
|
+
* Cancel a withdrawal request in PROCESSING status. Added 2026.05.15.
|
|
223
|
+
*/
|
|
224
|
+
cancelWithdrawal(params?: {
|
|
225
|
+
withdrawalId?: string;
|
|
226
|
+
}): Promise<APISuccessResponse<string | null>>;
|
|
187
227
|
/**
|
|
188
228
|
* Get Third-Party Custody Account Currency Limits
|
|
189
229
|
* OES remaining custody quota per custodian and settlement currency.
|
|
@@ -201,6 +241,7 @@ export declare class UnifiedAPIClient extends BaseRestClient {
|
|
|
201
241
|
* Note: timeInForce supports 'RPI' value for Futures only (Phase 1).
|
|
202
242
|
* Note: For Classic mode, tradeType is required in query param.
|
|
203
243
|
* Note: For Unified mode, tradeType is sent in the request body (incl. MARGIN as of 2026.04.19).
|
|
244
|
+
* Note: closeOrder supported for closing futures position by symbol.
|
|
204
245
|
*/
|
|
205
246
|
placeOrder(params: PlaceOrderRequestUTA, accountMode?: 'classic' | 'unified'): Promise<APISuccessResponse<PlaceOrderResponseUTA>>;
|
|
206
247
|
/**
|
|
@@ -256,7 +297,7 @@ export declare class UnifiedAPIClient extends BaseRestClient {
|
|
|
256
297
|
batchCancelOrders(params: BatchCancelOrdersRequestUTA, accountMode?: 'classic' | 'unified'): Promise<APISuccessResponse<BatchCancelOrdersResponseUTA>>;
|
|
257
298
|
/**
|
|
258
299
|
* Batch Cancel Orders By Symbol
|
|
259
|
-
* Cancels orders in batch by symbol. UTA only. Supports SPOT (non-margin) and
|
|
300
|
+
* Cancels orders in batch by symbol. UTA only. Supports SPOT (non-margin), FUTURES, and MARGIN (Spot-Margin as of 2026.05.15).
|
|
260
301
|
*/
|
|
261
302
|
batchCancelOrdersBySymbol(params: BatchCancelOrdersBySymbolRequestUTA): Promise<APISuccessResponse<BatchCancelOrdersBySymbolResponseUTA>>;
|
|
262
303
|
/**
|
|
@@ -283,8 +324,20 @@ export declare class UnifiedAPIClient extends BaseRestClient {
|
|
|
283
324
|
* Get the position details of all open positions.
|
|
284
325
|
* Note: creationTime standardized to nanoseconds as of 2026.01.12.
|
|
285
326
|
* Note: pageNumber, pageSize query params and liquidationPrice in each position (as of 2026.04.09).
|
|
327
|
+
* Note: adlPercentage added 2026.05.15.
|
|
328
|
+
* Note: positionMargin and riskRatio added in latest UTA update.
|
|
286
329
|
*/
|
|
287
330
|
getPositionList(params?: GetPositionListRequestUTA): Promise<APISuccessResponse<PositionUTA[]>>;
|
|
331
|
+
/**
|
|
332
|
+
* Batch Modify Margin Mode (UTA)
|
|
333
|
+
* Batch modify the margin mode for futures positions.
|
|
334
|
+
*/
|
|
335
|
+
batchModifyMarginMode(params: BatchModifyMarginModeRequestUTA): Promise<APISuccessResponse<BatchModifyMarginModeResponseUTA>>;
|
|
336
|
+
/**
|
|
337
|
+
* Modify Isolated Futures Margin (UTA)
|
|
338
|
+
* Extract or add margin for an isolated futures position.
|
|
339
|
+
*/
|
|
340
|
+
modifyIsolatedFuturesMargin(params: ModifyIsolatedFuturesMarginRequestUTA): Promise<APISuccessResponse<ModifyIsolatedFuturesMarginResponseUTA>>;
|
|
288
341
|
/**
|
|
289
342
|
* Get Positions History (UTA)
|
|
290
343
|
* Query position history information records.
|
|
@@ -145,6 +145,7 @@ export class UnifiedAPIClient extends BaseRestClient {
|
|
|
145
145
|
* Get Transfer Quotas
|
|
146
146
|
* This endpoint returns the transferable balance of a specified account.
|
|
147
147
|
* Note: AccountType enum value changed from TRADING to SPOT as of 2026.01.17.
|
|
148
|
+
* Note: UNIFIED accountType supported as of latest UTA update.
|
|
148
149
|
*/
|
|
149
150
|
getTransferQuotas(params) {
|
|
150
151
|
return this.getPrivate('api/ua/v1/account/transfer-quota', params);
|
|
@@ -195,6 +196,7 @@ export class UnifiedAPIClient extends BaseRestClient {
|
|
|
195
196
|
* Note: direction values unified to uppercase IN/OUT as of 2026.01.17.
|
|
196
197
|
* Note: For Futures - id changed from Number to String, balance/amount changed from Number to String as of 2026.01.17.
|
|
197
198
|
* Note: ts standardized to nanoseconds as of 2026.01.12.
|
|
199
|
+
* Note: amount is always returned as a positive number as of 2026.04.28; use direction (IN/OUT) to determine flow.
|
|
198
200
|
*/
|
|
199
201
|
getAccountLedger(params) {
|
|
200
202
|
return this.getPrivate('api/ua/v1/account/ledger', params);
|
|
@@ -243,6 +245,56 @@ export class UnifiedAPIClient extends BaseRestClient {
|
|
|
243
245
|
getDepositAddress(params) {
|
|
244
246
|
return this.getPrivate('api/ua/v1/asset/deposit/address', params);
|
|
245
247
|
}
|
|
248
|
+
/**
|
|
249
|
+
* Get API Key Info (UTA)
|
|
250
|
+
* Get the API key information for the key used to call this endpoint.
|
|
251
|
+
* Works for both master and sub user API keys. Added 2026.05.15.
|
|
252
|
+
*/
|
|
253
|
+
getApiKeyInfo() {
|
|
254
|
+
return this.getPrivate('api/ua/v1/user/api-key');
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Get KYC Regions (UTA)
|
|
258
|
+
* Obtain the list of KYC regions. Added 2026.05.15.
|
|
259
|
+
*/
|
|
260
|
+
getKYCRegions() {
|
|
261
|
+
return this.get('api/ua/v1/user/kyc-region');
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Add Sub-Account (UTA)
|
|
265
|
+
* Create a sub-account. Added 2026.05.15.
|
|
266
|
+
*/
|
|
267
|
+
addSubAccount(params) {
|
|
268
|
+
return this.postPrivate('api/ua/v1/user/sub/create-sub-account', params);
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Add Sub-Account API (UTA)
|
|
272
|
+
* Create an API key for a sub-account. Added 2026.05.15.
|
|
273
|
+
*/
|
|
274
|
+
addSubAccountApi(params) {
|
|
275
|
+
return this.postPrivate('api/ua/v1/user/create-sub-api-key', params);
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Get Withdrawal Quotas (UTA)
|
|
279
|
+
* Obtain withdrawal quota information for a currency. Added 2026.05.15.
|
|
280
|
+
*/
|
|
281
|
+
getWithdrawalQuotas(params) {
|
|
282
|
+
return this.getPrivate('api/ua/v1/withdrawals/quotas', params);
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Withdraw (UTA)
|
|
286
|
+
* Withdraw the specified currency. Added 2026.05.15.
|
|
287
|
+
*/
|
|
288
|
+
submitWithdraw(params) {
|
|
289
|
+
return this.postPrivate('api/ua/v1/withdrawal', params);
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Cancel Withdrawal (UTA)
|
|
293
|
+
* Cancel a withdrawal request in PROCESSING status. Added 2026.05.15.
|
|
294
|
+
*/
|
|
295
|
+
cancelWithdrawal(params) {
|
|
296
|
+
return this.deletePrivate('api/ua/v1/withdrawal', params);
|
|
297
|
+
}
|
|
246
298
|
/**
|
|
247
299
|
* Get Third-Party Custody Account Currency Limits
|
|
248
300
|
* OES remaining custody quota per custodian and settlement currency.
|
|
@@ -262,6 +314,7 @@ export class UnifiedAPIClient extends BaseRestClient {
|
|
|
262
314
|
* Note: timeInForce supports 'RPI' value for Futures only (Phase 1).
|
|
263
315
|
* Note: For Classic mode, tradeType is required in query param.
|
|
264
316
|
* Note: For Unified mode, tradeType is sent in the request body (incl. MARGIN as of 2026.04.19).
|
|
317
|
+
* Note: closeOrder supported for closing futures position by symbol.
|
|
265
318
|
*/
|
|
266
319
|
placeOrder(params, accountMode = 'unified') {
|
|
267
320
|
const { tradeType, ...bodyParams } = params;
|
|
@@ -349,7 +402,7 @@ export class UnifiedAPIClient extends BaseRestClient {
|
|
|
349
402
|
}
|
|
350
403
|
/**
|
|
351
404
|
* Batch Cancel Orders By Symbol
|
|
352
|
-
* Cancels orders in batch by symbol. UTA only. Supports SPOT (non-margin) and
|
|
405
|
+
* Cancels orders in batch by symbol. UTA only. Supports SPOT (non-margin), FUTURES, and MARGIN (Spot-Margin as of 2026.05.15).
|
|
353
406
|
*/
|
|
354
407
|
batchCancelOrdersBySymbol(params) {
|
|
355
408
|
return this.postPrivate('api/ua/v1/unified/order/cancel-all', params);
|
|
@@ -382,10 +435,26 @@ export class UnifiedAPIClient extends BaseRestClient {
|
|
|
382
435
|
* Get the position details of all open positions.
|
|
383
436
|
* Note: creationTime standardized to nanoseconds as of 2026.01.12.
|
|
384
437
|
* Note: pageNumber, pageSize query params and liquidationPrice in each position (as of 2026.04.09).
|
|
438
|
+
* Note: adlPercentage added 2026.05.15.
|
|
439
|
+
* Note: positionMargin and riskRatio added in latest UTA update.
|
|
385
440
|
*/
|
|
386
441
|
getPositionList(params) {
|
|
387
442
|
return this.getPrivate('api/ua/v1/unified/position/open-list', params);
|
|
388
443
|
}
|
|
444
|
+
/**
|
|
445
|
+
* Batch Modify Margin Mode (UTA)
|
|
446
|
+
* Batch modify the margin mode for futures positions.
|
|
447
|
+
*/
|
|
448
|
+
batchModifyMarginMode(params) {
|
|
449
|
+
return this.postPrivate('api/ua/v1/unified/position/margin-mode', params);
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* Modify Isolated Futures Margin (UTA)
|
|
453
|
+
* Extract or add margin for an isolated futures position.
|
|
454
|
+
*/
|
|
455
|
+
modifyIsolatedFuturesMargin(params) {
|
|
456
|
+
return this.postPrivate('api/ua/v1/unified/position/modify-margin', params);
|
|
457
|
+
}
|
|
389
458
|
/**
|
|
390
459
|
* Get Positions History (UTA)
|
|
391
460
|
* Query position history information records.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnifiedAPIClient.js","sourceRoot":"","sources":["../../src/UnifiedAPIClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAkB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"UnifiedAPIClient.js","sourceRoot":"","sources":["../../src/UnifiedAPIClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAkB,MAAM,uBAAuB,CAAC;AAyG9E;;;;;GAKG;AACH,MAAM,OAAO,gBAAiB,SAAQ,cAAc;IAClD,aAAa;QACX,OAAO,qBAAqB,CAAC,qBAAqB,CAAC;IACrD,CAAC;IAED;;;;OAIG;IAEH;;;;OAIG;IACH,gBAAgB,CACd,MAAmC;QAEnC,OAAO,IAAI,CAAC,GAAG,CAAC,+BAA+B,EAAE,MAAM,CAAC,CAAC;IAC3D,CAAC;IAED;;;OAGG;IACH,WAAW,CACT,M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AAE,MAAM,CAAC,CAAC;IAC5E,CAAC;CACF"}
|
|
@@ -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
|
+
}
|