kucoin-api 2.3.5 → 2.3.6
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/UnifiedAPIClient.d.ts +193 -2
- package/dist/cjs/UnifiedAPIClient.js +258 -0
- package/dist/cjs/UnifiedAPIClient.js.map +1 -1
- package/dist/cjs/types/request/futures.types.d.ts +21 -3
- package/dist/cjs/types/request/uta-types.d.ts +194 -0
- package/dist/cjs/types/response/futures.types.d.ts +15 -0
- package/dist/cjs/types/response/uta-types.d.ts +353 -8
- package/dist/mjs/UnifiedAPIClient.d.ts +193 -2
- package/dist/mjs/UnifiedAPIClient.js +258 -0
- package/dist/mjs/UnifiedAPIClient.js.map +1 -1
- package/dist/mjs/types/request/futures.types.d.ts +21 -3
- package/dist/mjs/types/request/uta-types.d.ts +194 -0
- package/dist/mjs/types/response/futures.types.d.ts +15 -0
- package/dist/mjs/types/response/uta-types.d.ts +353 -8
- package/llms.txt +11010 -9697
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AxiosRequestConfig } from 'axios';
|
|
2
2
|
import { BaseRestClient } from './lib/BaseRestClient.js';
|
|
3
3
|
import { RestClientOptions, RestClientType } from './lib/requestUtils.js';
|
|
4
|
-
import { GetAnnouncementsRequestUTA, GetCurrencyRequestUTA, GetCurrentFundingRateRequestUTA, GetHistoryFundingRateRequestUTA, GetKlinesRequestUTA, GetOrderBookRequestUTA, GetServiceStatusRequestUTA, GetSymbolRequestUTA, GetTickerRequestUTA, GetTradesRequestUTA } from './types/request/uta-types.js';
|
|
4
|
+
import { BatchCancelOrdersRequestUTA, BatchPlaceOrderRequestUTA, CancelOrderRequestUTA, FlexTransferRequestUTA, GetAccountLedgerRequestUTA, GetAccountPositionTiersRequestUTA, GetAnnouncementsRequestUTA, GetClassicAccountRequestUTA, GetCurrencyRequestUTA, GetCurrentFundingRateRequestUTA, GetDCPRequestUTA, GetDepositAddressRequestUTA, GetFeeRateRequestUTA, GetHistoryFundingRateRequestUTA, GetInterestHistoryRequestUTA, GetKlinesRequestUTA, GetOpenOrderListRequestUTA, GetOrderBookRequestUTA, GetOrderDetailsRequestUTA, GetOrderHistoryRequestUTA, GetPositionListRequestUTA, GetPositionsHistoryRequestUTA, GetServiceStatusRequestUTA, GetSubAccountRequestUTA, GetSymbolRequestUTA, GetTickerRequestUTA, GetTradeHistoryRequestUTA, GetTradesRequestUTA, GetTransferQuotasRequestUTA, ModifyLeverageRequestUTA, PlaceOrderRequestUTA, SetAccountModeRequestUTA, SetDCPRequestUTA, SetSubAccountTransferPermissionRequestUTA } from './types/request/uta-types.js';
|
|
5
5
|
import { APISuccessResponse } from './types/response/shared.types.js';
|
|
6
|
-
import { GetAnnouncementsResponseUTA, GetCrossMarginConfigResponseUTA, GetCurrencyResponseUTA, GetCurrentFundingRateResponseUTA, GetHistoryFundingRateResponseUTA, GetKlinesResponseUTA, GetOrderBookResponseUTA, GetServiceStatusResponseUTA, GetSymbolResponseUTA, GetTickerResponseUTA, GetTradesResponseUTA } from './types/response/uta-types.js';
|
|
6
|
+
import { BatchCancelOrdersResponseUTA, BatchPlaceOrderResponseUTA, CancelOrderResponseUTA, DCPResponseUTA, DepositAddressUTA, FlexTransferResponseUTA, GetAccountLedgerResponseClassicUTA, GetAccountLedgerResponseUTA, GetAccountModeResponseUTA, GetAccountOverviewResponseUTA, GetAnnouncementsResponseUTA, GetClassicAccountResponseUTA, GetCrossMarginConfigResponseUTA, GetCurrencyResponseUTA, GetCurrentFundingRateResponseUTA, GetFeeRateResponseUTA, GetHistoryFundingRateResponseUTA, GetInterestHistoryResponseUTA, GetKlinesResponseUTA, GetOpenOrderListResponseUTA, GetOrderBookResponseUTA, GetOrderHistoryResponseUTA, GetPositionsHistoryResponseUTA, GetServiceStatusResponseUTA, GetSubAccountResponseUTA, GetSymbolResponseUTA, GetTickerResponseUTA, GetTradeHistoryResponseUTA, GetTradesResponseUTA, GetTransferQuotasResponseUTA, OrderDetailsUTA, PlaceOrderResponseUTA, PositionTierUTA, PositionUTA, SubAccountTransferPermissionUTA } from './types/response/uta-types.js';
|
|
7
7
|
/**
|
|
8
8
|
* Unified Trading Account Client
|
|
9
9
|
*
|
|
@@ -74,4 +74,195 @@ export declare class UnifiedAPIClient extends BaseRestClient {
|
|
|
74
74
|
* Get the service status.
|
|
75
75
|
*/
|
|
76
76
|
getServiceStatus(params: GetServiceStatusRequestUTA): Promise<APISuccessResponse<GetServiceStatusResponseUTA>>;
|
|
77
|
+
/**
|
|
78
|
+
*
|
|
79
|
+
* REST - Unified Trading Account - Account
|
|
80
|
+
*
|
|
81
|
+
*/
|
|
82
|
+
/**
|
|
83
|
+
* Get Account (Classic)
|
|
84
|
+
* Get information for Classic Account (FUNDING, SPOT, FUTURES, CROSS, ISOLATED).
|
|
85
|
+
* Note: AccountType enum value changed from TRADING to SPOT as of 2026.01.17.
|
|
86
|
+
*/
|
|
87
|
+
getClassicAccount(params: GetClassicAccountRequestUTA): Promise<APISuccessResponse<GetClassicAccountResponseUTA>>;
|
|
88
|
+
/**
|
|
89
|
+
* Get Account (UTA)
|
|
90
|
+
* Get information for Unified Trading Account.
|
|
91
|
+
*/
|
|
92
|
+
getAccount(): Promise<APISuccessResponse<GetClassicAccountResponseUTA>>;
|
|
93
|
+
/**
|
|
94
|
+
* Get Account Overview (UTA)
|
|
95
|
+
* Get account overview for Unified Trading Account.
|
|
96
|
+
*/
|
|
97
|
+
getAccountOverview(): Promise<APISuccessResponse<GetAccountOverviewResponseUTA>>;
|
|
98
|
+
/**
|
|
99
|
+
* Get Sub Account
|
|
100
|
+
* Request sub account info via this endpoint.
|
|
101
|
+
*/
|
|
102
|
+
getSubAccount(params?: GetSubAccountRequestUTA): Promise<APISuccessResponse<GetSubAccountResponseUTA>>;
|
|
103
|
+
/**
|
|
104
|
+
* Get Transfer Quotas
|
|
105
|
+
* This endpoint returns the transferable balance of a specified account.
|
|
106
|
+
* Note: AccountType enum value changed from TRADING to SPOT as of 2026.01.17.
|
|
107
|
+
*/
|
|
108
|
+
getTransferQuotas(params: GetTransferQuotasRequestUTA): Promise<APISuccessResponse<GetTransferQuotasResponseUTA>>;
|
|
109
|
+
/**
|
|
110
|
+
* Flex Transfer
|
|
111
|
+
* This interface can be used for transfers between master- and sub-accounts and transfers.
|
|
112
|
+
* Note: AccountType enum value changed from TRADING to SPOT as of 2026.01.17.
|
|
113
|
+
*/
|
|
114
|
+
flexTransfer(params: FlexTransferRequestUTA): Promise<APISuccessResponse<FlexTransferResponseUTA>>;
|
|
115
|
+
/**
|
|
116
|
+
* Set Sub Account Transfer Permission
|
|
117
|
+
* This endpoint supports setting whether the specified sub-account needs to open the SUB_TO_SUB transfer permission.
|
|
118
|
+
*/
|
|
119
|
+
setSubAccountTransferPermission(params: SetSubAccountTransferPermissionRequestUTA): Promise<APISuccessResponse<SubAccountTransferPermissionUTA[]>>;
|
|
120
|
+
/**
|
|
121
|
+
* Get Account Mode
|
|
122
|
+
* This interface supports query the list of unified and classic sub-accounts and current account mode.
|
|
123
|
+
*/
|
|
124
|
+
getAccountMode(): Promise<APISuccessResponse<GetAccountModeResponseUTA>>;
|
|
125
|
+
/**
|
|
126
|
+
* Set Account Mode
|
|
127
|
+
* This interface supports set account mode to UTA.
|
|
128
|
+
*/
|
|
129
|
+
setAccountMode(params: SetAccountModeRequestUTA): Promise<APISuccessResponse<null>>;
|
|
130
|
+
/**
|
|
131
|
+
* Get Fee Rate
|
|
132
|
+
* This interface is for the trading pair's actual fee rate.
|
|
133
|
+
* You can inquire about fee rates of 10 trading pairs each time at most for Spot.
|
|
134
|
+
* Futures only supports 1 symbol at a time.
|
|
135
|
+
*/
|
|
136
|
+
getFeeRate(params: GetFeeRateRequestUTA): Promise<APISuccessResponse<GetFeeRateResponseUTA>>;
|
|
137
|
+
/**
|
|
138
|
+
* Get Account Ledger
|
|
139
|
+
* This API endpoint returns all transfer (in and out) records and supports multi-coin queries.
|
|
140
|
+
* The query results are sorted in descending order by createdAt and ID.
|
|
141
|
+
* Note: AccountType enum value changed from TRADING to SPOT as of 2026.01.17.
|
|
142
|
+
* Note: direction values unified to uppercase IN/OUT as of 2026.01.17.
|
|
143
|
+
* Note: For Futures - id changed from Number to String, balance/amount changed from Number to String as of 2026.01.17.
|
|
144
|
+
* Note: ts standardized to nanoseconds as of 2026.01.12.
|
|
145
|
+
*/
|
|
146
|
+
getAccountLedger(params: GetAccountLedgerRequestUTA): Promise<APISuccessResponse<GetAccountLedgerResponseUTA | GetAccountLedgerResponseClassicUTA>>;
|
|
147
|
+
/**
|
|
148
|
+
* Get Interest History (UTA)
|
|
149
|
+
* Request the interest records via this endpoint.
|
|
150
|
+
*/
|
|
151
|
+
getInterestHistory(params: GetInterestHistoryRequestUTA): Promise<APISuccessResponse<GetInterestHistoryResponseUTA>>;
|
|
152
|
+
/**
|
|
153
|
+
* Modify Leverage (UTA)
|
|
154
|
+
* This interface supports modify leverage of the specified symbol.
|
|
155
|
+
*/
|
|
156
|
+
modifyLeverage(params: ModifyLeverageRequestUTA): Promise<APISuccessResponse<null>>;
|
|
157
|
+
/**
|
|
158
|
+
* Get Deposit Address
|
|
159
|
+
* Return a deposit address; when both currency and chain are provided,
|
|
160
|
+
* the address will be created if it does not exist.
|
|
161
|
+
* URL unified to GET /api/ua/v1/asset/deposit/address as of 2026.01.17.
|
|
162
|
+
*/
|
|
163
|
+
getDepositAddress(params: GetDepositAddressRequestUTA): Promise<APISuccessResponse<DepositAddressUTA[]>>;
|
|
164
|
+
/**
|
|
165
|
+
*
|
|
166
|
+
* REST - Unified Trading Account - Orders
|
|
167
|
+
*
|
|
168
|
+
*/
|
|
169
|
+
/**
|
|
170
|
+
* Place Order
|
|
171
|
+
* This interface can be used to place orders.
|
|
172
|
+
* Supports RPI (Retail Price Improvement) orders for Futures as of 2025.01.02.
|
|
173
|
+
* Note: timeInForce supports 'RPI' value for Futures only (Phase 1).
|
|
174
|
+
* Note: For Classic mode, tradeType is required in query param.
|
|
175
|
+
* Note: For Unified mode, tradeType should not be in query param.
|
|
176
|
+
*/
|
|
177
|
+
placeOrder(params: PlaceOrderRequestUTA, accountMode?: 'classic' | 'unified'): Promise<APISuccessResponse<PlaceOrderResponseUTA>>;
|
|
178
|
+
/**
|
|
179
|
+
* Batch Place Order (Classic)
|
|
180
|
+
* This interface can be used for placing batch orders.
|
|
181
|
+
* URL changed to /api/ua/v1/{accountMode}/order/place-batch as of 2026.01.17.
|
|
182
|
+
* Note: timeInForce supports 'RPI' value for Futures as of 2025.01.02.
|
|
183
|
+
*/
|
|
184
|
+
batchPlaceOrder(params: BatchPlaceOrderRequestUTA, accountMode?: 'classic' | 'unified'): Promise<APISuccessResponse<BatchPlaceOrderResponseUTA>>;
|
|
185
|
+
/**
|
|
186
|
+
* Get Order Details
|
|
187
|
+
* This interface can be used getting single order details.
|
|
188
|
+
* Note: timeInForce returns 'RPI' value for Futures RPI orders as of 2025.01.02.
|
|
189
|
+
* Note: status changed from String to Number for UTA as of 2026.01.17.
|
|
190
|
+
* Note: orderTime/updatedTime standardized to nanoseconds as of 2026.01.12.
|
|
191
|
+
*/
|
|
192
|
+
getOrderDetails(params: GetOrderDetailsRequestUTA, accountMode?: 'classic' | 'unified'): Promise<APISuccessResponse<OrderDetailsUTA>>;
|
|
193
|
+
/**
|
|
194
|
+
* Get Open Order List
|
|
195
|
+
* This interface can be used getting open order list.
|
|
196
|
+
* Note: timeInForce returns 'RPI' value for Futures RPI orders as of 2025.01.02.
|
|
197
|
+
* Note: status changed from String to Number for UTA as of 2026.01.17.
|
|
198
|
+
* Note: orderTime/updatedTime standardized to nanoseconds as of 2026.01.12.
|
|
199
|
+
*/
|
|
200
|
+
getOpenOrderList(params: GetOpenOrderListRequestUTA, accountMode?: 'classic' | 'unified'): Promise<APISuccessResponse<GetOpenOrderListResponseUTA>>;
|
|
201
|
+
/**
|
|
202
|
+
* Get Order History
|
|
203
|
+
* This interface can be used for getting order history.
|
|
204
|
+
* Note: timeInForce returns 'RPI' value for Futures RPI orders as of 2025.01.02.
|
|
205
|
+
* Note: status changed from String to Number for UTA as of 2026.01.17.
|
|
206
|
+
* Note: orderTime/updatedTime standardized to nanoseconds as of 2026.01.12.
|
|
207
|
+
*/
|
|
208
|
+
getOrderHistory(params: GetOrderHistoryRequestUTA, accountMode?: 'classic' | 'unified'): Promise<APISuccessResponse<GetOrderHistoryResponseUTA>>;
|
|
209
|
+
/**
|
|
210
|
+
* Get Trade History
|
|
211
|
+
* This interface can be used for getting trade execution history.
|
|
212
|
+
* Note: executionTime standardized to nanoseconds as of 2026.01.12.
|
|
213
|
+
* Note: isRpiTrade added for Futures as of 2025.01.02.
|
|
214
|
+
*/
|
|
215
|
+
getTradeHistory(params: GetTradeHistoryRequestUTA, accountMode?: 'classic' | 'unified'): Promise<APISuccessResponse<GetTradeHistoryResponseUTA>>;
|
|
216
|
+
/**
|
|
217
|
+
* Cancel Order
|
|
218
|
+
* This interface can be used to cancel orders.
|
|
219
|
+
* Note: ts (timestamp in nanoseconds) only effective for unified account mode.
|
|
220
|
+
*/
|
|
221
|
+
cancelOrder(params: CancelOrderRequestUTA, accountMode?: 'classic' | 'unified'): Promise<APISuccessResponse<CancelOrderResponseUTA>>;
|
|
222
|
+
/**
|
|
223
|
+
* Batch Cancel Orders
|
|
224
|
+
* This interface can be used for batch cancel orders (maximum 20 orders).
|
|
225
|
+
* Note: tradeType required for Classic accounts only; ignored in UTA (UNIFIED) mode.
|
|
226
|
+
* Note: ts (timestamp in nanoseconds) not supported for classic accounts.
|
|
227
|
+
*/
|
|
228
|
+
batchCancelOrders(params: BatchCancelOrdersRequestUTA, accountMode?: 'classic' | 'unified'): Promise<APISuccessResponse<BatchCancelOrdersResponseUTA>>;
|
|
229
|
+
/**
|
|
230
|
+
* Set DCP (Disconnection Protect / Deadman Switch) - Classic Only
|
|
231
|
+
* Set automatic order cancellation after specified time.
|
|
232
|
+
* Call this interface to automatically cancel all orders of the set trading pair after the specified time.
|
|
233
|
+
* Note: Order cancellation delay is between 0 and 10 seconds.
|
|
234
|
+
* Note: timeout range: -1 (unset) or 5 <= timeout <= 86400 seconds.
|
|
235
|
+
*/
|
|
236
|
+
setDCP(params: SetDCPRequestUTA): Promise<APISuccessResponse<DCPResponseUTA>>;
|
|
237
|
+
/**
|
|
238
|
+
* Get DCP (Disconnection Protect / Deadman Switch) - Classic Only
|
|
239
|
+
* Get automatic order cancellation settings.
|
|
240
|
+
* If data is empty, it means DCP is not set.
|
|
241
|
+
*/
|
|
242
|
+
getDCP(params: GetDCPRequestUTA): Promise<APISuccessResponse<DCPResponseUTA>>;
|
|
243
|
+
/**
|
|
244
|
+
*
|
|
245
|
+
* REST - Unified Trading Account - Positions
|
|
246
|
+
*
|
|
247
|
+
*/
|
|
248
|
+
/**
|
|
249
|
+
* Get Position List (UTA)
|
|
250
|
+
* Get the position details of all open positions.
|
|
251
|
+
* Note: creationTime standardized to nanoseconds as of 2026.01.12.
|
|
252
|
+
*/
|
|
253
|
+
getPositionList(params?: GetPositionListRequestUTA): Promise<APISuccessResponse<PositionUTA[]>>;
|
|
254
|
+
/**
|
|
255
|
+
* Get Positions History (UTA)
|
|
256
|
+
* Query position history information records.
|
|
257
|
+
* Note: Data retained for up to 3 months.
|
|
258
|
+
* Note: Each query limited to 7 days time range.
|
|
259
|
+
* Note: creationTime and closingTime standardized to nanoseconds as of 2026.01.12.
|
|
260
|
+
*/
|
|
261
|
+
getPositionsHistory(params?: GetPositionsHistoryRequestUTA): Promise<APISuccessResponse<GetPositionsHistoryResponseUTA>>;
|
|
262
|
+
/**
|
|
263
|
+
* Get Account Position Tiers
|
|
264
|
+
* Request account position tiers (risk limit) info.
|
|
265
|
+
* Note: Currently only queries of classic - futures isolated margin are supported.
|
|
266
|
+
*/
|
|
267
|
+
getAccountPositionTiers(params: GetAccountPositionTiersRequestUTA, accountMode?: 'classic' | 'unified'): Promise<APISuccessResponse<PositionTierUTA[]>>;
|
|
77
268
|
}
|
|
@@ -97,5 +97,263 @@ export class UnifiedAPIClient extends BaseRestClient {
|
|
|
97
97
|
getServiceStatus(params) {
|
|
98
98
|
return this.get('api/ua/v1/server/status', params);
|
|
99
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* REST - Unified Trading Account - Account
|
|
103
|
+
*
|
|
104
|
+
*/
|
|
105
|
+
/**
|
|
106
|
+
* Get Account (Classic)
|
|
107
|
+
* Get information for Classic Account (FUNDING, SPOT, FUTURES, CROSS, ISOLATED).
|
|
108
|
+
* Note: AccountType enum value changed from TRADING to SPOT as of 2026.01.17.
|
|
109
|
+
*/
|
|
110
|
+
getClassicAccount(params) {
|
|
111
|
+
return this.getPrivate('api/ua/v1/account/balance', params);
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Get Account (UTA)
|
|
115
|
+
* Get information for Unified Trading Account.
|
|
116
|
+
*/
|
|
117
|
+
getAccount() {
|
|
118
|
+
return this.getPrivate('api/ua/v1/unified/account/balance');
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Get Account Overview (UTA)
|
|
122
|
+
* Get account overview for Unified Trading Account.
|
|
123
|
+
*/
|
|
124
|
+
getAccountOverview() {
|
|
125
|
+
return this.getPrivate('api/ua/v1/unified/account/overview');
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Get Sub Account
|
|
129
|
+
* Request sub account info via this endpoint.
|
|
130
|
+
*/
|
|
131
|
+
getSubAccount(params) {
|
|
132
|
+
return this.getPrivate('api/ua/v1/sub-account/balance', params);
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Get Transfer Quotas
|
|
136
|
+
* This endpoint returns the transferable balance of a specified account.
|
|
137
|
+
* Note: AccountType enum value changed from TRADING to SPOT as of 2026.01.17.
|
|
138
|
+
*/
|
|
139
|
+
getTransferQuotas(params) {
|
|
140
|
+
return this.getPrivate('api/ua/v1/account/transfer-quota', params);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Flex Transfer
|
|
144
|
+
* This interface can be used for transfers between master- and sub-accounts and transfers.
|
|
145
|
+
* Note: AccountType enum value changed from TRADING to SPOT as of 2026.01.17.
|
|
146
|
+
*/
|
|
147
|
+
flexTransfer(params) {
|
|
148
|
+
return this.postPrivate('api/ua/v1/account/transfer', params);
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Set Sub Account Transfer Permission
|
|
152
|
+
* This endpoint supports setting whether the specified sub-account needs to open the SUB_TO_SUB transfer permission.
|
|
153
|
+
*/
|
|
154
|
+
setSubAccountTransferPermission(params) {
|
|
155
|
+
return this.postPrivate('api/ua/v1/sub-account/canTransferOut', params);
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Get Account Mode
|
|
159
|
+
* This interface supports query the list of unified and classic sub-accounts and current account mode.
|
|
160
|
+
*/
|
|
161
|
+
getAccountMode() {
|
|
162
|
+
return this.getPrivate('api/ua/v1/account/mode');
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Set Account Mode
|
|
166
|
+
* This interface supports set account mode to UTA.
|
|
167
|
+
*/
|
|
168
|
+
setAccountMode(params) {
|
|
169
|
+
return this.postPrivate('api/ua/v1/account/mode', params);
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Get Fee Rate
|
|
173
|
+
* This interface is for the trading pair's actual fee rate.
|
|
174
|
+
* You can inquire about fee rates of 10 trading pairs each time at most for Spot.
|
|
175
|
+
* Futures only supports 1 symbol at a time.
|
|
176
|
+
*/
|
|
177
|
+
getFeeRate(params) {
|
|
178
|
+
return this.getPrivate('api/ua/v1/user/fee-rate', params);
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Get Account Ledger
|
|
182
|
+
* This API endpoint returns all transfer (in and out) records and supports multi-coin queries.
|
|
183
|
+
* The query results are sorted in descending order by createdAt and ID.
|
|
184
|
+
* Note: AccountType enum value changed from TRADING to SPOT as of 2026.01.17.
|
|
185
|
+
* Note: direction values unified to uppercase IN/OUT as of 2026.01.17.
|
|
186
|
+
* Note: For Futures - id changed from Number to String, balance/amount changed from Number to String as of 2026.01.17.
|
|
187
|
+
* Note: ts standardized to nanoseconds as of 2026.01.12.
|
|
188
|
+
*/
|
|
189
|
+
getAccountLedger(params) {
|
|
190
|
+
return this.getPrivate('api/ua/v1/account/ledger', params);
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Get Interest History (UTA)
|
|
194
|
+
* Request the interest records via this endpoint.
|
|
195
|
+
*/
|
|
196
|
+
getInterestHistory(params) {
|
|
197
|
+
return this.getPrivate('api/ua/v1/account/interest-history', params);
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Modify Leverage (UTA)
|
|
201
|
+
* This interface supports modify leverage of the specified symbol.
|
|
202
|
+
*/
|
|
203
|
+
modifyLeverage(params) {
|
|
204
|
+
return this.postPrivate('api/ua/v1/unified/account/modify-leverage', params);
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Get Deposit Address
|
|
208
|
+
* Return a deposit address; when both currency and chain are provided,
|
|
209
|
+
* the address will be created if it does not exist.
|
|
210
|
+
* URL unified to GET /api/ua/v1/asset/deposit/address as of 2026.01.17.
|
|
211
|
+
*/
|
|
212
|
+
getDepositAddress(params) {
|
|
213
|
+
return this.getPrivate('api/ua/v1/asset/deposit/address', params);
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
*
|
|
217
|
+
* REST - Unified Trading Account - Orders
|
|
218
|
+
*
|
|
219
|
+
*/
|
|
220
|
+
/**
|
|
221
|
+
* Place Order
|
|
222
|
+
* This interface can be used to place orders.
|
|
223
|
+
* Supports RPI (Retail Price Improvement) orders for Futures as of 2025.01.02.
|
|
224
|
+
* Note: timeInForce supports 'RPI' value for Futures only (Phase 1).
|
|
225
|
+
* Note: For Classic mode, tradeType is required in query param.
|
|
226
|
+
* Note: For Unified mode, tradeType should not be in query param.
|
|
227
|
+
*/
|
|
228
|
+
placeOrder(params, accountMode = 'unified') {
|
|
229
|
+
const { tradeType, ...bodyParams } = params;
|
|
230
|
+
const url = accountMode === 'classic'
|
|
231
|
+
? `api/ua/v1/${accountMode}/order/place?tradeType=${tradeType}`
|
|
232
|
+
: `api/ua/v1/${accountMode}/order/place`;
|
|
233
|
+
return this.postPrivate(url, bodyParams);
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Batch Place Order (Classic)
|
|
237
|
+
* This interface can be used for placing batch orders.
|
|
238
|
+
* URL changed to /api/ua/v1/{accountMode}/order/place-batch as of 2026.01.17.
|
|
239
|
+
* Note: timeInForce supports 'RPI' value for Futures as of 2025.01.02.
|
|
240
|
+
*/
|
|
241
|
+
batchPlaceOrder(params, accountMode = 'classic') {
|
|
242
|
+
const url = accountMode === 'classic'
|
|
243
|
+
? `api/ua/v1/${accountMode}/order/place-batch?tradeType=${params.tradeType}`
|
|
244
|
+
: `api/ua/v1/${accountMode}/order/place-batch`;
|
|
245
|
+
return this.postPrivate(url, params);
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Get Order Details
|
|
249
|
+
* This interface can be used getting single order details.
|
|
250
|
+
* Note: timeInForce returns 'RPI' value for Futures RPI orders as of 2025.01.02.
|
|
251
|
+
* Note: status changed from String to Number for UTA as of 2026.01.17.
|
|
252
|
+
* Note: orderTime/updatedTime standardized to nanoseconds as of 2026.01.12.
|
|
253
|
+
*/
|
|
254
|
+
getOrderDetails(params, accountMode = 'unified') {
|
|
255
|
+
return this.getPrivate(`api/ua/v1/${accountMode}/order/detail`, params);
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Get Open Order List
|
|
259
|
+
* This interface can be used getting open order list.
|
|
260
|
+
* Note: timeInForce returns 'RPI' value for Futures RPI orders as of 2025.01.02.
|
|
261
|
+
* Note: status changed from String to Number for UTA as of 2026.01.17.
|
|
262
|
+
* Note: orderTime/updatedTime standardized to nanoseconds as of 2026.01.12.
|
|
263
|
+
*/
|
|
264
|
+
getOpenOrderList(params, accountMode = 'unified') {
|
|
265
|
+
return this.getPrivate(`api/ua/v1/${accountMode}/order/open-list`, params);
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Get Order History
|
|
269
|
+
* This interface can be used for getting order history.
|
|
270
|
+
* Note: timeInForce returns 'RPI' value for Futures RPI orders as of 2025.01.02.
|
|
271
|
+
* Note: status changed from String to Number for UTA as of 2026.01.17.
|
|
272
|
+
* Note: orderTime/updatedTime standardized to nanoseconds as of 2026.01.12.
|
|
273
|
+
*/
|
|
274
|
+
getOrderHistory(params, accountMode = 'unified') {
|
|
275
|
+
return this.getPrivate(`api/ua/v1/${accountMode}/order/history`, params);
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Get Trade History
|
|
279
|
+
* This interface can be used for getting trade execution history.
|
|
280
|
+
* Note: executionTime standardized to nanoseconds as of 2026.01.12.
|
|
281
|
+
* Note: isRpiTrade added for Futures as of 2025.01.02.
|
|
282
|
+
*/
|
|
283
|
+
getTradeHistory(params, accountMode = 'unified') {
|
|
284
|
+
return this.getPrivate(`api/ua/v1/${accountMode}/order/execution`, params);
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Cancel Order
|
|
288
|
+
* This interface can be used to cancel orders.
|
|
289
|
+
* Note: ts (timestamp in nanoseconds) only effective for unified account mode.
|
|
290
|
+
*/
|
|
291
|
+
cancelOrder(params, accountMode = 'unified') {
|
|
292
|
+
const url = accountMode === 'classic'
|
|
293
|
+
? `api/ua/v1/${accountMode}/order/cancel?tradeType=${params.tradeType}`
|
|
294
|
+
: `api/ua/v1/${accountMode}/order/cancel`;
|
|
295
|
+
return this.postPrivate(url, params);
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Batch Cancel Orders
|
|
299
|
+
* This interface can be used for batch cancel orders (maximum 20 orders).
|
|
300
|
+
* Note: tradeType required for Classic accounts only; ignored in UTA (UNIFIED) mode.
|
|
301
|
+
* Note: ts (timestamp in nanoseconds) not supported for classic accounts.
|
|
302
|
+
*/
|
|
303
|
+
batchCancelOrders(params, accountMode = 'unified') {
|
|
304
|
+
const url = accountMode === 'classic'
|
|
305
|
+
? `api/ua/v1/${accountMode}/order/cancel-batch?tradeType=${params.tradeType}`
|
|
306
|
+
: `api/ua/v1/${accountMode}/order/cancel-batch`;
|
|
307
|
+
return this.postPrivate(url, params);
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Set DCP (Disconnection Protect / Deadman Switch) - Classic Only
|
|
311
|
+
* Set automatic order cancellation after specified time.
|
|
312
|
+
* Call this interface to automatically cancel all orders of the set trading pair after the specified time.
|
|
313
|
+
* Note: Order cancellation delay is between 0 and 10 seconds.
|
|
314
|
+
* Note: timeout range: -1 (unset) or 5 <= timeout <= 86400 seconds.
|
|
315
|
+
*/
|
|
316
|
+
setDCP(params) {
|
|
317
|
+
return this.postPrivate('api/ua/v1/dcp/set', params);
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Get DCP (Disconnection Protect / Deadman Switch) - Classic Only
|
|
321
|
+
* Get automatic order cancellation settings.
|
|
322
|
+
* If data is empty, it means DCP is not set.
|
|
323
|
+
*/
|
|
324
|
+
getDCP(params) {
|
|
325
|
+
return this.getPrivate('api/ua/v1/dcp/query', params);
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
*
|
|
329
|
+
* REST - Unified Trading Account - Positions
|
|
330
|
+
*
|
|
331
|
+
*/
|
|
332
|
+
/**
|
|
333
|
+
* Get Position List (UTA)
|
|
334
|
+
* Get the position details of all open positions.
|
|
335
|
+
* Note: creationTime standardized to nanoseconds as of 2026.01.12.
|
|
336
|
+
*/
|
|
337
|
+
getPositionList(params) {
|
|
338
|
+
return this.getPrivate('api/ua/v1/unified/position/open-list', params);
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Get Positions History (UTA)
|
|
342
|
+
* Query position history information records.
|
|
343
|
+
* Note: Data retained for up to 3 months.
|
|
344
|
+
* Note: Each query limited to 7 days time range.
|
|
345
|
+
* Note: creationTime and closingTime standardized to nanoseconds as of 2026.01.12.
|
|
346
|
+
*/
|
|
347
|
+
getPositionsHistory(params) {
|
|
348
|
+
return this.getPrivate('api/ua/v1/position/history', params);
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Get Account Position Tiers
|
|
352
|
+
* Request account position tiers (risk limit) info.
|
|
353
|
+
* Note: Currently only queries of classic - futures isolated margin are supported.
|
|
354
|
+
*/
|
|
355
|
+
getAccountPositionTiers(params, accountMode = 'classic') {
|
|
356
|
+
return this.getPrivate(`api/ua/v1/${accountMode}/position/tiers`, params);
|
|
357
|
+
}
|
|
100
358
|
}
|
|
101
359
|
//# sourceMappingURL=UnifiedAPIClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnifiedAPIClient.js","sourceRoot":"","sources":["../../src/UnifiedAPIClient.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EACL,qBAAqB,GAGtB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"UnifiedAPIClient.js","sourceRoot":"","sources":["../../src/UnifiedAPIClient.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EACL,qBAAqB,GAGtB,MAAM,uBAAuB,CAAC;AA4E/B;;;;;GAKG;AACH,MAAM,OAAO,gBAAiB,SAAQ,cAAc;IAClD,YACE,oBAAuC,EAAE,EACzC,iBAAqC,EAAE;QAEvC,KAAK,CAAC,iBAAiB,EAAE,cAAc,CAAC,CAAC;QACzC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,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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EH;;;;OAIG;IACH,eAAe,CACb,MAAkC;QAElC,OAAO,IAAI,CAAC,UAAU,CAAC,sCAAsC,EAAE,MAAM,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;OAMG;IACH,mBAAmB,CACjB,MAAsC;QAEtC,OAAO,IAAI,CAAC,UAAU,CAAC,4BAA4B,EAAE,MAAM,CAAC,CAAC;IAC/D,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"}
|
|
@@ -110,7 +110,13 @@ export interface Order {
|
|
|
110
110
|
size?: number;
|
|
111
111
|
qty?: string;
|
|
112
112
|
valueQty?: string;
|
|
113
|
-
|
|
113
|
+
/**
|
|
114
|
+
* Time in Force. Added 'RPI' as of 2025.01.02
|
|
115
|
+
* - GTC: Good Till Cancel (default)
|
|
116
|
+
* - IOC: Immediate Or Cancel
|
|
117
|
+
* - RPI: Retail Price Improvement Order (Phase 1: Futures only)
|
|
118
|
+
*/
|
|
119
|
+
timeInForce?: 'GTC' | 'IOC' | 'RPI';
|
|
114
120
|
postOnly?: boolean;
|
|
115
121
|
hidden?: boolean;
|
|
116
122
|
iceberg?: boolean;
|
|
@@ -136,7 +142,13 @@ export interface SLTPOrder {
|
|
|
136
142
|
size?: number;
|
|
137
143
|
qty?: string;
|
|
138
144
|
valueQty?: string;
|
|
139
|
-
|
|
145
|
+
/**
|
|
146
|
+
* Time in Force. Added 'RPI' as of 2025.01.02
|
|
147
|
+
* - GTC: Good Till Cancel (default)
|
|
148
|
+
* - IOC: Immediate Or Cancel
|
|
149
|
+
* - RPI: Retail Price Improvement Order (Phase 1: Futures only)
|
|
150
|
+
*/
|
|
151
|
+
timeInForce?: 'GTC' | 'IOC' | 'RPI';
|
|
140
152
|
postOnly?: boolean;
|
|
141
153
|
hidden?: boolean;
|
|
142
154
|
iceberg?: boolean;
|
|
@@ -240,7 +252,13 @@ export interface CopyTradeOrderRequest {
|
|
|
240
252
|
positionSide?: 'BOTH' | 'LONG' | 'SHORT';
|
|
241
253
|
price?: string;
|
|
242
254
|
size: number;
|
|
243
|
-
|
|
255
|
+
/**
|
|
256
|
+
* Time in Force. Added 'RPI' as of 2025.01.02
|
|
257
|
+
* - GTC: Good Till Cancel (default)
|
|
258
|
+
* - IOC: Immediate Or Cancel
|
|
259
|
+
* - RPI: Retail Price Improvement Order (Phase 1: Futures only)
|
|
260
|
+
*/
|
|
261
|
+
timeInForce?: 'GTC' | 'IOC' | 'RPI';
|
|
244
262
|
postOnly?: boolean;
|
|
245
263
|
hidden?: boolean;
|
|
246
264
|
iceberg?: boolean;
|