kucoin-api 2.1.13 → 2.1.15

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.
Files changed (63) hide show
  1. package/dist/cjs/FuturesClient.js +2 -2
  2. package/dist/cjs/SpotClient.d.ts +47 -3
  3. package/dist/cjs/SpotClient.js +67 -13
  4. package/dist/cjs/SpotClient.js.map +1 -1
  5. package/dist/cjs/WebsocketClient.js +7 -7
  6. package/dist/cjs/index.d.ts +2 -0
  7. package/dist/cjs/index.js +2 -0
  8. package/dist/cjs/index.js.map +1 -1
  9. package/dist/cjs/lib/BaseRestClient.js.map +1 -1
  10. package/dist/cjs/lib/BaseWSClient.d.ts +0 -1
  11. package/dist/cjs/lib/BaseWSClient.js +14 -14
  12. package/dist/cjs/lib/BaseWSClient.js.map +1 -1
  13. package/dist/cjs/lib/misc-util.js +1 -2
  14. package/dist/cjs/lib/misc-util.js.map +1 -1
  15. package/dist/cjs/lib/requestUtils.js +3 -3
  16. package/dist/cjs/lib/requestUtils.js.map +1 -1
  17. package/dist/cjs/lib/webCryptoAPI.js +2 -3
  18. package/dist/cjs/lib/webCryptoAPI.js.map +1 -1
  19. package/dist/cjs/lib/websocket/WsStore.js +3 -3
  20. package/dist/cjs/lib/websocket/WsStore.js.map +1 -1
  21. package/dist/cjs/lib/websocket/WsStore.types.d.ts +0 -1
  22. package/dist/cjs/lib/websocket/websocket-util.js +3 -3
  23. package/dist/cjs/lib/websocket/websocket-util.js.map +1 -1
  24. package/dist/cjs/types/request/spot-affiliate.d.ts +25 -0
  25. package/dist/cjs/types/request/spot-affiliate.js +3 -0
  26. package/dist/cjs/types/request/spot-affiliate.js.map +1 -0
  27. package/dist/cjs/types/request/spot-earn.d.ts +24 -0
  28. package/dist/cjs/types/response/spot-account.d.ts +23 -23
  29. package/dist/cjs/types/response/spot-affiliate.d.ts +52 -0
  30. package/dist/cjs/types/response/spot-affiliate.js +3 -0
  31. package/dist/cjs/types/response/spot-affiliate.js.map +1 -0
  32. package/dist/cjs/types/response/spot-earn.d.ts +51 -0
  33. package/dist/cjs/types/response/spot-funding.d.ts +13 -13
  34. package/dist/cjs/types/response/spot-margin-trading.d.ts +25 -25
  35. package/dist/cjs/types/response/spot-trading.d.ts +38 -38
  36. package/dist/mjs/FuturesClient.js +2 -2
  37. package/dist/mjs/SpotClient.d.ts +47 -3
  38. package/dist/mjs/SpotClient.js +67 -13
  39. package/dist/mjs/SpotClient.js.map +1 -1
  40. package/dist/mjs/WebsocketClient.js +7 -7
  41. package/dist/mjs/index.d.ts +2 -0
  42. package/dist/mjs/index.js +2 -0
  43. package/dist/mjs/index.js.map +1 -1
  44. package/dist/mjs/lib/BaseRestClient.js.map +1 -1
  45. package/dist/mjs/lib/BaseWSClient.d.ts +0 -1
  46. package/dist/mjs/lib/BaseWSClient.js +14 -14
  47. package/dist/mjs/lib/BaseWSClient.js.map +1 -1
  48. package/dist/mjs/lib/websocket/WsStore.js +1 -1
  49. package/dist/mjs/lib/websocket/WsStore.js.map +1 -1
  50. package/dist/mjs/lib/websocket/WsStore.types.d.ts +0 -1
  51. package/dist/mjs/types/request/spot-affiliate.d.ts +25 -0
  52. package/dist/mjs/types/request/spot-affiliate.js +2 -0
  53. package/dist/mjs/types/request/spot-affiliate.js.map +1 -0
  54. package/dist/mjs/types/request/spot-earn.d.ts +24 -0
  55. package/dist/mjs/types/response/spot-account.d.ts +23 -23
  56. package/dist/mjs/types/response/spot-affiliate.d.ts +52 -0
  57. package/dist/mjs/types/response/spot-affiliate.js +2 -0
  58. package/dist/mjs/types/response/spot-affiliate.js.map +1 -0
  59. package/dist/mjs/types/response/spot-earn.d.ts +51 -0
  60. package/dist/mjs/types/response/spot-funding.d.ts +13 -13
  61. package/dist/mjs/types/response/spot-margin-trading.d.ts +25 -25
  62. package/dist/mjs/types/response/spot-trading.d.ts +38 -38
  63. package/package.json +6 -6
