kucoin-api 2.0.0 → 2.0.2

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 (51) hide show
  1. package/dist/cjs/FuturesClient.d.ts +129 -24
  2. package/dist/cjs/FuturesClient.js +108 -16
  3. package/dist/cjs/FuturesClient.js.map +1 -1
  4. package/dist/cjs/SpotClient.d.ts +80 -85
  5. package/dist/cjs/SpotClient.js +55 -55
  6. package/dist/cjs/SpotClient.js.map +1 -1
  7. package/dist/cjs/WebsocketClient.d.ts +1 -0
  8. package/dist/cjs/WebsocketClient.js +23 -22
  9. package/dist/cjs/WebsocketClient.js.map +1 -1
  10. package/dist/cjs/lib/BaseRestClient.d.ts +6 -2
  11. package/dist/cjs/lib/BaseRestClient.js +8 -1
  12. package/dist/cjs/lib/BaseRestClient.js.map +1 -1
  13. package/dist/cjs/lib/requestUtils.d.ts +1 -0
  14. package/dist/cjs/lib/requestUtils.js.map +1 -1
  15. package/dist/cjs/types/request/futures.types.d.ts +68 -16
  16. package/dist/cjs/types/request/spot-account.d.ts +1 -1
  17. package/dist/cjs/types/request/spot-funding.d.ts +0 -2
  18. package/dist/cjs/types/request/spot-trading.d.ts +11 -20
  19. package/dist/cjs/types/response/futures.types.d.ts +118 -58
  20. package/dist/cjs/types/response/spot-account.d.ts +76 -28
  21. package/dist/cjs/types/response/spot-funding.d.ts +34 -32
  22. package/dist/cjs/types/response/spot-margin-trading.d.ts +80 -15
  23. package/dist/cjs/types/response/spot-misc.d.ts +1 -1
  24. package/dist/cjs/types/response/spot-trading.d.ts +100 -74
  25. package/dist/cjs/types/websockets/client.d.ts +4 -0
  26. package/dist/mjs/FuturesClient.d.ts +129 -24
  27. package/dist/mjs/FuturesClient.js +108 -16
  28. package/dist/mjs/FuturesClient.js.map +1 -1
  29. package/dist/mjs/SpotClient.d.ts +80 -85
  30. package/dist/mjs/SpotClient.js +55 -55
  31. package/dist/mjs/SpotClient.js.map +1 -1
  32. package/dist/mjs/WebsocketClient.d.ts +1 -0
  33. package/dist/mjs/WebsocketClient.js +23 -22
  34. package/dist/mjs/WebsocketClient.js.map +1 -1
  35. package/dist/mjs/lib/BaseRestClient.d.ts +6 -2
  36. package/dist/mjs/lib/BaseRestClient.js +8 -1
  37. package/dist/mjs/lib/BaseRestClient.js.map +1 -1
  38. package/dist/mjs/lib/requestUtils.d.ts +1 -0
  39. package/dist/mjs/lib/requestUtils.js.map +1 -1
  40. package/dist/mjs/types/request/futures.types.d.ts +68 -16
  41. package/dist/mjs/types/request/spot-account.d.ts +1 -1
  42. package/dist/mjs/types/request/spot-funding.d.ts +0 -2
  43. package/dist/mjs/types/request/spot-trading.d.ts +11 -20
  44. package/dist/mjs/types/response/futures.types.d.ts +118 -58
  45. package/dist/mjs/types/response/spot-account.d.ts +76 -28
  46. package/dist/mjs/types/response/spot-funding.d.ts +34 -32
  47. package/dist/mjs/types/response/spot-margin-trading.d.ts +80 -15
  48. package/dist/mjs/types/response/spot-misc.d.ts +1 -1
  49. package/dist/mjs/types/response/spot-trading.d.ts +100 -74
  50. package/dist/mjs/types/websockets/client.d.ts +4 -0
  51. package/package.json +2 -2
@@ -10,17 +10,6 @@
10
10
  * Market data
11
11
  *
12
12
  */
