kucoin-api 2.6.1 → 2.6.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/README.md +21 -23
- package/dist/cjs/UnifiedAPIClient.d.ts +37 -2
- package/dist/cjs/UnifiedAPIClient.js +49 -0
- package/dist/cjs/UnifiedAPIClient.js.map +1 -1
- package/dist/cjs/types/request/futures.types.d.ts +11 -0
- package/dist/cjs/types/request/spot-account.d.ts +2 -0
- package/dist/cjs/types/request/spot-margin-trading.d.ts +9 -0
- package/dist/cjs/types/request/spot-trading.d.ts +12 -0
- package/dist/cjs/types/request/uta-types.d.ts +36 -0
- package/dist/cjs/types/response/uta-types.d.ts +111 -1
- package/dist/cjs/types/websockets/ws-events.d.ts +27 -0
- package/dist/mjs/UnifiedAPIClient.d.ts +37 -2
- package/dist/mjs/UnifiedAPIClient.js +49 -0
- package/dist/mjs/UnifiedAPIClient.js.map +1 -1
- package/dist/mjs/types/request/futures.types.d.ts +11 -0
- package/dist/mjs/types/request/spot-account.d.ts +2 -0
- package/dist/mjs/types/request/spot-margin-trading.d.ts +9 -0
- package/dist/mjs/types/request/spot-trading.d.ts +12 -0
- package/dist/mjs/types/request/uta-types.d.ts +36 -0
- package/dist/mjs/types/response/uta-types.d.ts +111 -1
- package/dist/mjs/types/websockets/ws-events.d.ts +27 -0
- package/llms.txt +12249 -10087
- package/package.json +15 -7
package/README.md
CHANGED
|
@@ -1,27 +1,24 @@
|
|
|
1
1
|
# Node.js & JavaScript SDK for KuCoin REST APIs, Websockets & WebSocket API
|
|
2
2
|
|
|
3
|
-
[](https://github.com/sieblyio/kucoin-api/actions/workflows/e2etest.yml)
|
|
4
4
|
[][1]
|
|
5
5
|
[][1]
|
|
6
6
|
[][1]
|
|
7
|
-
[][1]
|
|
8
8
|
[](https://t.me/nodetraders)
|
|
9
|
-
[](https://deepwiki.com/
|
|
9
|
+
[](https://deepwiki.com/sieblyio/kucoin-api)
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
12
|
<a href="https://www.npmjs.com/package/kucoin-api">
|
|
13
13
|
<picture>
|
|
14
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/
|
|
15
|
-
<img alt="SDK Logo" src="https://github.com/
|
|
14
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/sieblyio/kucoin-api/blob/master/docs/images/logoDarkMode2.svg?raw=true#gh-dark-mode-only">
|
|
15
|
+
<img alt="SDK Logo" src="https://github.com/sieblyio/kucoin-api/blob/master/docs/images/logoBrightMode2.svg?raw=true#gh-light-mode-only">
|
|
16
16
|
</picture>
|
|
17
17
|
</a>
|
|
18
18
|
</p>
|
|
19
19
|
|
|
20
20
|
[1]: https://www.npmjs.com/package/kucoin-api
|
|
21
21
|
|
|
22
|
-
> [!TIP]
|
|
23
|
-
> Upcoming change: As part of the Siebly.io brand, this SDK will soon be hosted under the [Siebly.io GitHub organisation](https://github.com/sieblyio). The migration is seamless and requires no user changes.
|
|
24
|
-
|
|
25
22
|
Updated & performant JavaScript & Node.js SDK for the KuCoin REST APIs and WebSockets:
|
|
26
23
|
|
|
27
24
|
- Professional, robust & performant KuCoin SDK with extensive production use in live trading environments.
|
|
@@ -47,6 +44,7 @@ Updated & performant JavaScript & Node.js SDK for the KuCoin REST APIs and WebSo
|
|
|
47
44
|
- Proxy support via axios integration.
|
|
48
45
|
- Active community support & collaboration in telegram: [Node.js Algo Traders](https://t.me/nodetraders).
|
|
49
46
|
- QuickStart Guide: [Kucoin JavaScript QuickStart Guide](https://siebly.io/sdk/kucoin/javascript)
|
|
47
|
+
- KuCoin JavaScript Tutorial: [KuCoin JavaScript REST API and WebSocket Tutorial](https://siebly.io/sdk/kucoin/javascript/tutorial)
|
|
50
48
|
|
|
51
49
|
## Table of Contents
|
|
52
50
|
|
|
@@ -87,7 +85,7 @@ Refer to the [examples](./examples) folder for implementation demos.
|
|
|
87
85
|
|
|
88
86
|
## Issues & Discussion
|
|
89
87
|
|
|
90
|
-
- Issues? Check the [issues tab](https://github.com/
|
|
88
|
+
- Issues? Check the [issues tab](https://github.com/sieblyio/kucoin-api/issues).
|
|
91
89
|
- Discuss & collaborate with other node devs? Join our [Node.js Algo Traders](https://t.me/nodetraders) engineering community on telegram.
|
|
92
90
|
- Follow our announcement channel for real-time updates on [X/Twitter](https://x.com/sieblyio)
|
|
93
91
|
|
|
@@ -97,22 +95,22 @@ Refer to the [examples](./examples) folder for implementation demos.
|
|
|
97
95
|
|
|
98
96
|
Check out our JavaScript/TypeScript/Node.js SDKs & Projects:
|
|
99
97
|
|
|
100
|
-
- Visit our website: [https://Siebly.io](https://siebly.io
|
|
98
|
+
- Visit our website: [https://Siebly.io](https://siebly.io/)
|
|
101
99
|
- Try our REST API & WebSocket SDKs published on npmjs:
|
|
102
|
-
- [Bybit
|
|
103
|
-
- [Kraken
|
|
104
|
-
- [OKX
|
|
105
|
-
- [Binance
|
|
106
|
-
- [Gate (gate.com)
|
|
107
|
-
- [Bitget
|
|
108
|
-
- [
|
|
109
|
-
- [Coinbase
|
|
110
|
-
- [
|
|
100
|
+
- [Bybit JavaScript SDK: bybit-api](https://www.npmjs.com/package/bybit-api)
|
|
101
|
+
- [Kraken JavaScript SDK: @siebly/kraken-api](https://www.npmjs.com/package/@siebly/kraken-api)
|
|
102
|
+
- [OKX JavaScript SDK: okx-api](https://www.npmjs.com/package/okx-api)
|
|
103
|
+
- [Binance JavaScript SDK: binance](https://www.npmjs.com/package/binance)
|
|
104
|
+
- [Gate (gate.com) JavaScript SDK: gateio-api](https://www.npmjs.com/package/gateio-api)
|
|
105
|
+
- [Bitget JavaScript SDK: bitget-api](https://www.npmjs.com/package/bitget-api)
|
|
106
|
+
- [Kucoin JavaScript SDK: kucoin-api](https://www.npmjs.com/package/kucoin-api)
|
|
107
|
+
- [Coinbase JavaScript SDK: coinbase-api](https://www.npmjs.com/package/coinbase-api)
|
|
108
|
+
- [HTX JavaScript SDK: @siebly/htx-api](https://www.npmjs.com/package/@siebly/htx-api)
|
|
111
109
|
- Try my misc utilities:
|
|
112
110
|
- [OrderBooks Node.js: orderbooks](https://www.npmjs.com/package/orderbooks)
|
|
113
111
|
- [Crypto Exchange Account State Cache: accountstate](https://www.npmjs.com/package/accountstate)
|
|
114
112
|
- Check out my examples:
|
|
115
|
-
- [awesome-crypto-examples Node.js](https://github.com/
|
|
113
|
+
- [awesome-crypto-examples Node.js](https://github.com/sieblyio/awesome-crypto-examples)
|
|
116
114
|
<!-- template_related_projects_end -->
|
|
117
115
|
|
|
118
116
|
## Documentation
|
|
@@ -529,7 +527,7 @@ This file contains AI optimised structure of all the functions in this package,
|
|
|
529
527
|
|
|
530
528
|
## Used By
|
|
531
529
|
|
|
532
|
-
[](https://github.com/sieblyio/kucoin-api/network/dependents)
|
|
533
531
|
|
|
534
532
|
---
|
|
535
533
|
|
|
@@ -547,7 +545,7 @@ Have my projects helped you? Share the love, there are many ways you can show yo
|
|
|
547
545
|
- Sign up with my referral links:
|
|
548
546
|
- OKX (receive a 20% fee discount!): https://www.okx.com/join/42013004
|
|
549
547
|
- Binance (receive a 20% fee discount!): https://accounts.binance.com/register?ref=OKFFGIJJ
|
|
550
|
-
- HyperLiquid (receive a 4% fee discount!): https://app.hyperliquid.xyz/join/
|
|
548
|
+
- HyperLiquid (receive a 4% fee discount!): https://app.hyperliquid.xyz/join/SIEBLY
|
|
551
549
|
- Gate: https://www.gate.io/signup/NODESDKS?ref_type=103
|
|
552
550
|
|
|
553
551
|
<!---
|
|
@@ -569,6 +567,6 @@ Contributions are encouraged, I will review any incoming pull requests. See the
|
|
|
569
567
|
|
|
570
568
|
## Star History
|
|
571
569
|
|
|
572
|
-
[](https://star-history.com/#sieblyio/bybit-api&sieblyio/okx-api&sieblyio/binance&sieblyio/bitget-api&sieblyio/bitmart-api&sieblyio/gateio-api&sieblyio/kucoin-api&sieblyio/coinbase-api&sieblyio/orderbooks&sieblyio/accountstate&sieblyio/awesome-crypto-examples&Date)
|
|
573
571
|
|
|
574
572
|
<!-- template_star_history_end -->
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BaseRestClient } from './lib/BaseRestClient.js';
|
|
2
2
|
import type { RestClientType } from './lib/requestUtils.js';
|
|
3
|
-
import type { AddSubAccountApiRequestUTA, AddSubAccountRequestUTA, BatchCancelOrdersBySymbolRequestUTA, BatchCancelOrdersRequestUTA, BatchModifyMarginModeRequestUTA, BatchPlaceOrderRequestUTA, CancelOrderRequestUTA, FlexTransferRequestUTA, GetAccountLedgerRequestUTA, GetAccountPositionTiersRequestUTA, GetAnnouncementsRequestUTA, GetBorrowingRatesAndLimitsRequestUTA, GetClassicAccountRequestUTA, GetCurrencyRequestUTA, GetCurrentFundingRateRequestUTA, GetDCPRequestUTA, GetDepositAddressRequestUTA, GetFeeRateRequestUTA, GetFiatPriceRequestUTA, GetHistoryFundingRateRequestUTA, GetInterestHistoryRequestUTA, GetKlinesRequestUTA, GetLeverageRequestUTA, GetOpenOrderListRequestUTA, GetOrderBookRequestUTA, GetOrderDetailsRequestUTA, GetOrderHistoryRequestUTA, GetPositionListRequestUTA, GetPositionsHistoryRequestUTA, GetPrivateFundingFeeHistoryRequestUTA, GetRateLimitRequestUTA, GetServiceStatusRequestUTA, GetSubAccountRequestUTA, GetSymbolRequestUTA, GetThirdPartyCustodyCurrenciesRequestUTA, GetThirdPartyCustodyQuotaRequestUTA, GetTickerRequestUTA, GetTradeHistoryRequestUTA, GetTradesRequestUTA, GetTransferQuotasRequestUTA, GetWithdrawalQuotasRequestUTA, ModifyIsolatedFuturesMarginRequestUTA, ModifyLeverageRequestUTA, ModifyMarginCrossLeverageRequestUTA, PlaceOrderRequestUTA, SetAccountModeRequestUTA, SetDCPRequestUTA, SetSubAccountsRateLimitRequestUTA, SetSubAccountTransferPermissionRequestUTA, SubmitWithdrawRequestUTA } from './types/request/uta-types.js';
|
|
3
|
+
import type { AddSubAccountApiRequestUTA, AddSubAccountRequestUTA, BatchCancelOrdersBySymbolRequestUTA, BatchCancelOrdersRequestUTA, BatchModifyMarginModeRequestUTA, BatchPlaceOrderRequestUTA, CancelOrderRequestUTA, FlexTransferRequestUTA, GetAccountLedgerRequestUTA, GetAccountPositionTiersRequestUTA, GetAnnouncementsRequestUTA, GetBorrowingRatesAndLimitsRequestUTA, GetCallAuctionInfoRequestUTA, GetClassicAccountRequestUTA, GetCurrencyRequestUTA, GetCurrentFundingRateRequestUTA, GetDCPRequestUTA, GetDepositAddressRequestUTA, GetDepositHistoryRequestUTA, GetFeeRateRequestUTA, GetFiatPriceRequestUTA, GetHistoryFundingRateRequestUTA, GetInterestHistoryRequestUTA, GetInterestRateIndexRequestUTA, GetKlinesRequestUTA, GetLeverageRequestUTA, GetOpenOrderListRequestUTA, GetOrderBookRequestUTA, GetOrderDetailsRequestUTA, GetOrderHistoryRequestUTA, GetPositionListRequestUTA, GetPositionsHistoryRequestUTA, GetPrivateFundingFeeHistoryRequestUTA, GetRateLimitRequestUTA, GetServiceStatusRequestUTA, GetSubAccountListRequestUTA, GetSubAccountRequestUTA, GetSymbolRequestUTA, GetThirdPartyCustodyCurrenciesRequestUTA, GetThirdPartyCustodyQuotaRequestUTA, GetTickerRequestUTA, GetTradeHistoryRequestUTA, GetTradesRequestUTA, GetTransferQuotasRequestUTA, GetWithdrawalHistoryRequestUTA, GetWithdrawalQuotasRequestUTA, ModifyIsolatedFuturesMarginRequestUTA, ModifyLeverageRequestUTA, ModifyMarginCrossLeverageRequestUTA, PlaceOrderRequestUTA, SetAccountModeRequestUTA, SetDCPRequestUTA, SetKcsFeeDeductionRequestUTA, SetSubAccountsRateLimitRequestUTA, SetSubAccountTransferPermissionRequestUTA, SubmitWithdrawRequestUTA } from './types/request/uta-types.js';
|
|
4
4
|
import type { APISuccessResponse } from './types/response/shared.types.js';
|
|
5
|
-
import type { AddSubAccountApiResponseUTA, AddSubAccountResponseUTA, ApiKeyInfoUTA, BatchCancelOrdersBySymbolResponseUTA, BatchCancelOrdersResponseUTA, BatchModifyMarginModeResponseUTA, BatchPlaceOrderResponseUTA, BorrowableCurrencyUTA, CancelOrderResponseUTA, DCPResponseUTA, DepositAddressUTA, FlexTransferResponseUTA, GetAccountLedgerResponseClassicUTA, GetAccountLedgerResponseUTA, GetAccountModeResponseUTA, GetAccountOverviewResponseUTA, GetAnnouncementsResponseUTA, GetBorrowingRatesAndLimitsResponseUTA, GetClassicAccountResponseUTA, GetCrossMarginConfigResponseUTA, GetCurrencyResponseUTA, GetCurrentFundingRateResponseUTA, GetFeeRateResponseUTA, GetFiatPriceResponseUTA, GetHistoryFundingRateResponseUTA, GetInterestHistoryResponseUTA, GetKlinesResponseUTA, GetLeverageItemUTA, GetOpenOrderListResponseUTA, GetOrderBookResponseUTA, GetOrderHistoryResponseUTA, GetPositionsHistoryResponseUTA, GetPrivateFundingFeeHistoryResponseUTA, GetRateLimitCapResponseUTA, GetRateLimitResponseUTA, GetServiceStatusResponseUTA, GetSubAccountResponseUTA, GetSymbolResponseUTA, GetTickerResponseUTA, GetTradeHistoryResponseUTA, GetTradesResponseUTA, GetTransferQuotasResponseUTA, KYCRegionUTA, ModifyIsolatedFuturesMarginResponseUTA, ModifyMarginCrossLeverageResponseUTA, OrderDetailsUTA, PlaceOrderResponseUTA, PositionTierUTA, PositionUTA, SetSubAccountsRateLimitResponseUTA, SubAccountTransferPermissionUTA, SubmitWithdrawResponseUTA, ThirdPartyCustodyCurrencyUTA, ThirdPartyCustodyQuotaUTA, WithdrawalQuotasUTA } from './types/response/uta-types.js';
|
|
5
|
+
import type { AddSubAccountApiResponseUTA, AddSubAccountResponseUTA, ApiKeyInfoUTA, BatchCancelOrdersBySymbolResponseUTA, BatchCancelOrdersResponseUTA, BatchModifyMarginModeResponseUTA, BatchPlaceOrderResponseUTA, BorrowableCurrencyUTA, CancelOrderResponseUTA, DCPResponseUTA, DepositAddressUTA, FlexTransferResponseUTA, GetAccountLedgerResponseClassicUTA, GetAccountLedgerResponseUTA, GetAccountModeResponseUTA, GetAccountOverviewResponseUTA, GetAnnouncementsResponseUTA, GetBorrowingRatesAndLimitsResponseUTA, GetCallAuctionInfoResponseUTA, GetClassicAccountResponseUTA, GetCrossMarginConfigResponseUTA, GetCurrencyResponseUTA, GetCurrentFundingRateResponseUTA, GetDepositHistoryResponseUTA, GetFeeRateResponseUTA, GetFiatPriceResponseUTA, GetHistoryFundingRateResponseUTA, GetInterestHistoryResponseUTA, GetInterestRateIndexResponseUTA, GetKlinesResponseUTA, GetLeverageItemUTA, GetOpenOrderListResponseUTA, GetOrderBookResponseUTA, GetOrderHistoryResponseUTA, GetPositionsHistoryResponseUTA, GetPrivateFundingFeeHistoryResponseUTA, GetRateLimitCapResponseUTA, GetRateLimitResponseUTA, GetServiceStatusResponseUTA, GetSubAccountListResponseUTA, GetSubAccountResponseUTA, GetSymbolResponseUTA, GetTickerResponseUTA, GetTradeHistoryResponseUTA, GetTradesResponseUTA, GetTradeStatisticsResponseUTA, GetTransferQuotasResponseUTA, GetWithdrawalHistoryResponseUTA, KYCRegionUTA, ModifyIsolatedFuturesMarginResponseUTA, ModifyMarginCrossLeverageResponseUTA, OrderDetailsUTA, PlaceOrderResponseUTA, PositionTierUTA, PositionUTA, SetKcsFeeDeductionResponseUTA, SetSubAccountsRateLimitResponseUTA, SubAccountTransferPermissionUTA, SubmitWithdrawResponseUTA, ThirdPartyCustodyCurrencyUTA, ThirdPartyCustodyQuotaUTA, WithdrawalQuotasUTA } from './types/response/uta-types.js';
|
|
6
6
|
/**
|
|
7
7
|
* Unified Trading Account Client
|
|
8
8
|
*
|
|
@@ -92,6 +92,21 @@ export declare class UnifiedAPIClient extends BaseRestClient {
|
|
|
92
92
|
* Request the fiat price of currencies for available trading pairs. Added 2026.07.01.
|
|
93
93
|
*/
|
|
94
94
|
getFiatPrice(params?: GetFiatPriceRequestUTA): Promise<APISuccessResponse<GetFiatPriceResponseUTA>>;
|
|
95
|
+
/**
|
|
96
|
+
* Get Interest Rate Index (UTA)
|
|
97
|
+
* Interest rate index records by symbol. Added 2026.07.17.
|
|
98
|
+
*/
|
|
99
|
+
getInterestRateIndex(params: GetInterestRateIndexRequestUTA): Promise<APISuccessResponse<GetInterestRateIndexResponseUTA>>;
|
|
100
|
+
/**
|
|
101
|
+
* Platform 24h Market Statistics (UTA)
|
|
102
|
+
* Spot and futures 24h turnover. Added 2026.07.17.
|
|
103
|
+
*/
|
|
104
|
+
getTradeStatistics(): Promise<APISuccessResponse<GetTradeStatisticsResponseUTA>>;
|
|
105
|
+
/**
|
|
106
|
+
* Get Call Auction Info (UTA)
|
|
107
|
+
* Estimated price/size and bid/ask ranges during call auction. Added 2026.07.17.
|
|
108
|
+
*/
|
|
109
|
+
getCallAuctionInfo(params: GetCallAuctionInfoRequestUTA): Promise<APISuccessResponse<GetCallAuctionInfoResponseUTA>>;
|
|
95
110
|
/**
|
|
96
111
|
*
|
|
97
112
|
* REST - Unified Trading Account - Account
|
|
@@ -118,6 +133,11 @@ export declare class UnifiedAPIClient extends BaseRestClient {
|
|
|
118
133
|
* Request sub account info via this endpoint.
|
|
119
134
|
*/
|
|
120
135
|
getSubAccount(params?: GetSubAccountRequestUTA): Promise<APISuccessResponse<GetSubAccountResponseUTA>>;
|
|
136
|
+
/**
|
|
137
|
+
* Get Sub-account List (UTA)
|
|
138
|
+
* Paginated list of sub-accounts. Added 2026.08.03.
|
|
139
|
+
*/
|
|
140
|
+
getSubAccountList(params?: GetSubAccountListRequestUTA): Promise<APISuccessResponse<GetSubAccountListResponseUTA>>;
|
|
121
141
|
/**
|
|
122
142
|
* Get Transfer Quotas
|
|
123
143
|
* This endpoint returns the transferable balance of a specified account.
|
|
@@ -196,6 +216,21 @@ export declare class UnifiedAPIClient extends BaseRestClient {
|
|
|
196
216
|
* URL unified to GET /api/ua/v1/asset/deposit/address as of 2026.01.17.
|
|
197
217
|
*/
|
|
198
218
|
getDepositAddress(params: GetDepositAddressRequestUTA): Promise<APISuccessResponse<DepositAddressUTA[]>>;
|
|
219
|
+
/**
|
|
220
|
+
* Get Deposit History (UTA)
|
|
221
|
+
* Paginated deposit records. Added 2026.08.03.
|
|
222
|
+
*/
|
|
223
|
+
getDepositHistory(params?: GetDepositHistoryRequestUTA): Promise<APISuccessResponse<GetDepositHistoryResponseUTA>>;
|
|
224
|
+
/**
|
|
225
|
+
* Get Withdrawal History (UTA)
|
|
226
|
+
* Paginated withdrawal records. Added 2026.08.03.
|
|
227
|
+
*/
|
|
228
|
+
getWithdrawalHistory(params?: GetWithdrawalHistoryRequestUTA): Promise<APISuccessResponse<GetWithdrawalHistoryResponseUTA>>;
|
|
229
|
+
/**
|
|
230
|
+
* KCS Fee Deduction Management (UTA)
|
|
231
|
+
* Enable or disable KCS fee deduction. Added 2026.08.03.
|
|
232
|
+
*/
|
|
233
|
+
setKcsFeeDeduction(params: SetKcsFeeDeductionRequestUTA): Promise<APISuccessResponse<SetKcsFeeDeductionResponseUTA>>;
|
|
199
234
|
/**
|
|
200
235
|
* Get API Key Info (UTA)
|
|
201
236
|
* Get the API key information for the key used to call this endpoint.
|
|
@@ -124,6 +124,27 @@ class UnifiedAPIClient extends BaseRestClient_js_1.BaseRestClient {
|
|
|
124
124
|
getFiatPrice(params) {
|
|
125
125
|
return this.get('api/ua/v1/market/fiat-price', params);
|
|
126
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* Get Interest Rate Index (UTA)
|
|
129
|
+
* Interest rate index records by symbol. Added 2026.07.17.
|
|
130
|
+
*/
|
|
131
|
+
getInterestRateIndex(params) {
|
|
132
|
+
return this.get('api/ua/v1/market/interest-rate-index', params);
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Platform 24h Market Statistics (UTA)
|
|
136
|
+
* Spot and futures 24h turnover. Added 2026.07.17.
|
|
137
|
+
*/
|
|
138
|
+
getTradeStatistics() {
|
|
139
|
+
return this.get('api/ua/v1/trade-statistics');
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Get Call Auction Info (UTA)
|
|
143
|
+
* Estimated price/size and bid/ask ranges during call auction. Added 2026.07.17.
|
|
144
|
+
*/
|
|
145
|
+
getCallAuctionInfo(params) {
|
|
146
|
+
return this.get('api/ua/v1/market/call-auction-info', params);
|
|
147
|
+
}
|
|
127
148
|
/**
|
|
128
149
|
*
|
|
129
150
|
* REST - Unified Trading Account - Account
|
|
@@ -158,6 +179,13 @@ class UnifiedAPIClient extends BaseRestClient_js_1.BaseRestClient {
|
|
|
158
179
|
getSubAccount(params) {
|
|
159
180
|
return this.getPrivate('api/ua/v1/sub-account/balance', params);
|
|
160
181
|
}
|
|
182
|
+
/**
|
|
183
|
+
* Get Sub-account List (UTA)
|
|
184
|
+
* Paginated list of sub-accounts. Added 2026.08.03.
|
|
185
|
+
*/
|
|
186
|
+
getSubAccountList(params) {
|
|
187
|
+
return this.getPrivate('api/ua/v1/user/sub-account-list', params);
|
|
188
|
+
}
|
|
161
189
|
/**
|
|
162
190
|
* Get Transfer Quotas
|
|
163
191
|
* This endpoint returns the transferable balance of a specified account.
|
|
@@ -262,6 +290,27 @@ class UnifiedAPIClient extends BaseRestClient_js_1.BaseRestClient {
|
|
|
262
290
|
getDepositAddress(params) {
|
|
263
291
|
return this.getPrivate('api/ua/v1/asset/deposit/address', params);
|
|
264
292
|
}
|
|
293
|
+
/**
|
|
294
|
+
* Get Deposit History (UTA)
|
|
295
|
+
* Paginated deposit records. Added 2026.08.03.
|
|
296
|
+
*/
|
|
297
|
+
getDepositHistory(params) {
|
|
298
|
+
return this.getPrivate('api/ua/v1/asset/deposit/history', params);
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Get Withdrawal History (UTA)
|
|
302
|
+
* Paginated withdrawal records. Added 2026.08.03.
|
|
303
|
+
*/
|
|
304
|
+
getWithdrawalHistory(params) {
|
|
305
|
+
return this.getPrivate('api/ua/v1/asset/withdrawal/history', params);
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* KCS Fee Deduction Management (UTA)
|
|
309
|
+
* Enable or disable KCS fee deduction. Added 2026.08.03.
|
|
310
|
+
*/
|
|
311
|
+
setKcsFeeDeduction(params) {
|
|
312
|
+
return this.getPrivate('api/ua/v1/account/fee/kcs-deduct', params);
|
|
313
|
+
}
|
|
265
314
|
/**
|
|
266
315
|
* Get API Key Info (UTA)
|
|
267
316
|
* Get the API key information for the key used to call this endpoint.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnifiedAPIClient.js","sourceRoot":"","sources":["../../src/UnifiedAPIClient.ts"],"names":[],"mappings":";;;AAAA,+DAAyD;AAKzD,2DAG+B;
|
|
1
|
+
{"version":3,"file":"UnifiedAPIClient.js","sourceRoot":"","sources":["../../src/UnifiedAPIClient.ts"],"names":[],"mappings":";;;AAAA,+DAAyD;AAKzD,2DAG+B;AA6H/B;;;;;GAKG;AACH,MAAa,gBAAiB,SAAQ,kCAAc;IAClD,aAAa;QACX,OAAO,uCAAqB,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,MAA8B;QAE9B,OAAO,IAAI,CAAC,GAAG,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC;IACvD,CAAC;IAED;;;OAGG;IACH,8BAA8B,CAC5B,MAAiD;QAEjD,OAAO,IAAI,CAAC,GAAG,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC;IACpD,CAAC;IAED;;;OAGG;IACH,UAAU,CACR,MAA2B;QAE3B,OAAO,IAAI,CAAC,GAAG,CAAC,6BAA6B,EAAE,MAAM,CAAC,CAAC;IACzD,CAAC;IAED;;;OAGG;IACH,UAAU,CACR,MAA2B;QAE3B,OAAO,IAAI,CAAC,GAAG,CAAC,yBAAyB,EAAE,MAAM,CAAC,CAAC;IACrD,CAAC;IAED;;;OAGG;IACH,SAAS,CACP,MAA2B;QAE3B,OAAO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IACvE,CAAC;IAED;;;;OAIG;IACH,uBAAuB,CACrB,MAAyC,EACzC,cAAqC,SAAS;QAE9C,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,WAAW,iBAAiB,EAAE,MAAM,CAAC,CAAC;IAC5E,CAAC;CACF;AAlyBD,4CAkyBC"}
|
|
@@ -23,6 +23,7 @@ export interface CreateSubAPIRequest {
|
|
|
23
23
|
passphrase: string;
|
|
24
24
|
remark: string;
|
|
25
25
|
permission?: string;
|
|
26
|
+
/** Required when permission includes Transfer (Withdraw); optional otherwise (as of 2026.08.12) */
|
|
26
27
|
ipWhitelist?: string;
|
|
27
28
|
expire?: string;
|
|
28
29
|
}
|
|
@@ -31,6 +32,7 @@ export interface UpdateSubAPIRequest {
|
|
|
31
32
|
apiKey: string;
|
|
32
33
|
passphrase: string;
|
|
33
34
|
permission?: string;
|
|
35
|
+
/** Required when permission includes Transfer (Withdraw); optional otherwise (as of 2026.08.12) */
|
|
34
36
|
ipWhitelist?: string;
|
|
35
37
|
expire?: string;
|
|
36
38
|
}
|
|
@@ -118,8 +120,11 @@ export interface Order {
|
|
|
118
120
|
*/
|
|
119
121
|
timeInForce?: 'GTC' | 'IOC' | 'RPI';
|
|
120
122
|
postOnly?: boolean;
|
|
123
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
121
124
|
hidden?: boolean;
|
|
125
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
122
126
|
iceberg?: boolean;
|
|
127
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
123
128
|
visibleSize?: string;
|
|
124
129
|
positionSide?: 'BOTH' | 'LONG' | 'SHORT';
|
|
125
130
|
}
|
|
@@ -150,8 +155,11 @@ export interface SLTPOrder {
|
|
|
150
155
|
*/
|
|
151
156
|
timeInForce?: 'GTC' | 'IOC' | 'RPI';
|
|
152
157
|
postOnly?: boolean;
|
|
158
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
153
159
|
hidden?: boolean;
|
|
160
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
154
161
|
iceberg?: boolean;
|
|
162
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
155
163
|
visibleSize?: string;
|
|
156
164
|
}
|
|
157
165
|
export interface GetOrdersRequest {
|
|
@@ -260,8 +268,11 @@ export interface CopyTradeOrderRequest {
|
|
|
260
268
|
*/
|
|
261
269
|
timeInForce?: 'GTC' | 'IOC' | 'RPI';
|
|
262
270
|
postOnly?: boolean;
|
|
271
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
263
272
|
hidden?: boolean;
|
|
273
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
264
274
|
iceberg?: boolean;
|
|
275
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
265
276
|
visibleSize?: string;
|
|
266
277
|
}
|
|
267
278
|
export interface CopyTradeSLTPOrderRequest extends CopyTradeOrderRequest {
|
|
@@ -40,6 +40,7 @@ export interface CreateSubAccountAPIRequest {
|
|
|
40
40
|
passphrase: string;
|
|
41
41
|
remark: string;
|
|
42
42
|
permission?: string;
|
|
43
|
+
/** Required when permission includes Transfer (Withdraw); optional otherwise (as of 2026.08.12) */
|
|
43
44
|
ipWhitelist?: string;
|
|
44
45
|
expire?: string;
|
|
45
46
|
}
|
|
@@ -48,6 +49,7 @@ export interface UpdateSubAccountAPIRequest {
|
|
|
48
49
|
apiKey: string;
|
|
49
50
|
passphrase: string;
|
|
50
51
|
permission?: string;
|
|
52
|
+
/** Required when permission includes Transfer (Withdraw); optional otherwise (as of 2026.08.12) */
|
|
51
53
|
ipWhitelist?: string;
|
|
52
54
|
expire?: string;
|
|
53
55
|
}
|
|
@@ -24,8 +24,11 @@ export interface SubmitHFMarginOrderRequest {
|
|
|
24
24
|
timeInForce?: 'GTC' | 'GTT' | 'IOC' | 'FOK';
|
|
25
25
|
cancelAfter?: number;
|
|
26
26
|
postOnly?: boolean;
|
|
27
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
27
28
|
hidden?: boolean;
|
|
29
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
28
30
|
iceberg?: boolean;
|
|
31
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
29
32
|
visibleSize?: string;
|
|
30
33
|
funds?: string;
|
|
31
34
|
}
|
|
@@ -74,8 +77,11 @@ export interface SubmitMarginOrderRequest {
|
|
|
74
77
|
timeInForce?: 'GTC' | 'GTT' | 'IOC' | 'FOK';
|
|
75
78
|
cancelAfter?: number;
|
|
76
79
|
postOnly?: boolean;
|
|
80
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
77
81
|
hidden?: boolean;
|
|
82
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
78
83
|
iceberg?: boolean;
|
|
84
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
79
85
|
visibleSize?: string;
|
|
80
86
|
funds?: string;
|
|
81
87
|
}
|
|
@@ -191,8 +197,11 @@ export interface SubmitMarginStopOrderRequest {
|
|
|
191
197
|
timeInForce?: 'GTC' | 'GTT' | 'IOC' | 'FOK';
|
|
192
198
|
cancelAfter?: number;
|
|
193
199
|
postOnly?: boolean;
|
|
200
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
194
201
|
hidden?: boolean;
|
|
202
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
195
203
|
iceberg?: boolean;
|
|
204
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
196
205
|
visibleSize?: string;
|
|
197
206
|
funds?: string;
|
|
198
207
|
}
|
|
@@ -34,8 +34,11 @@ export interface SubmitHFOrderRequest {
|
|
|
34
34
|
timeInForce?: 'GTC' | 'GTT' | 'IOC' | 'FOK';
|
|
35
35
|
cancelAfter?: number;
|
|
36
36
|
postOnly?: boolean;
|
|
37
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
37
38
|
hidden?: boolean;
|
|
39
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
38
40
|
iceberg?: boolean;
|
|
41
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
39
42
|
visibleSize?: string;
|
|
40
43
|
funds?: string;
|
|
41
44
|
allowMaxTimeWindow?: number;
|
|
@@ -90,8 +93,11 @@ export interface SubmitOrderRequest {
|
|
|
90
93
|
timeInForce?: 'GTC' | 'GTT' | 'IOC' | 'FOK';
|
|
91
94
|
cancelAfter?: number;
|
|
92
95
|
postOnly?: boolean;
|
|
96
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
93
97
|
hidden?: boolean;
|
|
98
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
94
99
|
iceberg?: boolean;
|
|
100
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
95
101
|
visibleSize?: string;
|
|
96
102
|
funds?: string;
|
|
97
103
|
}
|
|
@@ -109,8 +115,11 @@ export interface SubmitMultipleOrdersRequest {
|
|
|
109
115
|
timeInForce?: 'GTC' | 'GTT' | 'IOC' | 'FOK';
|
|
110
116
|
cancelAfter?: number;
|
|
111
117
|
postOnly?: boolean;
|
|
118
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
112
119
|
hidden?: boolean;
|
|
120
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
113
121
|
iceberg?: boolean;
|
|
122
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
114
123
|
visibleSize?: string;
|
|
115
124
|
}
|
|
116
125
|
export interface CancelAllOrdersRequest {
|
|
@@ -161,8 +170,11 @@ export interface SubmitStopOrderRequest {
|
|
|
161
170
|
timeInForce?: 'GTC' | 'GTT' | 'IOC' | 'FOK';
|
|
162
171
|
cancelAfter?: number;
|
|
163
172
|
postOnly?: boolean;
|
|
173
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
164
174
|
hidden?: boolean;
|
|
175
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
165
176
|
iceberg?: boolean;
|
|
177
|
+
/** @deprecated Hidden/iceberg discontinued 2026.08.03 - rejected with 400413 */
|
|
166
178
|
visibleSize?: string;
|
|
167
179
|
funds?: string;
|
|
168
180
|
}
|
|
@@ -361,3 +361,39 @@ export interface GetAccountPositionTiersRequestUTA {
|
|
|
361
361
|
marginMode?: 'ISOLATED' | 'CROSS';
|
|
362
362
|
data?: 'RISK_LIMIT' | 'BORROW';
|
|
363
363
|
}
|
|
364
|
+
export interface GetSubAccountListRequestUTA {
|
|
365
|
+
currentPage?: number;
|
|
366
|
+
pageSize?: number;
|
|
367
|
+
}
|
|
368
|
+
export interface SetKcsFeeDeductionRequestUTA {
|
|
369
|
+
/** true to enable KCS fee deduction, false to disable */
|
|
370
|
+
enabled: boolean;
|
|
371
|
+
}
|
|
372
|
+
export interface GetDepositHistoryRequestUTA {
|
|
373
|
+
currency?: string;
|
|
374
|
+
id?: string;
|
|
375
|
+
startAt?: number;
|
|
376
|
+
endAt?: number;
|
|
377
|
+
currentPage?: number;
|
|
378
|
+
pageSize?: number;
|
|
379
|
+
status?: string;
|
|
380
|
+
}
|
|
381
|
+
export interface GetWithdrawalHistoryRequestUTA {
|
|
382
|
+
currency?: string;
|
|
383
|
+
id?: string;
|
|
384
|
+
currentPage?: number;
|
|
385
|
+
pageSize?: number;
|
|
386
|
+
startAt?: number;
|
|
387
|
+
endAt?: number;
|
|
388
|
+
status?: string;
|
|
389
|
+
}
|
|
390
|
+
export interface GetInterestRateIndexRequestUTA {
|
|
391
|
+
symbol: string;
|
|
392
|
+
startAt?: number;
|
|
393
|
+
endAt?: number;
|
|
394
|
+
lastId?: number;
|
|
395
|
+
pageSize?: number;
|
|
396
|
+
}
|
|
397
|
+
export interface GetCallAuctionInfoRequestUTA {
|
|
398
|
+
symbol: string;
|
|
399
|
+
}
|
|
@@ -545,7 +545,12 @@ export interface TradeHistoryItemUTA {
|
|
|
545
545
|
fee: string;
|
|
546
546
|
feeCurrency: string;
|
|
547
547
|
tax: string;
|
|
548
|
-
|
|
548
|
+
/** e.g. NORMAL, ADL. When ADL, liquidityRole is empty (as of 2026.08.12) */
|
|
549
|
+
fillType?: string;
|
|
550
|
+
/** Empty when fillType is ADL (as of 2026.08.12) */
|
|
551
|
+
liquidityRole?: 'TAKER' | 'MAKER' | '';
|
|
552
|
+
/** @deprecated Prefer liquidityRole */
|
|
553
|
+
liquidity?: 'TAKER' | 'MAKER' | '';
|
|
549
554
|
/** Execution time in nanoseconds (standardized as of 2026.01.12) */
|
|
550
555
|
executionTime: number;
|
|
551
556
|
/** Whether it is an RPI trade (added 2025.01.02, Futures only) */
|
|
@@ -619,6 +624,8 @@ export interface PositionUTA {
|
|
|
619
624
|
maintenanceMargin: string;
|
|
620
625
|
/** Timestamp when position was first opened (nanoseconds, standardized as of 2026.01.12) */
|
|
621
626
|
creationTime: number;
|
|
627
|
+
/** Latest position update time (leverage/size changes). Added 2026.08.12 */
|
|
628
|
+
updateTime?: number;
|
|
622
629
|
/** Estimated liquidation price (as of 2026.04.09) */
|
|
623
630
|
liquidationPrice: string;
|
|
624
631
|
/** ADL ranking percentile (0.12 = 12%). Added 2026.05.15 */
|
|
@@ -708,3 +715,106 @@ export interface SetSubAccountsRateLimitResultUTA {
|
|
|
708
715
|
export interface SetSubAccountsRateLimitResponseUTA {
|
|
709
716
|
items: SetSubAccountsRateLimitResultUTA[];
|
|
710
717
|
}
|
|
718
|
+
export interface SubAccountListItemUTA {
|
|
719
|
+
userId: string | null;
|
|
720
|
+
uid: number;
|
|
721
|
+
subName: string;
|
|
722
|
+
status: number;
|
|
723
|
+
type: number;
|
|
724
|
+
access: string;
|
|
725
|
+
createdAt: number;
|
|
726
|
+
remarks?: string;
|
|
727
|
+
tradeTypes: string[];
|
|
728
|
+
openedTradeTypes: string[];
|
|
729
|
+
}
|
|
730
|
+
export interface GetSubAccountListResponseUTA {
|
|
731
|
+
currentPage: number;
|
|
732
|
+
pageSize: number;
|
|
733
|
+
totalNum: number;
|
|
734
|
+
totalPage: number;
|
|
735
|
+
items: SubAccountListItemUTA[];
|
|
736
|
+
}
|
|
737
|
+
export interface SetKcsFeeDeductionResponseUTA {
|
|
738
|
+
enabled: boolean;
|
|
739
|
+
}
|
|
740
|
+
export interface DepositHistoryItemUTA {
|
|
741
|
+
id: string;
|
|
742
|
+
currency: string;
|
|
743
|
+
status: string;
|
|
744
|
+
address: string;
|
|
745
|
+
memo?: string;
|
|
746
|
+
isInner: boolean;
|
|
747
|
+
amount: string;
|
|
748
|
+
fee: string;
|
|
749
|
+
walletTxId?: string | null;
|
|
750
|
+
createdAt: number;
|
|
751
|
+
updatedAt: number;
|
|
752
|
+
remark?: string;
|
|
753
|
+
arrears?: boolean;
|
|
754
|
+
subStatus?: string | null;
|
|
755
|
+
url?: string | null;
|
|
756
|
+
statusRemark?: string;
|
|
757
|
+
preConfirms?: number;
|
|
758
|
+
confirms?: number;
|
|
759
|
+
currentConfirms?: number;
|
|
760
|
+
chainId?: string;
|
|
761
|
+
}
|
|
762
|
+
export interface GetDepositHistoryResponseUTA {
|
|
763
|
+
currentPage: number;
|
|
764
|
+
pageSize: number;
|
|
765
|
+
totalNum: number;
|
|
766
|
+
totalPage: number;
|
|
767
|
+
items: DepositHistoryItemUTA[];
|
|
768
|
+
}
|
|
769
|
+
export interface WithdrawalHistoryItemUTA {
|
|
770
|
+
id: string;
|
|
771
|
+
currency: string;
|
|
772
|
+
status: string;
|
|
773
|
+
address: string;
|
|
774
|
+
memo?: string;
|
|
775
|
+
isInner: boolean;
|
|
776
|
+
amount: string;
|
|
777
|
+
fee: string;
|
|
778
|
+
failureReason?: string;
|
|
779
|
+
failureReasonMsg?: string | null;
|
|
780
|
+
walletTxId?: string | null;
|
|
781
|
+
createdAt: number;
|
|
782
|
+
updatedAt: number;
|
|
783
|
+
remark?: string;
|
|
784
|
+
subStatus?: string | null;
|
|
785
|
+
chainId?: string;
|
|
786
|
+
}
|
|
787
|
+
export interface GetWithdrawalHistoryResponseUTA {
|
|
788
|
+
currentPage: number;
|
|
789
|
+
pageSize: number;
|
|
790
|
+
totalNum: number;
|
|
791
|
+
totalPage: number;
|
|
792
|
+
items: WithdrawalHistoryItemUTA[];
|
|
793
|
+
}
|
|
794
|
+
export interface InterestRateIndexItemUTA {
|
|
795
|
+
ts: number;
|
|
796
|
+
symbol: string;
|
|
797
|
+
interestRate: string;
|
|
798
|
+
}
|
|
799
|
+
export interface GetInterestRateIndexResponseUTA {
|
|
800
|
+
items: InterestRateIndexItemUTA[];
|
|
801
|
+
lastId?: number;
|
|
802
|
+
}
|
|
803
|
+
export interface GetTradeStatisticsResponseUTA {
|
|
804
|
+
spot: {
|
|
805
|
+
turnoverOf24h: string;
|
|
806
|
+
};
|
|
807
|
+
futures: {
|
|
808
|
+
turnoverOf24h: string;
|
|
809
|
+
};
|
|
810
|
+
}
|
|
811
|
+
export interface GetCallAuctionInfoResponseUTA {
|
|
812
|
+
symbol: string;
|
|
813
|
+
estimatedPrice: string;
|
|
814
|
+
estimatedSize: string;
|
|
815
|
+
sellOrderRangeLowPrice: string;
|
|
816
|
+
sellOrderRangeHighPrice: string;
|
|
817
|
+
buyOrderRangeLowPrice: string;
|
|
818
|
+
buyOrderRangeHighPrice: string;
|
|
819
|
+
time: number;
|
|
820
|
+
}
|
|
@@ -95,6 +95,33 @@ export interface WsUTAMarkPricePublicPush {
|
|
|
95
95
|
[key: string]: string | number | boolean | undefined;
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* UTA WebSocket public Call Auction Info channel (`channel: callAuctionInfo`).
|
|
100
|
+
* Added 2026.07.17.
|
|
101
|
+
* @see https://www.kucoin.com/docs-new/3470268w0
|
|
102
|
+
*/
|
|
103
|
+
export interface WsUTACallAuctionInfoPublicPush {
|
|
104
|
+
T: string;
|
|
105
|
+
t?: string;
|
|
106
|
+
P: number;
|
|
107
|
+
d: {
|
|
108
|
+
s: string;
|
|
109
|
+
/** Estimated price */
|
|
110
|
+
eq?: number | string;
|
|
111
|
+
/** Estimated size */
|
|
112
|
+
es?: number | string;
|
|
113
|
+
/** Sell order range low price */
|
|
114
|
+
slp?: number | string;
|
|
115
|
+
/** Sell order range high price */
|
|
116
|
+
shp?: number | string;
|
|
117
|
+
/** Buy order range low price */
|
|
118
|
+
blp?: number | string;
|
|
119
|
+
/** Buy order range high price */
|
|
120
|
+
bhp?: number | string;
|
|
121
|
+
ts?: number;
|
|
122
|
+
[key: string]: string | number | boolean | undefined;
|
|
123
|
+
};
|
|
124
|
+
}
|
|
98
125
|
/**
|
|
99
126
|
* Classic futures WebSocket `/contract/positionAll` funding fee settlement push.
|
|
100
127
|
* `symbol` added to `data` field 2026.07.01.
|