@@ -72,3 +72,54 @@ export interface EarnProduct {
72
72
  duration: number;
73
73
  newUserOnly: 0 | 1;
74
74
  }
75
+ /**
76
+ *
77
+ * STRUCTURED EARN - DUAL
78
+ *
79
+ */
80
+ export interface StructuredProductPurchaseResponse {
81
+ orderId: string;
82
+ }
83
+ export interface DualInvestmentProduct {
84
+ category: 'DUAL_CLASSIC' | 'DUAL_BOOSTER' | 'DUAL_EXTRA';
85
+ productId: string;
86
+ targetCurrency: string;
87
+ quoteCurrency: string;
88
+ investCurrency: string;
89
+ strikeCurrency: string;
90
+ strikePrice: string;
91
+ protectPrice?: string;
92
+ annualRate: string;
93
+ expirationTime: number;
94
+ side: 'CALL' | 'PUT';
95
+ expectSettleTime: number;
96
+ duration: string;
97
+ lowerLimit: string;
98
+ upperLimit: string;
99
+ availableScale: string;
100
+ soldStatus: 'SOLD_OUT' | 'AVAILABLE';
101
+ increment: string;
102
+ }
103
+ export interface StructuredProductOrder {
104
+ category: string;
105
+ side: string;
106
+ duration: string;
107
+ apr: string;
108
+ investCurrency: string;
109
+ strikeCurrency: string;
110
+ investAmount: string;
111
+ settleAmount: string;
112
+ settleCurrency: string | null;
113
+ targetPrice: string;
114
+ settlePrice: string;
115
+ expirationTime: number;
116
+ orderId: string;
117
+ status: string;
118
+ }
119
+ export interface StructuredProductOrders {
120
+ currentPage: number;
121
+ pageSize: number;
122
+ totalNum: number;
123
+ totalPage: number;
124
+ items: StructuredProductOrder[];
125
+ }
@@ -32,12 +32,6 @@ export interface MarginBalance {
32
32
  status: 'EFFECTIVE' | 'BANKRUPTCY' | 'LIQUIDATION' | 'REPAY' | 'BORROW';
33
33
  accounts: MarginAccountDetail[];
34
34
  }