13
- interface Chain {
14
- chainName: string;
15
- withdrawalMinSize: string;
16
- withdrawalMinFee: string;
17
- isWithdrawEnabled: boolean;
18
- isDepositEnabled: boolean;
19
- confirms: number;
20
- preConfirms: number;
21
- contractAddress: string;
22
- chainId: string;
23
- }
24
13
  export interface CurrencyInfo {
25
14
  currency: string;
26
15
  name: string;
@@ -31,10 +20,23 @@ export interface CurrencyInfo {
31
20
  isMarginEnabled: boolean;
32
21
  isDebitEnabled: boolean;
33
22
  chains: Chain[];
23
+ }
24
+ interface Chain {
25
+ chainName: string;
26
+ withdrawalMinSize: string;
27
+ depositMinSize: string | null;
28
+ withdrawFeeRate: string;
29
+ withdrawalMinFee: string;
30
+ isWithdrawEnabled: boolean;
31
+ isDepositEnabled: boolean;
32
+ confirms: number;
33
+ preConfirms: number;
34
+ contractAddress: string;
34
35
  withdrawPrecision: number;
36
+ maxWithdraw: string | null;
37
+ maxDeposit: string | null;
35
38
  needTag: boolean;
36
- maxWithdraw: string;
37
- maxDeposit: string;
39
+ chainId: string;
38
40
  }
39
41
  export interface SymbolInfo {
40
42
  symbol: string;
@@ -42,7 +44,7 @@ export interface SymbolInfo {
42
44
  baseCurrency: string;
43
45
  quoteCurrency: string;
44
46
  feeCurrency: string;
45
- market: string;
47
+ market: 'USDS' | 'BTC' | 'ALTS';
46
48
  baseMinSize: string;
47
49
  quoteMinSize: string;
48
50
  baseMaxSize: string;
@@ -54,6 +56,10 @@ export interface SymbolInfo {
54
56
  minFunds: string;
55
57
  isMarginEnabled: boolean;
56
58
  enableTrading: boolean;
59
+ feeCategory: 1 | 2 | 3;
60
+ makerFeeCoefficient: string;
61
+ takerFeeCoefficient: string;
62
+ st: boolean;
57
63
  }
58
64
  export interface Ticker {
59
65
  sequence: string;
@@ -65,6 +71,30 @@ export interface Ticker {
65
71
  bestBidSize: string;
66
72
  time: number;
67
73
  }
74
+ export interface AllTickers {
75
+ time: number;
76
+ ticker: Ticker[];
77
+ }
78
+ export interface AllTickersItem {
79
+ symbol: string;
80
+ symbolName: string;
81
+ buy: string;
82
+ bestBidSize: string;
83
+ sell: string;
84
+ bestAskSize: string;
85
+ changeRate: string;
86
+ changePrice: string;
87
+ high: string;
88
+ low: string;
89
+ vol: string;
90
+ volValue: string;
91
+ last: string;
92
+ averagePrice: string;
93
+ takerFeeRate: string;
94
+ makerFeeRate: string;
95
+ takerCoefficient: string;
96
+ makerCoefficient: string;
97
+ }
68
98
  export interface Symbol24hrStats {
69
99
  time: number;
70
100
  symbol: string;
@@ -96,15 +126,7 @@ export interface TradeHistory {
96
126
  size: string;
97
127
  side: string;
98
128
  }
99
- export interface Kline {
100
- startAt: string;
101
- open: string;
102
- close: string;
103
- high: string;
104
- low: string;
105
- volume: string;
106
- amount: string;
107
- }
129
+ export type Kline = [string, string, string, string, string, string, string];
108
130
  /**
109
131
  *
110
132
  * Spot HF trade
@@ -140,7 +162,8 @@ export interface SubmitMultipleHFOrdersSyncResponse {
140
162
  clientOid: string;
141
163
  }
142
164
  export interface SyncCancelHFOrderResponse {
143
- orderId: string;
165
+ clientOid?: string;
166
+ orderId?: string;
144
167
  originSize: string;
145
168
  dealSize: string;
146
169
  remainSize: string;
@@ -162,12 +185,13 @@ export interface AutoCancelHFOrderSettingQueryResponse {
162
185
  }
163
186
  export interface HFFilledOrder {
164
187
  id: number;
165
- symbol: string;
166
- tradeId: number;
167
188
  orderId: string;
168
189
  counterOrderId: string;
169
- side: string;
170
- liquidity: string;
190
+ tradeId: number;
191
+ symbol: string;
192
+ side: 'buy' | 'sell';
193
+ liquidity: 'taker' | 'maker';
194
+ type: 'limit' | 'market';
171
195
  forceTaker: boolean;
172
196
  price: string;
173
197
  size: string;
@@ -177,43 +201,45 @@ export interface HFFilledOrder {
177
201
  feeCurrency: string;
178
202
  stop: string;
179
203
  tradeType: string;
180
- type: string;
204
+ taxRate: string;
205
+ tax: string;
181
206
  createdAt: number;
182
207
  }
183
208
  export interface HFOrder {
184
209
  id: string;
210
+ clientOid: string;
185
211
  symbol: string;
186
212
  opType: string;
187
- type: string;
188
- side: string;
213
+ type: 'limit' | 'market';
214
+ side: 'buy' | 'sell';
189
215
  price: string;
190
216
  size: string;
191
- dealSize: string;
192
- cancelledSize: string;
193
- remainSize: string;
194
217
  funds: string;
218
+ dealSize: string;
195
219
  dealFunds: string;
196
- cancelledFunds: string;
220
+ remainSize: string;
197
221
  remainFunds: string;
222
+ cancelledSize: string;
223
+ cancelledFunds: string;
198
224
  fee: string;
199
225
  feeCurrency: string;
200
- stp: string;
201
- timeInForce: string;
226
+ stp?: 'DC' | 'CO' | 'CN' | 'CB' | null;
227
+ timeInForce: 'GTC' | 'GTT' | 'IOC' | 'FOK';
202
228
  postOnly: boolean;
203
229
  hidden: boolean;
204
230
  iceberg: boolean;
205
231
  visibleSize: string;
206
232
  cancelAfter: number;
207
233
  channel: string;
208
- clientOid: string;
209
- remark: string;
210
- tags: string;
211
- active: boolean;
212
- inOrderBook: boolean;
234
+ remark?: string | null;
235
+ tags?: string | null;
213
236
  cancelExist: boolean;
237
+ tradeType: string;
238
+ inOrderBook: boolean;
239
+ active: boolean;
240
+ tax: string;
214
241
  createdAt: number;
215
242
  lastUpdatedAt: number;
216
- tradeType: string;
217
243
  }
218
244
  /**
219
245
  *
@@ -324,37 +350,37 @@ export interface StopOrders {
324
350
  items: StopOrderItem[];
325
351
  }
326
352
  export interface StopOrderItem {
327
- id: string;
328
- symbol: string;
329
- userId: string;
330
- status: 'NEW' | 'TRIGGERED';
331
- type: 'limit' | 'market';
332
- side: 'buy' | 'sell';
333
- price: string;
334
- size: string;
335
- funds: string | null;
336
- stp: string | null;
337
- timeInForce: 'GTC' | 'GTT' | 'IOC' | 'FOK';
338
- cancelAfter: number;
339
- postOnly: boolean;
340
- hidden: boolean;
341
- iceberg: boolean;
342
- visibleSize: string | null;
343
- channel: string;
344
- clientOid: string;
345
- remark: string | null;
346
- tags: string | null;
347
- orderTime: number;
348
- domainId: string;
349
- tradeSource: 'USER' | 'MARGIN_SYSTEM';
350
- tradeType: 'TRADE' | 'MARGIN_TRADE' | 'MARGIN_ISOLATED_TRADE';
351
- feeCurrency: string;
352
- takerFeeRate: string;
353
- makerFeeRate: string;
354
- createdAt: number;
355
- stop: 'loss' | 'entry';
356
- stopTriggerTime: number | null;
357
- stopPrice: string;
353
+ id?: string;
354
+ symbol?: string;
355
+ userId?: string;
356
+ status?: 'NEW' | 'TRIGGERED';
357
+ type?: 'limit' | 'market' | 'limit_stop' | 'market_stop';
358
+ side?: 'buy' | 'sell';
359
+ price?: string;
360
+ size?: string;
361
+ funds?: string | null;
362
+ stp?: string | null;
363
+ timeInForce?: 'GTC' | 'GTT' | 'IOC' | 'FOK';
364
+ cancelAfter?: number;
365
+ postOnly?: boolean;
366
+ hidden?: boolean;
367
+ iceberg?: boolean;
368
+ visibleSize?: string | null;
369
+ channel?: string;
370
+ clientOid?: string;
371
+ remark?: string | null;
372
+ tags?: string | null;
373
+ domainId?: string;
374
+ tradeSource?: 'USER' | 'MARGIN_SYSTEM';
375
+ tradeType?: 'TRADE' | 'MARGIN_TRADE' | 'MARGIN_ISOLATED_TRADE';
376
+ feeCurrency?: string;
377
+ takerFeeRate?: string;
378
+ makerFeeRate?: string;
379
+ createdAt?: number;
380
+ stop?: 'loss' | 'entry';
381
+ stopTriggerTime?: number | null;
382
+ stopPrice?: string;
383
+ orderTime?: number;
358
384
  }
359
385
  /**
360
386
  *
@@ -1,3 +1,5 @@
1
+ import { AxiosRequestConfig } from 'axios';
2
+ import { RestClientOptions } from '../../lib/requestUtils.js';
1
3
  /** General configuration for the WebsocketClient */
2
4
  export interface WSClientConfigurableOptions {
3
5
  /** Your API key */
@@ -14,6 +16,8 @@ export interface WSClientConfigurableOptions {
14
16
  pongTimeout?: number;
15
17
  /** Delay in milliseconds before respawning the connection */
16
18
  reconnectTimeout?: number;
19
+ restOptions?: RestClientOptions;
20
+ requestOptions?: AxiosRequestConfig;
17
21
  wsOptions?: {
18
22
  protocols?: string[];
19
23
  agent?: any;
@@ -1,8 +1,8 @@
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 { AccountFillsRequest, BatchCancelOrdersRequest, GetFundingHistoryRequest, GetFundingRatesRequest, GetInterestRatesRequest, GetKlinesRequest, GetOrdersRequest, GetStopOrdersRequest, GetTransactionsRequest, MaxOpenSizeRequest, Order, SLTPOrder } from './types/request/futures.types.js';
5
- import { AccountBalance, AccountSummary, AddMargin, BatchCancelOrderResult, FullOrderBookDetail, FuturesAccountFundingRateHistory, FuturesAccountTransaction, FuturesActiveOrder, FuturesClosedPositions, FuturesCurrentFundingRate, FuturesFill, FuturesFills, FuturesHistoricFundingRate, FuturesKline, FuturesMarkPrice, FuturesOrder, FuturesOrders, FuturesPosition, FuturesRiskLimit, FuturesSymbolInfo, IndexListItem, InterestRateItem, MarketTradeDetail, MaxOpenSize, PremiumIndexItem, SubBalance, SubmitMultipleOrdersFuturesResponse, TickerDetail } from './types/response/futures.types.js';
4
+ import { AccountFillsRequest, BatchCancelOrdersRequest, CopyTradeOrderRequest, CopyTradeSLTPOrderRequest, GetFundingHistoryRequest, GetFundingRatesRequest, GetInterestRatesRequest, GetKlinesRequest, GetOrdersRequest, GetStopOrdersRequest, GetTransactionsRequest, MaxOpenSizeRequest, Order, SLTPOrder } from './types/request/futures.types.js';
5
+ import { AccountBalance, AccountSummary, AddMargin, BatchCancelOrderResult, CopyTradePosition, FullOrderBookDetail, FuturesAccountFundingRateHistory, FuturesAccountTransaction, FuturesActiveOrder, FuturesClosedPositions, FuturesCurrentFundingRate, FuturesFill, FuturesFills, FuturesHistoricFundingRate, FuturesKline, FuturesMarkPrice, FuturesOrder, FuturesOrders, FuturesPosition, FuturesRiskLimit, FuturesSubAccount, FuturesSymbolInfo, IndexListItem, InterestRateItem, MarketTradeDetail, MaxOpenSize, PremiumIndexItem, SubmitMultipleOrdersFuturesResponse, TickerDetail } from './types/response/futures.types.js';
6
6
  import { APISuccessResponse, ServiceStatus } from './types/response/shared.types.js';
7
7
  import { WsConnectionInfo } from './types/response/ws.js';
8
8
  /**
@@ -31,7 +31,7 @@ export declare class FuturesClient extends BaseRestClient {
31
31
  }): Promise<APISuccessResponse<AccountBalance>>;
32
32
  /**
33
33
  * Get Account Ledgers - Futures
34
- * This interface can query the ledger records of the futures business line
34
+ * This endpoint can query the ledger records of the futures business line
35
35
  */
36
36
  getTransactions(params: GetTransactionsRequest): Promise<APISuccessResponse<{
37
37
  hasMore: boolean;
@@ -50,7 +50,7 @@ export declare class FuturesClient extends BaseRestClient {
50
50
  currency?: string;
51
51
  }): Promise<APISuccessResponse<{
52
52
  summary: AccountSummary;
53
- accounts: SubBalance[];
53
+ accounts: FuturesSubAccount[];
54
54
  }>>;
55
55
  /**
56
56
  *
@@ -59,7 +59,7 @@ export declare class FuturesClient extends BaseRestClient {
59
59
  */
60
60
  /**
61
61
  * Get Actual Fee - Futures
62
- * This interface is for the actual futures fee rate of the trading pair. The fee rate of your sub-account is the same as that of the master account.
62
+ * This endpoint is for the actual futures fee rate of the trading pair. The fee rate of your sub-account is the same as that of the master account.
63
63
  */
64
64
  getTradingPairFee(params: {
65
65
  symbol: string;
@@ -208,7 +208,7 @@ export declare class FuturesClient extends BaseRestClient {
208
208
  submitMultipleOrders(params: Order[]): Promise<APISuccessResponse<SubmitMultipleOrdersFuturesResponse[]>>;
209
209
  /**
210
210
  * Add Take Profit And Stop Loss Order
211
- * Place take profit and stop loss order supports both take-profit and stop-loss functions, and other functions are exactly the same as the place order interface.
211
+ * Place take profit and stop loss order supports both take-profit and stop-loss functions, and other functions are exactly the same as the place order endpoint.
212
212
  */
213
213
  submitSLTPOrder(params: SLTPOrder): Promise<APISuccessResponse<{
214
214
  orderId?: string;
@@ -229,6 +229,7 @@ export declare class FuturesClient extends BaseRestClient {
229
229
  */
230
230
  cancelOrderByClientOid(params: {
231
231
  clientOid: string;
232
+ symbol: string;
232
233
  }): Promise<APISuccessResponse<{
233
234
  clientOid: string;
234
235
  }>>;
@@ -236,9 +237,7 @@ export declare class FuturesClient extends BaseRestClient {
236
237
  * Batch Cancel Orders
237
238
  * Cancel multiple orders.
238
239
  */
239
- batchCancelOrders(params: BatchCancelOrdersRequest): Promise<APISuccessResponse<{
240
- data: BatchCancelOrderResult[];
241
- }>>;
240
+ batchCancelOrders(params: BatchCancelOrdersRequest): Promise<APISuccessResponse<BatchCancelOrderResult[]>>;
242
241
  /**
243
242
  * Cancel All Orders
244
243
  * Using this endpoint, all open orders (excluding stop orders) can be canceled in batches.
@@ -285,7 +284,7 @@ export declare class FuturesClient extends BaseRestClient {
285
284
  }): Promise<APISuccessResponse<FuturesOrder[]>>;
286
285
  /**
287
286
  * Get Stop Order List
288
- * Get the un-triggered stop orders list. Stop orders that have been triggered can be queried through the general order interface
287
+ * Get the un-triggered stop orders list. Stop orders that have been triggered can be queried through the general order endpoint
289
288
  */
290
289
  getStopOrders(params?: GetStopOrdersRequest): Promise<APISuccessResponse<FuturesOrders>>;
291
290
  /**
@@ -315,7 +314,7 @@ export declare class FuturesClient extends BaseRestClient {
315
314
  */
316
315
  /**
317
316
  * Get Margin Mode
318
- * This interface can query the margin mode of the current symbol.
317
+ * This endpoint can query the margin mode of the current symbol.
319
318
  */
320
319
  getMarginMode(params: {
321
320
  symbol: string;
@@ -355,7 +354,7 @@ export declare class FuturesClient extends BaseRestClient {
355
354
  }): Promise<APISuccessResponse<FuturesPosition[]>>;
356
355
  /**
357
356
  * Get Positions History
358
- * This interface can query position history information records.
357
+ * This endpoint can query position history information records.
359
358
  */
360
359
  getHistoryPositions(params?: {
361
360
  symbol?: string;
@@ -366,14 +365,14 @@ export declare class FuturesClient extends BaseRestClient {
366
365
  }): Promise<APISuccessResponse<FuturesClosedPositions>>;
367
366
  /**
368
367
  * Get Max Withdraw Margin
369
- * This interface can query the maximum amount of margin that the current position supports withdrawal.
368
+ * This endpoint can query the maximum amount of margin that the current position supports withdrawal.
370
369
  */
371
370
  getMaxWithdrawMargin(params: {
372
371
  symbol: string;
373
- }): Promise<APISuccessResponse<number>>;
372
+ }): Promise<APISuccessResponse<string>>;
374
373
  /**
375
374
  * Get Cross Margin Leverage
376
- * This interface can query the current symbol’s cross-margin leverage multiple.
375
+ * This endpoint can query the current symbol’s cross-margin leverage multiple.
377
376
  */
378
377
  getCrossMarginLeverage(params: {
379
378
  symbol: string;
@@ -383,7 +382,7 @@ export declare class FuturesClient extends BaseRestClient {
383
382
  }>>;
384
383
  /**
385
384
  * Modify Cross Margin Leverage
386
- * This interface can modify the current symbol’s cross-margin leverage multiple.
385
+ * This endpoint can modify the current symbol’s cross-margin leverage multiple.
387
386
  */
388
387
  changeCrossMarginLeverage(params: {
389
388
  symbol: string;
@@ -408,25 +407,22 @@ export declare class FuturesClient extends BaseRestClient {
408
407
  withdrawMargin(params: {
409
408
  symbol: string;
410
409
  withdrawAmount: string;
411
- }): Promise<APISuccessResponse<{
412
- sybmol: string;
413
- withdrawAmount: number;
414
- }>>;
410
+ }): Promise<APISuccessResponse<string>>;
415
411
  /**
416
412
  * Get Isolated Margin Risk Limit
417
- * This interface can be used to obtain information about risk limit level of a specific contract(Only valid for isolated Margin).
413
+ * This endpoint can be used to obtain information about risk limit level of a specific contract(Only valid for isolated Margin).
418
414
  */
419
415
  getRiskLimitLevel(params: {
420
416
  symbol: string;
421
417
  }): Promise<APISuccessResponse<FuturesRiskLimit[]>>;
422
418
  /**
423
419
  * Modify Isolated Margin Risk Limit
424
- * This interface is for the adjustment of the risk limit level(Only valid for isolated Margin).
420
+ * This endpoint is for the adjustment of the risk limit level(Only valid for isolated Margin).
425
421
  */
426
422
  updateRiskLimitLevel(params: {
427
423
  symbol: string;
428
424
  level: number;
429
- }): Promise<any>;
425
+ }): Promise<boolean>;
430
426
  /**
431
427
  *
432
428
  * REST - Futures Trading - Funding Fees
@@ -434,7 +430,7 @@ export declare class FuturesClient extends BaseRestClient {
434
430
  */
435
431
  /**
436
432
  * Get Current Funding Rate
437
- * This interface can be used to obtain the current funding rate of the specified symbol.
433
+ * This endpoint can be used to obtain the current funding rate of the specified symbol.
438
434
  */
439
435
  getFundingRate(params: {
440
436
  symbol: string;
@@ -452,6 +448,115 @@ export declare class FuturesClient extends BaseRestClient {
452
448
  dataList: FuturesAccountFundingRateHistory[];
453
449
  hasMore: boolean;
454
450
  }>>;
451
+ /**
452
+ *
453
+ * REST - Futures Trading - CopyTrading
454
+ *
455
+ */
456
+ /**
457
+ * Add Order
458
+ * Place order to the futures trading system for copy trading
459
+ */
460
+ submitCopyTradeOrder(params: CopyTradeOrderRequest): Promise<APISuccessResponse<{
461
+ orderId: string;
462
+ clientOid: string;
463
+ }>>;
464
+ /**
465
+ * Add Order Test
466
+ * Order test endpoint, the request parameters and return parameters of this endpoint are exactly the same as the order endpoint,
467
+ * and can be used to verify whether the signature is correct and other operations.
468
+ */
469
+ submitCopyTradeOrderTest(params: CopyTradeOrderRequest): Promise<APISuccessResponse<{
470
+ orderId: string;
471
+ clientOid: string;
472
+ }>>;
473
+ /**
474
+ * Add Take Profit And Stop Loss Order
475
+ * Place take profit and stop loss order supports both take-profit and stop-loss functions, and other functions are exactly the same as the place order endpoint.
476
+ */
477
+ submitCopyTradeSLTPOrder(params: CopyTradeSLTPOrderRequest): Promise<APISuccessResponse<{
478
+ orderId: string;
479
+ clientOid: string;
480
+ }>>;
481
+ /**
482
+ * Cancel Order By OrderId
483
+ * Cancel an order (including a stop order) in copy trading.
484
+ */
485
+ cancelCopyTradeOrderById(params: {
486
+ orderId: string;
487
+ }): Promise<APISuccessResponse<{
488
+ cancelledOrderIds: string[];
489
+ }>>;
490
+ /**
491
+ * Cancel Order By Client Order Id
492
+ * Cancel an order (including a stop order) in copy trading by client order id.
493
+ */
494
+ cancelCopyTradeOrderByClientOid(params: {
495
+ clientOid?: string;
496
+ symbol: string;
497
+ }): Promise<APISuccessResponse<{
498
+ clientOid: string;
499
+ }>>;
500
+ /**
501
+ * Get Max Open Size
502
+ * Get Maximum Open Position Size.
503
+ */
504
+ getCopyTradeMaxOpenSize(params: {
505
+ symbol: string;
506
+ maxBuyOpenSize: string;
507
+ maxSellOpenSize: string;
508
+ }): Promise<APISuccessResponse<{
509
+ symbol: string;
510
+ price: string;
511
+ leverage: number;
512
+ }>>;
513
+ /**
514
+ * Get Max Withdraw Margin
515
+ * This endpoint can query the maximum amount of margin that the current position supports withdrawal.
516
+ */
517
+ getCopyTradeMaxWithdrawMargin(params: {
518
+ symbol: string;
519
+ }): Promise<APISuccessResponse<string>>;
520
+ /**
521
+ * Add Isolated Margin
522
+ * Add Isolated Margin Manually.
523
+ */
524
+ addCopyTradeIsolatedMargin(params: {
525
+ symbol: string;
526
+ margin: number;
527
+ bizNo: string;
528
+ }): Promise<APISuccessResponse<CopyTradePosition>>;
529
+ /**
530
+ * Remove Isolated Margin
531
+ * Remove Isolated Margin Manually.
532
+ */
533
+ removeCopyTradeIsolatedMargin(params: {
534
+ symbol: string;
535
+ withdrawAmount: string;
536
+ }): Promise<APISuccessResponse<string>>;
537
+ /**
538
+ * Modify Isolated Margin Risk Limit
539
+ * This endpoint is for the adjustment of the risk limit level(Only valid for isolated Margin).
540
+ * To adjust the level will cancel the open order, the response can only indicate whether the submit of the adjustment request is successful or not.
541
+ */
542
+ modifyCopyTradeRiskLimitLevel(params: {
543
+ symbol: string;
544
+ level: number;
545
+ }): Promise<APISuccessResponse<boolean>>;
546
+ /**
547
+ * Modify Isolated Margin Auto-Deposit Status
548
+ * This endpoint is only applicable to isolated margin and is no longer recommended. It is recommended to use cross margin instead.
549
+ * @deprecated - It is recommended to use cross margin instead
550
+ */
551
+ updateCopyTradeAutoDepositStatus(params: {
552
+ symbol: string;
553
+ status: boolean;
554
+ }): Promise<APISuccessResponse<boolean>>;
555
+ /**
556
+ *
557
+ * REST - Futures - Broker
558
+ *
559
+ */
455
560
  /**
456
561
  * Get download link for broker rebate orders
457
562
  *