35
- export interface IsolatedMarginBalance {
36
- totalAssetOfQuoteCurrency: string;
37
- totalLiabilityOfQuoteCurrency: string;
38
- timestamp: number;
39
- assets: IsolatedMarginAssetDetail[];
40
- }
41
35
  export interface IsolatedMarginAssetDetail {
42
36
  symbol: string;
43
37
  debtRatio: string;
@@ -45,6 +39,12 @@ export interface IsolatedMarginAssetDetail {
45
39
  baseAsset: MarginAccountDetail;
46
40
  quoteAsset: MarginAccountDetail;
47
41
  }
42
+ export interface IsolatedMarginBalance {
43
+ totalAssetOfQuoteCurrency: string;
44
+ totalLiabilityOfQuoteCurrency: string;
45
+ timestamp: number;
46
+ assets: IsolatedMarginAssetDetail[];
47
+ }
48
48
  /**
49
49
  *
50
50
  * Deposit
@@ -76,13 +76,6 @@ export interface HistoricalDepositItem {
76
76
  isInner: boolean;
77
77
  status: 'PROCESSING' | 'SUCCESS' | 'FAILURE';
78
78
  }
79
- export interface Deposits {
80
- currentPage: number;
81
- pageSize: number;
82
- totalNum: number;
83
- totalPage: number;
84
- items: DepositItem[];
85
- }
86
79
  export interface DepositItem {
87
80
  currency?: string;
88
81
  chain?: string;
@@ -98,6 +91,13 @@ export interface DepositItem {
98
91
  remark?: string;
99
92
  arrears?: boolean;
100
93
  }
94
+ export interface Deposits {
95
+ currentPage: number;
96
+ pageSize: number;
97
+ totalNum: number;
98
+ totalPage: number;
99
+ items: DepositItem[];
100
+ }
101
101
  export interface V1HistoricalDeposits {
102
102
  currentPage: number;
103
103
  pageSize: number;
@@ -181,34 +181,34 @@ export interface IsolatedMarginSymbolsConfig {
181
181
  baseBorrowCoefficient: string;
182
182
  quoteBorrowCoefficient: string;
183
183
  }
184
- export interface IsolatedMarginAccountInfo {
185
- totalConversionBalance: string;
186
- liabilityConversionBalance: string;
187
- assets: AssetInfo[];
184
+ export interface AssetDetail {
185
+ currency: string;
186
+ totalBalance: string;
187
+ holdBalance: string;
188
+ availableBalance: string;
189
+ liability: string;
190
+ interest: string;
191
+ borrowableAmount: string;
188
192
  }
189
- export interface SingleIsolatedMarginAccountInfo {
193
+ export interface AssetInfo {
190
194
  symbol: string;
191
195
  status: string;
192
196
  debtRatio: string;
193
197
  baseAsset: AssetDetail;
194
198
  quoteAsset: AssetDetail;
195
199
  }
196
- export interface AssetInfo {
200
+ export interface IsolatedMarginAccountInfo {
201
+ totalConversionBalance: string;
202
+ liabilityConversionBalance: string;
203
+ assets: AssetInfo[];
204
+ }
205
+ export interface SingleIsolatedMarginAccountInfo {
197
206
  symbol: string;
198
207
  status: string;
199
208
  debtRatio: string;
200
209
  baseAsset: AssetDetail;
201
210
  quoteAsset: AssetDetail;
202
211
  }
203
- export interface AssetDetail {
204
- currency: string;
205
- totalBalance: string;
206
- holdBalance: string;
207
- availableBalance: string;
208
- liability: string;
209
- interest: string;
210
- borrowableAmount: string;
211
- }
212
212
  /**
213
213
  *
214
214
  * Margin trading(v3)
@@ -225,14 +225,6 @@ export interface MarginOrderV3 {
225
225
  orderNo: string;
226
226
  actualSize: number;
227
227
  }
228
- export interface MarginBorrowHistoryV3 {
229
- timestamp: number;
230
- currentPage: number;
231
- pageSize: number;
232
- totalNum: number;
233
- totalPage: number;
234
- items: MarginBorrowHistoryRecord[];
235
- }
236
228
  export interface MarginBorrowHistoryRecord {
237
229
  orderNo: string;
238
230
  symbol: string;
@@ -242,13 +234,13 @@ export interface MarginBorrowHistoryRecord {
242
234
  status: string;
243
235
  createdTime: number;
244
236
  }
245
- export interface MarginRepayHistoryV3 {
237
+ export interface MarginBorrowHistoryV3 {
246
238
  timestamp: number;
247
239
  currentPage: number;
248
240
  pageSize: number;
249
241
  totalNum: number;
250
242
  totalPage: number;
251
- items: MarginRepayHistoryRecord[];
243
+ items: MarginBorrowHistoryRecord[];
252
244
  }
253
245
  export interface MarginRepayHistoryRecord {
254
246
  orderNo: string;
@@ -260,6 +252,14 @@ export interface MarginRepayHistoryRecord {
260
252
  status: string;
261
253
  createdTime: number;
262
254
  }
255
+ export interface MarginRepayHistoryV3 {
256
+ timestamp: number;
257
+ currentPage: number;
258
+ pageSize: number;
259
+ totalNum: number;
260
+ totalPage: number;
261
+ items: MarginRepayHistoryRecord[];
262
+ }
263
263
  export interface MarginInterestRecord {
264
264
  currency: string;
265
265
  dayRatio: string;
@@ -10,17 +10,6 @@
10
10
  * Market data
11
11
  *
12
12
  */
13
- export interface CurrencyInfo {
14
- currency: string;
15
- name: string;
16
- fullName: string;
17
- precision: number;
18
- confirms: number | null;
19
- contractAddress: string | null;
20
- isMarginEnabled: boolean;
21
- isDebitEnabled: boolean;
22
- chains: Chain[];
23
- }
24
13
  interface Chain {
25
14
  chainName: string;
26
15
  withdrawalMinSize: string;
@@ -38,6 +27,17 @@ interface Chain {
38
27
  needTag: boolean;
39
28
  chainId: string;
40
29
  }
30
+ export interface CurrencyInfo {
31
+ currency: string;
32
+ name: string;
33
+ fullName: string;
34
+ precision: number;
35
+ confirms: number | null;
36
+ contractAddress: string | null;
37
+ isMarginEnabled: boolean;
38
+ isDebitEnabled: boolean;
39
+ chains: Chain[];
40
+ }
41
41
  export interface SymbolInfo {
42
42
  symbol: string;
43
43
  name: string;
@@ -285,13 +285,6 @@ export interface MultipleOrdersResponse {
285
285
  failMsg?: any;
286
286
  clientOid: string;
287
287
  }
288
- export interface SpotOrderList {
289
- currentPage: number;
290
- pageSize: number;
291
- totalNum: number;
292
- totalPage: number;
293
- items: SpotOrder[];
294
- }
295
288
  export interface SpotOrder {
296
289
  id: string;
297
290
  symbol: string;
@@ -324,6 +317,13 @@ export interface SpotOrder {
324
317
  createdAt: number;
325
318
  tradeType: string;
326
319
  }
320
+ export interface SpotOrderList {
321
+ currentPage: number;
322
+ pageSize: number;
323
+ totalNum: number;
324
+ totalPage: number;
325
+ items: SpotOrder[];
326
+ }
327
327
  /**
328
328
  *
329
329
  * Fills
@@ -359,13 +359,6 @@ export interface SpotOrderFills {
359
359
  * Stop order
360
360
  *
361
361
  */
362
- export interface StopOrders {
363
- currentPage: number;
364
- pageSize: number;
365
- totalNum: number;
366
- totalPage: number;
367
- items: StopOrderItem[];
368
- }
369
362
  export interface StopOrderItem {
370
363
  id?: string;
371
364
  symbol?: string;
@@ -399,11 +392,27 @@ export interface StopOrderItem {
399
392
  stopPrice?: string;
400
393
  orderTime?: number;
401
394
  }
395
+ export interface StopOrders {
396
+ currentPage: number;
397
+ pageSize: number;
398
+ totalNum: number;
399
+ totalPage: number;
400
+ items: StopOrderItem[];
401
+ }
402
402
  /**
403
403
  *
404
404
  * OCO order
405
405
  *
406
406
  */
407
+ export interface OCOOrderSubOrder {
408
+ id: string;
409
+ symbol: string;
410
+ side: 'buy' | 'sell';
411
+ price: string;
412
+ stopPrice: string;
413
+ size: string;
414
+ status: 'NEW' | 'DONE' | 'TRIGGERED' | 'CANCELLED';
415
+ }
407
416
  export interface OCOOrderDetails {
408
417
  orderId: string;
409
418
  symbol: string;
@@ -412,13 +421,11 @@ export interface OCOOrderDetails {
412
421
  status: 'NEW' | 'DONE' | 'TRIGGERED' | 'CANCELLED';
413
422
  orders: OCOOrderSubOrder[];
414
423
  }
415
- export interface OCOOrderSubOrder {
416
- id: string;
424
+ export interface OCOOrderListItem {
425
+ orderId: string;
417
426
  symbol: string;
418
- side: 'buy' | 'sell';
419
- price: string;
420
- stopPrice: string;
421
- size: string;
427
+ clientOid: string;
428
+ orderTime: number;
422
429
  status: 'NEW' | 'DONE' | 'TRIGGERED' | 'CANCELLED';
423
430
  }
424
431
  export interface OCOOrders {
@@ -428,11 +435,4 @@ export interface OCOOrders {
428
435
  totalPage: number;
429
436
  items: OCOOrderListItem[];
430
437
  }
431
- export interface OCOOrderListItem {
432
- orderId: string;
433
- symbol: string;
434
- clientOid: string;
435
- orderTime: number;
436
- status: 'NEW' | 'DONE' | 'TRIGGERED' | 'CANCELLED';
437
- }
438
438
  export {};
@@ -265,7 +265,7 @@ export class FuturesClient extends BaseRestClient {
265
265
  * Get order details by client order id.
266
266
  */
267
267
  getOrderByClientOrderId(params) {
268
- return this.getPrivate(`api/v1/orders/byClientOid`, params);
268
+ return this.getPrivate('api/v1/orders/byClientOid', params);
269
269
  }
270
270
  /**
271
271
  * Get Order List
@@ -485,7 +485,7 @@ export class FuturesClient extends BaseRestClient {
485
485
  * Cancel an order (including a stop order) in copy trading by client order id.
486
486
  */
487
487
  cancelCopyTradeOrderByClientOid(params) {
488
- return this.deletePrivate(`api/v1/copy-trade/futures/orders/client-order`, params);
488
+ return this.deletePrivate('api/v1/copy-trade/futures/orders/client-order', params);
489
489
  }
490
490
  /**
491
491
  * Get Max Open Size
@@ -2,16 +2,18 @@ import { AxiosRequestConfig } from 'axios';
2
2
  import { BaseRestClient } from './lib/BaseRestClient.js';
3
3
  import { RestClientOptions, RestClientType } from './lib/requestUtils.js';
4
4
  import { AccountHFMarginTransactionsRequest, AccountHFTransactionsRequest, CreateSubAccountAPIRequest, CreateSubAccountRequest, DeleteSubAccountAPIRequest, GetBalancesRequest, GetSpotTransactionsRequest, UpdateSubAccountAPIRequest } from './types/request/spot-account.js';
5
+ import { GetAffiliateCommissionRequest, GetAffiliateInviteesRequest, GetAffiliateTradeHistoryRequest } from './types/request/spot-affiliate.js';
5
6
  import { AddConvertLimitOrderRequest, AddConvertOrderRequest, CancelConvertLimitOrderRequest, GetConvertLimitOrderDetailRequest, GetConvertLimitOrdersRequest, GetConvertLimitQuoteRequest, GetConvertOrderDetailRequest, GetConvertOrderHistoryRequest, GetConvertQuoteRequest, GetConvertSymbolRequest } from './types/request/spot-convert.js';
6
- import { GetEarnFixedIncomeHoldAssetsRequest, GetEarnRedeemPreviewRequest, InitiateRedemptionRequest, SubscribeEarnFixedIncomeRequest } from './types/request/spot-earn.js';
7
+ import { GetDualInvestmentProductsRequest, GetEarnFixedIncomeHoldAssetsRequest, GetEarnRedeemPreviewRequest, GetStructuredProductOrdersRequest, InitiateRedemptionRequest, StructuredProductPurchaseRequest, SubscribeEarnFixedIncomeRequest } from './types/request/spot-earn.js';
7
8
  import { ApplyWithdrawRequest, CreateDepositAddressV3Request, FlexTransferRequest, GetDepositsRequest, GetIsolatedMarginBalanceRequest, GetMarginBalanceRequest, GetTransferableRequest, GetWithdrawalsRequest, InnerTransferRequest, submitTransferMasterSubRequest, SubmitWithdrawV3Request } from './types/request/spot-funding.js';
8
9
  import { GetHFMarginFilledRequest, getHFMarginFillsRequest, GetLendingRedemptionOrdersV3Request, GetLendingSubscriptionOrdersV3Request, HFMarginRequestOrder, InitiateLendingRedemptionV3Request, InitiateLendingSubscriptionV3Request, MarginBorrowV3Request, MarginHistoryV3Request, MarginInterestRecordsRequest, MarginRepayV3Request, MarginRiskLimitRequest, ModifyLendingSubscriptionOrdersV3Request, SubmitHFMarginOrderRequest, SubmitMarginOrderRequest } from './types/request/spot-margin-trading.js';
9
10
  import { GetAnnouncementsRequest } from './types/request/spot-misc.js';
10
11
  import { CancelAllOrdersRequest, CancelSpecifiedNumberHFOrdersRequest, CancelStopOrdersRequest, GetFillsRequest, GetHFCompletedOrdersRequest, GetHFFilledListRequest, GetOCOOrdersRequest, GetOrderListRequest, GetSpotKlinesRequest, GetStopOrdersListRequest, ModifyHFOrderRequest, SubmitHFOrderRequest, SubmitMultipleOrdersRequest, SubmitOCOOrderRequest, SubmitOrderRequest, SubmitStopOrderRequest } from './types/request/spot-trading.js';
11
12
  import { APISuccessResponse, ServiceStatus } from './types/response/shared.types.js';
12
13
  import { Account, AccountHFMarginTransactions, Balances, CreateSubAccount, CreateSubAPI, DeleteSubAccountAPI, SpotAccountSummary, SpotAccountTransaction, SpotAccountTransactions, SubAccountAPIInfo, SubAccountBalance, SubAccountBalancesV2, SubAccountInfo, SubAccountsV2, UpdateSubAPI } from './types/response/spot-account.js';
14
+ import { AffiliateCommissionItem, AffiliateInvitees, AffiliateTradeHistory } from './types/response/spot-affiliate.js';
13
15
  import { ConvertCurrencies, ConvertLimitOrder, ConvertLimitOrdersList, ConvertLimitQuote, ConvertOrder, ConvertOrderHistory, ConvertQuote, ConvertSymbol, SubmitConvertOrderResponse, SumbitConvertLimitResp } from './types/response/spot-convert.js';
14
- import { EarnFixedIncomeHoldAssets, EarnProduct, GetEarnRedeemPreviewResponse, InitiateRedemptionResponse, SubscribeEarnFixedIncomeResponse } from './types/response/spot-earn.js';
16
+ import { DualInvestmentProduct, EarnFixedIncomeHoldAssets, EarnProduct, GetEarnRedeemPreviewResponse, InitiateRedemptionResponse, StructuredProductOrders, StructuredProductPurchaseResponse, SubscribeEarnFixedIncomeResponse } from './types/response/spot-earn.js';
15
17
  import { CreateDepositAddressV3Response, DepositAddress, DepositAddressV2, DepositAddressV3, Deposits, HistoricalWithdrawalsV1, IsolatedMarginBalance, MarginAccountBalance, MarginBalance, TransferableFunds, V1HistoricalDeposits, WithdrawalById, WithdrawalQuotas, Withdrawals } from './types/response/spot-funding.js';
16
18
  import { HFMarginOrder, HFMarginTransactionRecord, IsolatedMarginAccountInfo, IsolatedMarginSymbolsConfig, LendingCurrencyV3, LendingRedemption, MarginActivePairsV3, MarginBorrowHistoryV3, MarginConfigInfo, MarginInterestRecords, MarginLevTokenInfo, MarginMarkPrice, MarginOrderV3, MarginRepayHistoryV3, MarginRiskLimit, MarginSubmitOrderV3Response, SingleIsolatedMarginAccountInfo, SubmitMarginOrderResponse } from './types/response/spot-margin-trading.js';
17
19
  import { Announcements } from './types/response/spot-misc.js';
@@ -1172,7 +1174,7 @@ export declare class SpotClient extends BaseRestClient {
1172
1174
  cancelConvertLimitOrder(params: CancelConvertLimitOrderRequest): Promise<APISuccessResponse<null>>;
1173
1175
  /**
1174
1176
  *
1175
- * REST - EARN
1177
+ * REST - EARN - Simple earn
1176
1178
  *
1177
1179
  */
1178
1180
  /**
@@ -1242,6 +1244,29 @@ export declare class SpotClient extends BaseRestClient {
1242
1244
  getEarnEthStakingProducts(params?: {
1243
1245
  currency: string;
1244
1246
  }): Promise<APISuccessResponse<EarnProduct[]>>;
1247
+ /**
1248
+ *
1249
+ * REST - EARN - Structured earn(Dual)
1250
+ *
1251
+ */
1252
+ /**
1253
+ * Structured Product Purchase
1254
+ *
1255
+ * This endpoint allows you to subscribe Struct-Earn products.
1256
+ */
1257
+ submitStructuredProductPurchase(params: StructuredProductPurchaseRequest): Promise<APISuccessResponse<StructuredProductPurchaseResponse>>;
1258
+ /**
1259
+ * Get Dual Investment Products
1260
+ *
1261
+ * Available dual investment products can be obtained at this endpoint. If no products are available, an empty list is returned.
1262
+ */
1263
+ getDualInvestmentProducts(params: GetDualInvestmentProductsRequest): Promise<APISuccessResponse<DualInvestmentProduct[]>>;
1264
+ /**
1265
+ * Get Structured Product Orders
1266
+ *
1267
+ * This endpoint is to query structured product orders
1268
+ */
1269
+ getStructuredProductOrders(params: GetStructuredProductOrdersRequest): Promise<APISuccessResponse<StructuredProductOrders>>;
1245
1270
  /**
1246
1271
  *
1247
1272
  * REST - VIP LENDING
@@ -1274,11 +1299,30 @@ export declare class SpotClient extends BaseRestClient {
1274
1299
  *
1275
1300
  */
1276
1301
  /**
1302
+ * @deprecated This method is deprecated. Use other affiliate endpoints instead.
1277
1303
  * Get Affiliate User Rebate Information
1278
1304
  *
1279
1305
  * This endpoint allows getting affiliate user rebate information.
1280
1306
  */
1281
1307
  getAffiliateUserRebateInfo(): Promise<APISuccessResponse<any>>;
1308
+ /**
1309
+ * Get Trade History
1310
+ *
1311
+ * Trade history information can be obtained at this endpoint.
1312
+ */
1313
+ getAffiliateTradeHistory(params: GetAffiliateTradeHistoryRequest): Promise<APISuccessResponse<AffiliateTradeHistory>>;
1314
+ /**
1315
+ * Get Commission
1316
+ *
1317
+ * My commission information can be obtained at this endpoint.
1318
+ */
1319
+ getAffiliateCommission(params?: GetAffiliateCommissionRequest): Promise<APISuccessResponse<AffiliateCommissionItem[]>>;
1320
+ /**
1321
+ * Get Invited
1322
+ *
1323
+ * Affiliate user invited information can be obtained at this endpoint.
1324
+ */
1325
+ getAffiliateInvitees(params?: GetAffiliateInviteesRequest): Promise<APISuccessResponse<AffiliateInvitees>>;
1282
1326
  /**
1283
1327
  *
1284
1328
  * REST - BROKER
@@ -435,7 +435,7 @@ export class SpotClient extends BaseRestClient {
435
435
  * the best ask price and size as well as the last traded price and the last traded size.
436
436
  */
437
437
  getTicker(params) {
438
- return this.get(`api/v1/market/orderbook/level1`, params);
438
+ return this.get('api/v1/market/orderbook/level1', params);
439
439
  }
440
440
  /**
441
441
  * Get All Tickers
@@ -469,7 +469,7 @@ export class SpotClient extends BaseRestClient {
469
469
  * Query for part orderbook depth data. Level 20(aggregated by price)
470
470
  */
471
471
  getOrderBookLevel20(params) {
472
- return this.get(`api/v1/market/orderbook/level2_20`, params);
472
+ return this.get('api/v1/market/orderbook/level2_20', params);
473
473
  }
474
474
  /**
475
475
  * Get Part OrderBook
@@ -477,7 +477,7 @@ export class SpotClient extends BaseRestClient {
477
477
  * Query for part orderbook depth data. Level 100(aggregated by price)
478
478
  */
479
479
  getOrderBookLevel100(params) {
480
- return this.get(`api/v1/market/orderbook/level2_100`, params);
480
+ return this.get('api/v1/market/orderbook/level2_100', params);
481
481
  }
482
482
  /**
483
483
  * Get Full OrderBook
@@ -634,7 +634,7 @@ export class SpotClient extends BaseRestClient {
634
634
  * This endpoint can cancel all spot orders for specific symbol.
635
635
  */
636
636
  cancelHFAllOrdersBySymbol(params) {
637
- return this.deletePrivate(`api/v1/hf/orders`, params);
637
+ return this.deletePrivate('api/v1/hf/orders', params);
638
638
  }
639
639
  /**
640
640
  * Cancel All Orders
@@ -642,7 +642,7 @@ export class SpotClient extends BaseRestClient {
642
642
  * This endpoint can cancel all spot orders for all symbol.
643
643
  */
644
644
  cancelHFAllOrders() {
645
- return this.deletePrivate(`api/v1/hf/orders/cancelAll`);
645
+ return this.deletePrivate('api/v1/hf/orders/cancelAll');
646
646
  }
647
647
  /**
648
648
  * Modify Order
@@ -674,7 +674,7 @@ export class SpotClient extends BaseRestClient {
674
674
  * This endpoint can query all spot symbol that has active orders
675
675
  */
676
676
  getHFActiveSymbols() {
677
- return this.getPrivate(`api/v1/hf/orders/active/symbols`);
677
+ return this.getPrivate('api/v1/hf/orders/active/symbols');
678
678
  }
679
679
  /**
680
680
  * @deprecated as of 13-03-2025- use getHFActiveOrdersPaginated() instead
@@ -684,7 +684,7 @@ export class SpotClient extends BaseRestClient {
684
684
  * The returned data is sorted in descending order according to the latest update time of the order.
685
685
  */
686
686
  getHFActiveOrders(params) {
687
- return this.getPrivate(`api/v1/hf/orders/active`, params);
687
+ return this.getPrivate('api/v1/hf/orders/active', params);
688
688
  }
689
689
  /**
690
690
  * Get Open Orders By Page
@@ -702,7 +702,7 @@ export class SpotClient extends BaseRestClient {
702
702
  * The returned data is sorted in descending order according to the latest update time of the order.
703
703
  */
704
704
  getHFCompletedOrders(params) {
705
- return this.getPrivate(`api/v1/hf/orders/done`, params);
705
+ return this.getPrivate('api/v1/hf/orders/done', params);
706
706
  }
707
707
  /**
708
708
  * Get Trade History
@@ -745,7 +745,7 @@ export class SpotClient extends BaseRestClient {
745
745
  * This endpoint can be used to cancel a spot stop order by clientOid.
746
746
  */
747
747
  cancelStopOrderByClientOid(params) {
748
- return this.deletePrivate(`api/v1/stop-order/cancelOrderByClientOid`, params);
748
+ return this.deletePrivate('api/v1/stop-order/cancelOrderByClientOid', params);
749
749
  }
750
750
  /**
751
751
  * Cancel Stop Order By OrderId
@@ -761,7 +761,7 @@ export class SpotClient extends BaseRestClient {
761
761
  * Request via this endpoint to cancel a batch of stop orders.
762
762
  */
763
763
  cancelStopOrders(params) {
764
- return this.deletePrivate(`api/v1/stop-order/cancel`, params);
764
+ return this.deletePrivate('api/v1/stop-order/cancel', params);
765
765
  }
766
766
  /**
767
767
  * Get Stop Orders List
@@ -949,7 +949,7 @@ export class SpotClient extends BaseRestClient {
949
949
  * This endpoint can cancel all open Margin orders by symbol
950
950
  */
951
951
  cancelHFAllMarginOrders(params) {
952
- return this.deletePrivate(`api/v3/hf/margin/orders`, params);
952
+ return this.deletePrivate('api/v3/hf/margin/orders', params);
953
953
  }
954
954
  /**
955
955
  * Get Symbols With Open Order
@@ -965,7 +965,7 @@ export class SpotClient extends BaseRestClient {
965
965
  * This endpoint is to obtain all Margin active order lists, and the return value of the active order endpoint is the paged data of all uncompleted order lists.
966
966
  */
967
967
  getHFActiveMarginOrders(params) {
968
- return this.getPrivate(`api/v3/hf/margin/orders/active`, params);
968
+ return this.getPrivate('api/v3/hf/margin/orders/active', params);
969
969
  }
970
970
  /**
971
971
  * Get Closed Orders
@@ -1221,7 +1221,7 @@ export class SpotClient extends BaseRestClient {
1221
1221
  }
1222
1222
  /**
1223
1223
  *
1224
- * REST - EARN
1224
+ * REST - EARN - Simple earn
1225
1225
  *
1226
1226
  */
1227
1227
  /**
@@ -1299,6 +1299,35 @@ export class SpotClient extends BaseRestClient {
1299
1299
  getEarnEthStakingProducts(params) {
1300
1300
  return this.getPrivate('api/v1/earn/eth-staking/products', params);
1301
1301
  }
1302
+ /**
1303
+ *
1304
+ * REST - EARN - Structured earn(Dual)
1305
+ *
1306
+ */
1307
+ /**
1308
+ * Structured Product Purchase
1309
+ *
1310
+ * This endpoint allows you to subscribe Struct-Earn products.
1311
+ */
1312
+ submitStructuredProductPurchase(params) {
1313
+ return this.postPrivate('api/v1/struct-earn/orders', params);
1314
+ }
1315
+ /**
1316
+ * Get Dual Investment Products
1317
+ *
1318
+ * Available dual investment products can be obtained at this endpoint. If no products are available, an empty list is returned.
1319
+ */
1320
+ getDualInvestmentProducts(params) {
1321
+ return this.get('api/v1/struct-earn/dual/products', params);
1322
+ }
1323
+ /**
1324
+ * Get Structured Product Orders
1325
+ *
1326
+ * This endpoint is to query structured product orders
1327
+ */
1328
+ getStructuredProductOrders(params) {
1329
+ return this.getPrivate('api/v1/struct-earn/orders', params);
1330
+ }
1302
1331
  /**
1303
1332
  *
1304
1333
  * REST - VIP LENDING
@@ -1337,6 +1366,7 @@ export class SpotClient extends BaseRestClient {
1337
1366
  *
1338
1367
  */
1339
1368
  /**
1369
+ * @deprecated This method is deprecated. Use other affiliate endpoints instead.
1340
1370
  * Get Affiliate User Rebate Information
1341
1371
  *
1342
1372
  * This endpoint allows getting affiliate user rebate information.
@@ -1344,6 +1374,30 @@ export class SpotClient extends BaseRestClient {
1344
1374
  getAffiliateUserRebateInfo() {
1345
1375
  return this.getPrivate('api/v2/affiliate/inviter/statistics');
1346
1376
  }
1377
+ /**
1378
+ * Get Trade History
1379
+ *
1380
+ * Trade history information can be obtained at this endpoint.
1381
+ */
1382
+ getAffiliateTradeHistory(params) {
1383
+ return this.getPrivate('api/v2/affiliate/queryTransactionByUid', params);
1384
+ }
1385
+ /**
1386
+ * Get Commission
1387
+ *
1388
+ * My commission information can be obtained at this endpoint.
1389
+ */
1390
+ getAffiliateCommission(params) {
1391
+ return this.getPrivate('api/v2/affiliate/queryMyCommission', params);
1392
+ }
1393
+ /**
1394
+ * Get Invited
1395
+ *
1396
+ * Affiliate user invited information can be obtained at this endpoint.
1397
+ */
1398
+ getAffiliateInvitees(params) {
1399
+ return this.getPrivate('api/v2/affiliate/queryInvitees', params);
1400
+ }
1347
1401
  /**
1348
1402
  *
1349
1403
  * REST - BROKER