ccxt 4.5.44 → 4.5.46

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 (111) hide show
  1. package/README.md +9 -12
  2. package/dist/ccxt.browser.min.js +3 -3
  3. package/dist/cjs/ccxt.js +1 -12
  4. package/dist/cjs/src/abstract/kucoinfutures.js +1 -1
  5. package/dist/cjs/src/base/Exchange.js +39 -3
  6. package/dist/cjs/src/base/functions/encode.js +2 -2
  7. package/dist/cjs/src/base/functions/generic.js +8 -2
  8. package/dist/cjs/src/binance.js +11 -2
  9. package/dist/cjs/src/bitget.js +3 -1
  10. package/dist/cjs/src/bitmart.js +144 -21
  11. package/dist/cjs/src/bitrue.js +1 -1
  12. package/dist/cjs/src/bitteam.js +1 -1
  13. package/dist/cjs/src/btcbox.js +1 -1
  14. package/dist/cjs/src/bybit.js +58 -56
  15. package/dist/cjs/src/bydfi.js +102 -100
  16. package/dist/cjs/src/cex.js +1 -0
  17. package/dist/cjs/src/gate.js +264 -170
  18. package/dist/cjs/src/grvt.js +3 -2
  19. package/dist/cjs/src/hyperliquid.js +16 -5
  20. package/dist/cjs/src/kraken.js +4 -2
  21. package/dist/cjs/src/krakenfutures.js +1 -5
  22. package/dist/cjs/src/kucoin.js +4733 -972
  23. package/dist/cjs/src/kucoinfutures.js +14 -3434
  24. package/dist/cjs/src/lbank.js +1 -1
  25. package/dist/cjs/src/okx.js +75 -57
  26. package/dist/cjs/src/paradex.js +2 -6
  27. package/dist/cjs/src/poloniex.js +1 -1
  28. package/dist/cjs/src/pro/bydfi.js +19 -19
  29. package/dist/cjs/src/pro/gate.js +114 -53
  30. package/dist/cjs/src/pro/grvt.js +5 -3
  31. package/dist/cjs/src/pro/htx.js +4 -4
  32. package/dist/cjs/src/pro/kucoin.js +819 -178
  33. package/dist/cjs/src/pro/kucoinfutures.js +95 -1261
  34. package/dist/cjs/src/pro/mexc.js +10 -5
  35. package/dist/cjs/src/pro/okx.js +85 -40
  36. package/index.d.cts +2 -0
  37. package/js/ccxt.d.ts +2 -14
  38. package/js/ccxt.js +2 -10
  39. package/js/src/abstract/bitmart.d.ts +7 -0
  40. package/js/src/abstract/bydfi.d.ts +29 -29
  41. package/js/src/abstract/kraken.d.ts +1 -0
  42. package/js/src/abstract/kucoin.d.ts +46 -2
  43. package/js/src/abstract/kucoinfutures.d.ts +27 -11
  44. package/js/src/base/Exchange.d.ts +13 -1
  45. package/js/src/base/Exchange.js +39 -3
  46. package/js/src/base/functions/encode.js +2 -2
  47. package/js/src/base/functions/generic.js +9 -3
  48. package/js/src/binance.js +11 -2
  49. package/js/src/bitget.js +3 -1
  50. package/js/src/bitmart.d.ts +18 -4
  51. package/js/src/bitmart.js +144 -21
  52. package/js/src/bitrue.js +1 -1
  53. package/js/src/bitteam.js +1 -1
  54. package/js/src/btcbox.js +1 -1
  55. package/js/src/bybit.d.ts +1 -0
  56. package/js/src/bybit.js +58 -56
  57. package/js/src/bydfi.d.ts +31 -31
  58. package/js/src/bydfi.js +102 -100
  59. package/js/src/cex.js +2 -1
  60. package/js/src/gate.d.ts +125 -119
  61. package/js/src/gate.js +264 -170
  62. package/js/src/grvt.js +3 -2
  63. package/js/src/hyperliquid.d.ts +3 -1
  64. package/js/src/hyperliquid.js +16 -5
  65. package/js/src/kraken.js +4 -2
  66. package/js/src/krakenfutures.js +1 -5
  67. package/js/src/kucoin.d.ts +696 -100
  68. package/js/src/kucoin.js +4734 -973
  69. package/js/src/kucoinfutures.d.ts +4 -522
  70. package/js/src/kucoinfutures.js +14 -3434
  71. package/js/src/lbank.js +1 -1
  72. package/js/src/okx.d.ts +1 -0
  73. package/js/src/okx.js +75 -57
  74. package/js/src/paradex.d.ts +0 -1
  75. package/js/src/paradex.js +2 -6
  76. package/js/src/poloniex.js +1 -1
  77. package/js/src/pro/bydfi.d.ts +18 -18
  78. package/js/src/pro/bydfi.js +19 -19
  79. package/js/src/pro/gate.d.ts +30 -1
  80. package/js/src/pro/gate.js +114 -53
  81. package/js/src/pro/grvt.js +5 -3
  82. package/js/src/pro/htx.js +4 -4
  83. package/js/src/pro/kucoin.d.ts +70 -30
  84. package/js/src/pro/kucoin.js +821 -180
  85. package/js/src/pro/kucoinfutures.d.ts +17 -195
  86. package/js/src/pro/kucoinfutures.js +96 -1262
  87. package/js/src/pro/mexc.js +10 -5
  88. package/js/src/pro/okx.d.ts +1 -0
  89. package/js/src/pro/okx.js +85 -40
  90. package/package.json +2 -2
  91. package/dist/cjs/src/abstract/alp.js +0 -11
  92. package/dist/cjs/src/abstract/defx.js +0 -11
  93. package/dist/cjs/src/abstract/timex.js +0 -11
  94. package/dist/cjs/src/alp.js +0 -1059
  95. package/dist/cjs/src/defx.js +0 -2142
  96. package/dist/cjs/src/pro/defx.js +0 -866
  97. package/dist/cjs/src/timex.js +0 -1793
  98. package/js/src/abstract/alp.d.ts +0 -21
  99. package/js/src/abstract/alp.js +0 -5
  100. package/js/src/abstract/defx.d.ts +0 -72
  101. package/js/src/abstract/defx.js +0 -5
  102. package/js/src/abstract/timex.d.ts +0 -65
  103. package/js/src/abstract/timex.js +0 -5
  104. package/js/src/alp.d.ts +0 -209
  105. package/js/src/alp.js +0 -1052
  106. package/js/src/defx.d.ts +0 -348
  107. package/js/src/defx.js +0 -2135
  108. package/js/src/pro/defx.d.ts +0 -236
  109. package/js/src/pro/defx.js +0 -859
  110. package/js/src/timex.d.ts +0 -247
  111. package/js/src/timex.js +0 -1786
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/kucoin.js';
2
- import type { TransferEntry, Int, OrderSide, OrderType, Order, OHLCV, Trade, Balances, OrderRequest, Str, Transaction, Ticker, OrderBook, Tickers, Strings, Currency, Market, Num, Account, Dict, TradingFeeInterface, Currencies, int, LedgerEntry, DepositAddress, BorrowInterest, FundingRate } from './base/types.js';
2
+ import type { ADL, Account, Balances, BorrowInterest, Currency, Currencies, DepositAddress, Dict, FundingHistory, FundingRate, Int, int, LedgerEntry, Leverage, LeverageTier, LeverageTiers, MarginMode, MarginModification, Market, Num, OHLCV, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry } from './base/types.js';
3
3
  /**
4
4
  * @class kucoin
5
5
  * @augments Exchange
@@ -11,7 +11,8 @@ export default class kucoin extends Exchange {
11
11
  * @method
12
12
  * @name kucoin#fetchTime
13
13
  * @description fetches the current integer timestamp in milliseconds from the exchange server
14
- * @see https://docs.kucoin.com/#server-time
14
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/market-data/get-server-time
15
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/market-data/get-server-time
15
16
  * @param {object} [params] extra parameters specific to the exchange API endpoint
16
17
  * @returns {int} the current integer timestamp in milliseconds from the exchange server
17
18
  */
@@ -20,9 +21,11 @@ export default class kucoin extends Exchange {
20
21
  * @method
21
22
  * @name kucoin#fetchStatus
22
23
  * @description the latest known information on the availability of the exchange API
23
- * @see https://docs.kucoin.com/#service-status
24
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/market-data/get-service-status
25
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/market-data/get-service-status
24
26
  * @see https://www.kucoin.com/docs-new/rest/ua/get-service-status
25
27
  * @param {object} [params] extra parameters specific to the exchange API endpoint
28
+ * @param {string} [params.type] spot or swap
26
29
  * @param {boolean} [params.uta] set to true for the unified trading account (uta), defaults to false
27
30
  * @param {string} [params.tradeType] *uta only* set to SPOT or FUTURES
28
31
  * @returns {object} a [status structure]{@link https://docs.ccxt.com/?id=exchange-status-structure}
@@ -38,14 +41,16 @@ export default class kucoin extends Exchange {
38
41
  * @method
39
42
  * @name kucoin#fetchMarkets
40
43
  * @description retrieves data on all markets for kucoin
41
- * @see https://docs.kucoin.com/#get-symbols-list-deprecated
42
- * @see https://docs.kucoin.com/#get-all-tickers
44
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/market-data/get-all-symbols
45
+ * @see https://www.kucoin.com/docs-new/rest/ua/get-symbol
46
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/market-data/get-all-symbols
43
47
  * @param {object} [params] extra parameters specific to the exchange API endpoint
44
48
  * @param {boolean} [params.uta] set to true for the unified trading account (uta), defaults to false
45
49
  * @returns {object[]} an array of objects representing market data
46
50
  */
47
51
  fetchMarkets(params?: {}): Promise<Market[]>;
48
- fetchUtaMarkets(params?: {}): Promise<Market[]>;
52
+ fetchContractMarkets(params?: {}): Promise<Market[]>;
53
+ fetchUTAMarkets(params?: {}): Promise<Market[]>;
49
54
  /**
50
55
  * @method
51
56
  * @name kucoin#loadMigrationStatus
@@ -60,8 +65,10 @@ export default class kucoin extends Exchange {
60
65
  * @method
61
66
  * @name kucoin#fetchCurrencies
62
67
  * @description fetches all available currencies on an exchange
63
- * @see https://docs.kucoin.com/#get-currencies
68
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/market-data/get-all-currencies
69
+ * @see https://www.kucoin.com/docs-new/rest/ua/get-currencies
64
70
  * @param {object} params extra parameters specific to the exchange API endpoint
71
+ * @param {boolean} [params.uta] set to true for the unified trading account (uta), defaults to false
65
72
  * @returns {object} an associative dictionary of currencies
66
73
  */
67
74
  fetchCurrencies(params?: {}): Promise<Currencies>;
@@ -69,7 +76,7 @@ export default class kucoin extends Exchange {
69
76
  * @method
70
77
  * @name kucoin#fetchAccounts
71
78
  * @description fetch all the accounts associated with a profile
72
- * @see https://docs.kucoin.com/#list-accounts
79
+ * @see https://www.kucoin.com/docs-new/rest/account-info/account-funding/get-account-list-spot
73
80
  * @param {object} [params] extra parameters specific to the exchange API endpoint
74
81
  * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/?id=account-structure} indexed by the account type
75
82
  */
@@ -92,7 +99,7 @@ export default class kucoin extends Exchange {
92
99
  * @method
93
100
  * @name kucoin#fetchDepositWithdrawFee
94
101
  * @description fetch the fee for deposits and withdrawals
95
- * @see https://docs.kucoin.com/#get-withdrawal-quotas
102
+ * @see https://www.kucoin.com/docs-new/rest/account-info/withdrawals/get-withdrawal-quotas
96
103
  * @param {string} code unified currency code
97
104
  * @param {object} [params] extra parameters specific to the exchange API endpoint
98
105
  * @param {string} [params.network] The chain of currency. This only apply for multi-chain currency, and there is no need for single chain currency; you can query the chain through the response of the GET /api/v2/currencies/{currency} interface
@@ -101,25 +108,31 @@ export default class kucoin extends Exchange {
101
108
  fetchDepositWithdrawFee(code: string, params?: {}): Promise<any>;
102
109
  parseDepositWithdrawFee(fee: any, currency?: Currency): Dict;
103
110
  isFuturesMethod(methodName: any, params: any): boolean;
111
+ parseSpotOrUtaTicker(ticker: Dict, market?: Market): Ticker;
104
112
  parseTicker(ticker: Dict, market?: Market): Ticker;
113
+ parseContractTicker(ticker: Dict, market?: Market): Ticker;
114
+ typeToTradeType(type: Str): Str;
105
115
  /**
106
116
  * @method
107
117
  * @name kucoin#fetchTickers
108
118
  * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
109
- * @see https://docs.kucoin.com/#get-all-tickers
119
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/market-data/get-all-tickers
120
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/market-data/get-all-tickers
110
121
  * @see https://www.kucoin.com/docs-new/rest/ua/get-ticker
111
- * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
122
+ * @param {string[]|undefined} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
112
123
  * @param {object} [params] extra parameters specific to the exchange API endpoint
113
124
  * @param {boolean} [params.uta] set to true for the unified trading account (uta), defaults to false
114
- * @param {string} [params.tradeType] *uta only* set to SPOT or FUTURES
125
+ * @param {string} [params.type] spot or swap (default is spot)
126
+ * @param {string} [params.method] *swap only* the method to use, futuresPublicGetContractsActive or futuresPublicGetAllTickers (default is futuresPublicGetContractsActive)
115
127
  * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/?id=ticker-structure}
116
128
  */
117
129
  fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
130
+ fetchContractTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
118
131
  /**
119
132
  * @method
120
133
  * @name kucoin#fetchMarkPrices
121
134
  * @description fetches the mark price for multiple markets
122
- * @see https://www.kucoin.com/docs/rest/margin-trading/margin-info/get-all-margin-trading-pairs-mark-prices
135
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/market-data/get-mark-price-list
123
136
  * @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
124
137
  * @param {object} [params] extra parameters specific to the exchange API endpoint
125
138
  * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/?id=ticker-structure}
@@ -129,7 +142,8 @@ export default class kucoin extends Exchange {
129
142
  * @method
130
143
  * @name kucoin#fetchTicker
131
144
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
132
- * @see https://docs.kucoin.com/#get-24hr-stats
145
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/market-data/get-24hr-stats
146
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/market-data/get-ticker
133
147
  * @see https://www.kucoin.com/docs-new/rest/ua/get-ticker
134
148
  * @param {string} symbol unified symbol of the market to fetch the ticker for
135
149
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -141,7 +155,8 @@ export default class kucoin extends Exchange {
141
155
  * @method
142
156
  * @name kucoin#fetchMarkPrice
143
157
  * @description fetches the mark price for a specific market
144
- * @see https://www.kucoin.com/docs/rest/margin-trading/margin-info/get-mark-price
158
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/market-data/get-mark-price-detail
159
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/market-data/get-mark-price
145
160
  * @param {string} symbol unified symbol of the market to fetch the ticker for
146
161
  * @param {object} [params] extra parameters specific to the exchange API endpoint
147
162
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
@@ -152,7 +167,8 @@ export default class kucoin extends Exchange {
152
167
  * @method
153
168
  * @name kucoin#fetchOHLCV
154
169
  * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
155
- * @see https://docs.kucoin.com/#get-klines
170
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/market-data/get-klines
171
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/market-data/get-klines
156
172
  * @see https://www.kucoin.com/docs-new/rest/ua/get-klines
157
173
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
158
174
  * @param {string} timeframe the length of time each candle represents
@@ -164,10 +180,52 @@ export default class kucoin extends Exchange {
164
180
  * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
165
181
  */
166
182
  fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
183
+ /**
184
+ * @method
185
+ * @ignore
186
+ * @name kucoin#fetchUTAOHLCV
187
+ * @description helper method for fetchOHLCV
188
+ * @see https://www.kucoin.com/docs-new/rest/ua/get-klines
189
+ * @param {string} symbol unified symbol of the market to fetch OHLCV data for
190
+ * @param {string} timeframe the length of time each candle represents
191
+ * @param {int} [since] timestamp in ms of the earliest candle to fetch
192
+ * @param {int} [limit] the maximum amount of candles to fetch
193
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
194
+ * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
195
+ */
196
+ fetchUTAOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
197
+ /**
198
+ * @method
199
+ * @ignore
200
+ * @name kucoin#fetchSpotOHLCV
201
+ * @description helper method for fetchOHLCV
202
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/market-data/get-klines
203
+ * @param {string} symbol unified symbol of the market to fetch OHLCV data for
204
+ * @param {string} timeframe the length of time each candle represents
205
+ * @param {int} [since] timestamp in ms of the earliest candle to fetch
206
+ * @param {int} [limit] the maximum amount of candles to fetch
207
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
208
+ * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
209
+ */
210
+ fetchSpotOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
211
+ /**
212
+ * @method
213
+ * @ignore
214
+ * @name kucoin#fetchContractOHLCV
215
+ * @description helper method for fetchOHLCV
216
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/market-data/get-klines
217
+ * @param {string} symbol unified symbol of the market to fetch OHLCV data for
218
+ * @param {string} timeframe the length of time each candle represents
219
+ * @param {int} [since] timestamp in ms of the earliest candle to fetch
220
+ * @param {int} [limit] the maximum amount of candles to fetch
221
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
222
+ * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
223
+ */
224
+ fetchContractOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
167
225
  /**
168
226
  * @method
169
227
  * @name kucoin#createDepositAddress
170
- * @see https://www.kucoin.com/docs/rest/funding/deposit/create-deposit-address-v3-
228
+ * @see https://www.kucoin.com/docs-new/rest/account-info/deposit/add-deposit-address-v3
171
229
  * @description create a currency deposit address
172
230
  * @param {string} code unified currency code of the currency for the deposit address
173
231
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -179,18 +237,29 @@ export default class kucoin extends Exchange {
179
237
  * @method
180
238
  * @name kucoin#fetchDepositAddress
181
239
  * @description fetch the deposit address for a currency associated with this account
182
- * @see https://docs.kucoin.com/#get-deposit-addresses-v2
240
+ * @see https://www.kucoin.com/docs-new/rest/account-info/deposit/get-deposit-address-v3/en
183
241
  * @param {string} code unified currency code
184
242
  * @param {object} [params] extra parameters specific to the exchange API endpoint
185
243
  * @param {string} [params.network] the blockchain network name
244
+ * @param {string} [params.accountType] 'main' or 'contract' (default is 'main')
186
245
  * @returns {object} an [address structure]{@link https://docs.ccxt.com/?id=address-structure}
187
246
  */
188
247
  fetchDepositAddress(code: string, params?: {}): Promise<DepositAddress>;
248
+ /**
249
+ * @method
250
+ * @name kucoin#fetchContractDepositAddress
251
+ * @description fetch the deposit address for a currency associated with this account
252
+ * @see https://www.kucoin.com/docs/rest/funding/deposit/get-deposit-address
253
+ * @param {string} code unified currency code
254
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
255
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/?id=address-structure}
256
+ */
257
+ fetchContractDepositAddress(code: string, params?: {}): Promise<DepositAddress>;
189
258
  parseDepositAddress(depositAddress: any, currency?: Currency): DepositAddress;
190
259
  /**
191
260
  * @method
192
261
  * @name kucoin#fetchDepositAddressesByNetwork
193
- * @see https://docs.kucoin.com/#get-deposit-addresses-v2
262
+ * @see https://www.kucoin.com/docs-new/rest/account-info/deposit/get-deposit-address-v3/en
194
263
  * @description fetch the deposit address for a currency associated with this account
195
264
  * @param {string} code unified currency code
196
265
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -201,8 +270,9 @@ export default class kucoin extends Exchange {
201
270
  * @method
202
271
  * @name kucoin#fetchOrderBook
203
272
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
204
- * @see https://www.kucoin.com/docs/rest/spot-trading/market-data/get-part-order-book-aggregated-
205
- * @see https://www.kucoin.com/docs/rest/spot-trading/market-data/get-full-order-book-aggregated-
273
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/market-data/get-part-orderbook
274
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/market-data/get-full-orderbook
275
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/market-data/get-part-orderbook
206
276
  * @see https://www.kucoin.com/docs-new/rest/ua/get-orderbook
207
277
  * @param {string} symbol unified symbol of the market to fetch the order book for
208
278
  * @param {int} [limit] the maximum amount of order book entries to return
@@ -216,13 +286,37 @@ export default class kucoin extends Exchange {
216
286
  * @method
217
287
  * @name kucoin#createOrder
218
288
  * @description Create an order on the exchange
219
- * @see https://docs.kucoin.com/spot#place-a-new-order
220
- * @see https://docs.kucoin.com/spot#place-a-new-order-2
221
- * @see https://docs.kucoin.com/spot#place-a-margin-order
222
- * @see https://docs.kucoin.com/spot-hf/#place-hf-order
223
- * @see https://www.kucoin.com/docs/rest/spot-trading/orders/place-order-test
224
- * @see https://www.kucoin.com/docs/rest/margin-trading/orders/place-margin-order-test
225
- * @see https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/sync-place-hf-order
289
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/add-order
290
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/add-order-sync
291
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/add-order-test
292
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/add-stop-order
293
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/add-order
294
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/add-order-test
295
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/add-stop-order
296
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/add-order
297
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/add-order-test
298
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/add-take-profit-and-stop-loss-order
299
+ * @param {string} symbol Unified CCXT market symbol
300
+ * @param {string} type 'limit' or 'market'
301
+ * @param {string} side 'buy' or 'sell'
302
+ * @param {float} amount the amount of currency to trade
303
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
304
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
305
+ * Check createSpotOrder() and createContractOrder() for more details on the extra parameters that can be used in params
306
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
307
+ */
308
+ createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
309
+ /**
310
+ * @method
311
+ * @name kucoin#createSpotOrder
312
+ * @description helper method for creating spot orders
313
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/add-order
314
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/add-order-sync
315
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/add-order-test
316
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/add-stop-order
317
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/add-order
318
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/add-order-test
319
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/add-stop-order
226
320
  * @param {string} symbol Unified CCXT market symbol
227
321
  * @param {string} type 'limit' or 'market'
228
322
  * @param {string} side 'buy' or 'sell'
@@ -256,12 +350,54 @@ export default class kucoin extends Exchange {
256
350
  * @param {bool} [params.sync] set to true to use the hf sync call
257
351
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
258
352
  */
259
- createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
353
+ createSpotOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
354
+ createSpotOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): any;
355
+ marketOrderAmountToPrecision(symbol: string, amount: any): string;
356
+ /**
357
+ * @method
358
+ * @name kucoin#createContractOrder
359
+ * @description helper method for creating contract orders
360
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/add-order
361
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/add-order-test
362
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/add-take-profit-and-stop-loss-order
363
+ * @param {string} symbol Unified CCXT market symbol
364
+ * @param {string} type 'limit' or 'market'
365
+ * @param {string} side 'buy' or 'sell'
366
+ * @param {float} amount the amount of currency to trade
367
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
368
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
369
+ * @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered and the triggerPriceType
370
+ * @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered and the triggerPriceType
371
+ * @param {float} [params.triggerPrice] The price a trigger order is triggered at
372
+ * @param {float} [params.stopLossPrice] price to trigger stop-loss orders
373
+ * @param {float} [params.takeProfitPrice] price to trigger take-profit orders
374
+ * @param {bool} [params.reduceOnly] A mark to reduce the position size only. Set to false by default. Need to set the position size when reduceOnly is true.
375
+ * @param {string} [params.timeInForce] GTC, GTT, IOC, or FOK, default is GTC, limit orders only
376
+ * @param {string} [params.postOnly] Post only flag, invalid when timeInForce is IOC or FOK
377
+ * @param {float} [params.cost] the cost of the order in units of USDT
378
+ * @param {string} [params.marginMode] 'cross' or 'isolated', default is 'isolated'
379
+ * @param {bool} [params.hedged] *swap and future only* true for hedged mode, false for one way mode, default is false
380
+ * ----------------- Exchange Specific Parameters -----------------
381
+ * @param {float} [params.leverage] Leverage size of the order (mandatory param in request, default is 1)
382
+ * @param {string} [params.clientOid] client order id, defaults to uuid if not passed
383
+ * @param {string} [params.remark] remark for the order, length cannot exceed 100 utf8 characters
384
+ * @param {string} [params.stop] 'up' or 'down', the direction the triggerPrice is triggered from, requires triggerPrice. down: Triggers when the price reaches or goes below the triggerPrice. up: Triggers when the price reaches or goes above the triggerPrice.
385
+ * @param {string} [params.triggerPriceType] "last", "mark", "index" - defaults to "mark"
386
+ * @param {string} [params.stopPriceType] exchange-specific alternative for triggerPriceType: TP, IP or MP
387
+ * @param {bool} [params.closeOrder] set to true to close position
388
+ * @param {bool} [params.test] set to true to use the test order endpoint (does not submit order, use to validate params)
389
+ * @param {bool} [params.forceHold] A mark to forcely hold the funds for an order, even though it's an order to reduce the position size. This helps the order stay on the order book and not get canceled when the position size changes. Set to false by default.\
390
+ * @param {string} [params.positionSide] *swap and future only* hedged two-way position side, LONG or SHORT
391
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
392
+ */
393
+ createContractOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
394
+ createContractOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): any;
260
395
  /**
261
396
  * @method
262
397
  * @name kucoin#createMarketOrderWithCost
263
398
  * @description create a market order by providing the symbol, side and cost
264
- * @see https://www.kucoin.com/docs/rest/spot-trading/orders/place-order
399
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/add-order
400
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/add-order
265
401
  * @param {string} symbol unified symbol of the market to create an order in
266
402
  * @param {string} side 'buy' or 'sell'
267
403
  * @param {float} cost how much you want to trade in units of the quote currency
@@ -273,7 +409,8 @@ export default class kucoin extends Exchange {
273
409
  * @method
274
410
  * @name kucoin#createMarketBuyOrderWithCost
275
411
  * @description create a market buy order by providing the symbol and cost
276
- * @see https://www.kucoin.com/docs/rest/spot-trading/orders/place-order
412
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/add-order
413
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/add-order
277
414
  * @param {string} symbol unified symbol of the market to create an order in
278
415
  * @param {float} cost how much you want to trade in units of the quote currency
279
416
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -284,7 +421,8 @@ export default class kucoin extends Exchange {
284
421
  * @method
285
422
  * @name kucoin#createMarketSellOrderWithCost
286
423
  * @description create a market sell order by providing the symbol and cost
287
- * @see https://www.kucoin.com/docs/rest/spot-trading/orders/place-order
424
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/add-order
425
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/add-order
288
426
  * @param {string} symbol unified symbol of the market to create an order in
289
427
  * @param {float} cost how much you want to trade in units of the quote currency
290
428
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -295,23 +433,43 @@ export default class kucoin extends Exchange {
295
433
  * @method
296
434
  * @name kucoin#createOrders
297
435
  * @description create a list of trade orders
298
- * @see https://www.kucoin.com/docs/rest/spot-trading/orders/place-multiple-orders
299
- * @see https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/place-multiple-hf-orders
300
- * @see https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/sync-place-multiple-hf-orders
436
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/batch-add-orders
437
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/batch-add-orders-sync
438
+ * @param {Array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
439
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
440
+ * Check createSpotOrders() and createContractOrders() for more details on the extra parameters that can be used in params
441
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
442
+ */
443
+ createOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
444
+ /**
445
+ * @method
446
+ * @name kucoin#createSpotOrders
447
+ * @description helper method for creating spot orders in batch
448
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/batch-add-orders
449
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/batch-add-orders-sync
450
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/batch-add-orders
301
451
  * @param {Array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
302
452
  * @param {object} [params] extra parameters specific to the exchange API endpoint
303
453
  * @param {bool} [params.hf] false, // true for hf orders
304
454
  * @param {bool} [params.sync] false, // true to use the hf sync call
305
455
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
306
456
  */
307
- createOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
308
- marketOrderAmountToPrecision(symbol: string, amount: any): string;
309
- createOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): any;
457
+ createSpotOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
458
+ /**
459
+ * @method
460
+ * @name kucoin#createContractOrders
461
+ * @description helper method for creating contract orders in batch
462
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/batch-add-orders
463
+ * @param {Array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
464
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
465
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
466
+ */
467
+ createContractOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
310
468
  /**
311
469
  * @method
312
470
  * @name kucoin#editOrder
313
471
  * @description edit an order, kucoin currently only supports the modification of HF orders
314
- * @see https://docs.kucoin.com/spot-hf/#modify-order
472
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/modify-order
315
473
  * @param {string} id order id
316
474
  * @param {string} symbol unified symbol of the market to create an order in
317
475
  * @param {string} type not used
@@ -327,31 +485,91 @@ export default class kucoin extends Exchange {
327
485
  * @method
328
486
  * @name kucoin#cancelOrder
329
487
  * @description cancels an open order
330
- * @see https://docs.kucoin.com/spot#cancel-an-order
331
- * @see https://docs.kucoin.com/spot#cancel-an-order-2
332
- * @see https://docs.kucoin.com/spot#cancel-single-order-by-clientoid
333
- * @see https://docs.kucoin.com/spot#cancel-single-order-by-clientoid-2
334
- * @see https://docs.kucoin.com/spot-hf/#cancel-orders-by-orderid
335
- * @see https://docs.kucoin.com/spot-hf/#cancel-order-by-clientoid
336
- * @see https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/sync-cancel-hf-order-by-orderid
337
- * @see https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/sync-cancel-hf-order-by-clientoid
488
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-order-by-orderld
489
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-order-by-orderld-sync
490
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-order-by-clientoid
491
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-order-by-clientoid-sync
492
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-stop-order-by-clientoid
493
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-stop-order-by-orderld
494
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/cancel-order-by-orderld
495
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/cancel-order-by-clientoid
496
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/cancel-stop-order-by-orderld
497
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/cancel-stop-order-by-clientoid
498
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/cancel-order-by-orderld
499
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/cancel-order-by-clientoid
500
+ * @param {string} id order id
501
+ * @param {string} symbol unified symbol of the market the order was made in
502
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
503
+ * @param {string} [params.type] 'spot' or 'swap', used if symbol is not provided (default is 'spot')
504
+ * @param {string} [params.marginMode] *spot only* 'cross' or 'isolated'
505
+ * Check cancelSpotOrder() and cancelContractOrder() for more details on the extra parameters that can be used in params
506
+ * @returns Response from the exchange
507
+ */
508
+ cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
509
+ /**
510
+ * @method
511
+ * @name kucoin#cancelSpotOrder
512
+ * @description helper method for cancelling spot orders
513
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-order-by-orderld
514
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-order-by-orderld-sync
515
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-order-by-clientoid
516
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-order-by-clientoid-sync
517
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-stop-order-by-clientoid
518
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-stop-order-by-orderld
519
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/cancel-order-by-orderld
520
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/cancel-order-by-clientoid
521
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/cancel-stop-order-by-orderld
522
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/cancel-stop-order-by-clientoid
338
523
  * @param {string} id order id
339
524
  * @param {string} symbol unified symbol of the market the order was made in
340
525
  * @param {object} [params] extra parameters specific to the exchange API endpoint
341
526
  * @param {bool} [params.trigger] True if cancelling a stop order
342
527
  * @param {bool} [params.hf] false, // true for hf order
343
528
  * @param {bool} [params.sync] false, // true to use the hf sync call
344
- * @param {string} [params.marginMode] 'cross', // cross (cross mode) and isolated (isolated mode), set to cross by default, the isolated mode will be released soon, stay tuned
529
+ * @param {string} [params.marginMode] 'cross' or 'isolated'
345
530
  * @returns Response from the exchange
346
531
  */
347
- cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
532
+ cancelSpotOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
533
+ /**
534
+ * @method
535
+ * @name kucoin#cancelContractOrder
536
+ * @description helper method for cancelling contract orders
537
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/cancel-order-by-orderld
538
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/cancel-order-by-clientoid
539
+ * @param {string} id order id
540
+ * @param {string} symbol unified symbol of the market the order was made in
541
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
542
+ * @param {string} [params.clientOrderId] cancel order by client order id
543
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/?id=order-structure}
544
+ */
545
+ cancelContractOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
348
546
  /**
349
547
  * @method
350
548
  * @name kucoin#cancelAllOrders
351
549
  * @description cancel all open orders
352
- * @see https://docs.kucoin.com/spot#cancel-all-orders
353
- * @see https://docs.kucoin.com/spot#cancel-orders
354
- * @see https://docs.kucoin.com/spot-hf/#cancel-all-hf-orders-by-symbol
550
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-all-orders-by-symbol
551
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-all-orders
552
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/batch-cancel-stop-orders
553
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/cancel-all-orders-by-symbol
554
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/batch-cancel-stop-orders
555
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/cancel-all-orders
556
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/cancel-all-stop-orders
557
+ * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
558
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
559
+ * @param {string} [params.type] 'spot' or 'swap', used if symbol is not provided (default is 'spot')
560
+ * @param {string} [params.marginMode] *spot only* 'cross' or 'isolated'
561
+ * @returns Response from the exchange
562
+ */
563
+ cancelAllOrders(symbol?: Str, params?: {}): Promise<Order[]>;
564
+ /**
565
+ * @method
566
+ * @name kucoin#cancelAllSpotOrders
567
+ * @description helper method for cancelling all spot orders
568
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-all-orders-by-symbol
569
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/cancel-all-orders
570
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/batch-cancel-stop-orders
571
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/cancel-all-orders-by-symbol
572
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/batch-cancel-stop-orders
355
573
  * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
356
574
  * @param {object} [params] extra parameters specific to the exchange API endpoint
357
575
  * @param {bool} [params.trigger] *invalid for isolated margin* true if cancelling all stop orders
@@ -360,15 +578,50 @@ export default class kucoin extends Exchange {
360
578
  * @param {bool} [params.hf] false, // true for hf order
361
579
  * @returns Response from the exchange
362
580
  */
363
- cancelAllOrders(symbol?: Str, params?: {}): Promise<Order[]>;
581
+ cancelAllSpotOrders(symbol?: Str, params?: {}): Promise<Order[]>;
582
+ /**
583
+ * @method
584
+ * @name kucoin#cancelAllContractOrders
585
+ * @description helper method for cancelling all contract orders
586
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/cancel-all-orders
587
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/cancel-all-stop-orders
588
+ * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
589
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
590
+ * @param {object} [params.trigger] When true, all the trigger orders will be cancelled
591
+ * @returns Response from the exchange
592
+ */
593
+ cancelAllContractOrders(symbol?: Str, params?: {}): Promise<Order[]>;
364
594
  /**
365
595
  * @method
366
596
  * @name kucoin#fetchOrdersByStatus
367
- * @description fetch a list of orders
368
- * @see https://docs.kucoin.com/spot#list-orders
369
- * @see https://docs.kucoin.com/spot#list-stop-orders
370
- * @see https://docs.kucoin.com/spot-hf/#obtain-list-of-active-hf-orders
371
- * @see https://docs.kucoin.com/spot-hf/#obtain-list-of-filled-hf-orders
597
+ * @description fetches a list of orders placed on the exchange
598
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-open-orders
599
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-closed-orders
600
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-stop-orders-list
601
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-open-orders
602
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-closed-orders
603
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-stop-order-list
604
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/get-order-list
605
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/get-stop-order-list
606
+ * @param {string} status 'active' or 'closed', only 'active' is valid for stop orders
607
+ * @param {string} symbol unified symbol for the market to retrieve orders from
608
+ * @param {int} [since] timestamp in ms of the earliest order to retrieve
609
+ * @param {int} [limit] The maximum number of orders to retrieve
610
+ * @param {object} [params] exchange specific parameters
611
+ * Check fetchSpotOrdersByStatus() and fetchContractOrdersByStatus() for more details on the extra parameters that can be used in params
612
+ * @returns An [array of order structures]{@link https://docs.ccxt.com/?id=order-structure}
613
+ */
614
+ fetchOrdersByStatus(status: any, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
615
+ /**
616
+ * @method
617
+ * @name kucoin#fetchSpotOrdersByStatus
618
+ * @description fetch a list of spot orders
619
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-open-orders
620
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-closed-orders
621
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-stop-orders-list
622
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-open-orders
623
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-closed-orders
624
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-stop-order-list
372
625
  * @param {string} status *not used for stop orders* 'open' or 'closed'
373
626
  * @param {string} symbol unified market symbol
374
627
  * @param {int} [since] timestamp in ms of the earliest order
@@ -377,22 +630,44 @@ export default class kucoin extends Exchange {
377
630
  * @param {int} [params.until] end time in ms
378
631
  * @param {string} [params.side] buy or sell
379
632
  * @param {string} [params.type] limit, market, limit_stop or market_stop
380
- * @param {string} [params.tradeType] TRADE for spot trading, MARGIN_TRADE for Margin Trading
633
+ * @param {string} [params.tradeType] TRADE for spot trading, MARGIN_TRADE or MARGIN_ISOLATED_TRADE for Margin Trading
381
634
  * @param {int} [params.currentPage] *trigger orders only* current page
382
635
  * @param {string} [params.orderIds] *trigger orders only* comma separated order ID list
383
636
  * @param {bool} [params.trigger] True if fetching a trigger order
384
637
  * @param {bool} [params.hf] false, // true for hf order
638
+ * @param {string} [params.marginMode] 'cross' or 'isolated', only for margin orders
385
639
  * @returns An [array of order structures]{@link https://docs.ccxt.com/?id=order-structure}
386
640
  */
387
- fetchOrdersByStatus(status: any, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
641
+ fetchSpotOrdersByStatus(status: any, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
642
+ /**
643
+ * @method
644
+ * @name kucoin#fetchContractOrdersByStatus
645
+ * @description fetches a list of contract orders placed on the exchange
646
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/get-order-list
647
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/get-stop-order-list
648
+ * @param {string} status 'active' or 'closed', only 'active' is valid for stop orders
649
+ * @param {string} symbol unified symbol for the market to retrieve orders from
650
+ * @param {int} [since] timestamp in ms of the earliest order to retrieve
651
+ * @param {int} [limit] The maximum number of orders to retrieve
652
+ * @param {object} [params] exchange specific parameters
653
+ * @param {bool} [params.trigger] set to true to retrieve untriggered stop orders
654
+ * @param {int} [params.until] End time in ms
655
+ * @param {string} [params.side] buy or sell
656
+ * @param {string} [params.type] limit or market
657
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
658
+ * @returns An [array of order structures]{@link https://docs.ccxt.com/?id=order-structure}
659
+ */
660
+ fetchContractOrdersByStatus(status: any, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
388
661
  /**
389
662
  * @method
390
663
  * @name kucoin#fetchClosedOrders
391
664
  * @description fetches information on multiple closed orders made by the user
392
- * @see https://docs.kucoin.com/spot#list-orders
393
- * @see https://docs.kucoin.com/spot#list-stop-orders
394
- * @see https://docs.kucoin.com/spot-hf/#obtain-list-of-active-hf-orders
395
- * @see https://docs.kucoin.com/spot-hf/#obtain-list-of-filled-hf-orders
665
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-closed-orders
666
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-stop-orders-list
667
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/get-order-list
668
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/get-stop-order-list
669
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-open-orders
670
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-closed-orders
396
671
  * @param {string} symbol unified market symbol of the market orders were made in
397
672
  * @param {int} [since] the earliest time in ms to fetch orders for
398
673
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -411,10 +686,13 @@ export default class kucoin extends Exchange {
411
686
  * @method
412
687
  * @name kucoin#fetchOpenOrders
413
688
  * @description fetch all unfilled currently open orders
414
- * @see https://docs.kucoin.com/spot#list-orders
415
- * @see https://docs.kucoin.com/spot#list-stop-orders
416
- * @see https://docs.kucoin.com/spot-hf/#obtain-list-of-active-hf-orders
417
- * @see https://docs.kucoin.com/spot-hf/#obtain-list-of-filled-hf-orders
689
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-open-orders
690
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-stop-orders-list
691
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/get-order-list
692
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/get-stop-order-list
693
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-open-orders
694
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-closed-orders
695
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-stop-order-list
418
696
  * @param {string} symbol unified market symbol
419
697
  * @param {int} [since] the earliest time in ms to fetch open orders for
420
698
  * @param {int} [limit] the maximum number of open orders structures to retrieve
@@ -434,59 +712,132 @@ export default class kucoin extends Exchange {
434
712
  /**
435
713
  * @method
436
714
  * @name kucoin#fetchOrder
437
- * @description fetch an order
438
- * @see https://docs.kucoin.com/spot#get-an-order
439
- * @see https://docs.kucoin.com/spot#get-single-active-order-by-clientoid
440
- * @see https://docs.kucoin.com/spot#get-single-order-info
441
- * @see https://docs.kucoin.com/spot#get-single-order-by-clientoid
442
- * @see https://docs.kucoin.com/spot-hf/#details-of-a-single-hf-order
443
- * @see https://docs.kucoin.com/spot-hf/#obtain-details-of-a-single-hf-order-using-clientoid
715
+ * @description fetches information on an order made by the user
716
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-order-by-orderld
717
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-order-by-clientoid
718
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-stop-order-by-orderld
719
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/get-stop-order-by-clientoid
720
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-order-by-orderld
721
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-order-by-clientoid
722
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-stop-order-by-orderld
723
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-stop-order-by-clientoid
724
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/get-order-by-orderld
725
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/get-stop-order-by-clientoid
726
+ * @param {string} id order id
727
+ * @param {string} symbol unified symbol of the market the order was made in
728
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
729
+ * @param {string} [params.type] 'spot' or 'swap', used if symbol is not provided (default is 'spot')
730
+ * Check fetchSpotOrder() and fetchContractOrder() for more details on the extra parameters that can be used in params
731
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/?id=order-structure}
732
+ */
733
+ fetchOrder(id: Str, symbol?: Str, params?: {}): Promise<Order>;
734
+ /**
735
+ * @method
736
+ * @name kucoin#fetchSpotOrder
737
+ * @description fetch a spot order
738
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-order-by-orderld
739
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-order-by-clientoid
740
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-stop-order-by-orderld
741
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/get-stop-order-by-clientoid
742
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-order-by-orderld
743
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-order-by-clientoid
744
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-stop-order-by-orderld
745
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-stop-order-by-clientoid
444
746
  * @param {string} id Order id
445
747
  * @param {string} symbol not sent to exchange except for trigger orders with clientOid, but used internally by CCXT to filter
446
748
  * @param {object} [params] exchange specific parameters
447
749
  * @param {bool} [params.trigger] true if fetching a trigger order
448
750
  * @param {bool} [params.hf] false, // true for hf order
449
751
  * @param {bool} [params.clientOid] unique order id created by users to identify their orders
752
+ * @param {object} [params.marginMode] 'cross' or 'isolated'
450
753
  * @returns An [order structure]{@link https://docs.ccxt.com/?id=order-structure}
451
754
  */
452
- fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
755
+ fetchSpotOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
756
+ /**
757
+ * @method
758
+ * @name kucoin#fetchContractOrder
759
+ * @description fetc contract order
760
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/get-order-by-orderld
761
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/get-stop-order-by-clientoid
762
+ * @param {string} id order id
763
+ * @param {string} symbol unified symbol of the market the order was made in
764
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
765
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/?id=order-structure}
766
+ */
767
+ fetchContractOrder(id: Str, symbol?: Str, params?: {}): Promise<Order>;
453
768
  parseOrder(order: Dict, market?: Market): Order;
769
+ parseContractOrder(order: Dict, market?: Market): Order;
770
+ parseSpotOrder(order: Dict, market?: Market): Order;
454
771
  /**
455
772
  * @method
456
773
  * @name kucoin#fetchOrderTrades
457
774
  * @description fetch all the trades made from a single order
458
775
  * @see https://docs.kucoin.com/#list-fills
459
- * @see https://docs.kucoin.com/spot-hf/#transaction-details
776
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/get-trade-history
777
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-trade-history
460
778
  * @param {string} id order id
461
779
  * @param {string} symbol unified market symbol
462
780
  * @param {int} [since] the earliest time in ms to fetch trades for
463
781
  * @param {int} [limit] the maximum number of trades to retrieve
464
782
  * @param {object} [params] extra parameters specific to the exchange API endpoint
783
+ * @param {string} [params.type] 'spot' or 'swap', used if symbol is not provided (default is 'spot')
465
784
  * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=trade-structure}
466
785
  */
467
786
  fetchOrderTrades(id: string, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
468
787
  /**
469
788
  * @method
470
789
  * @name kucoin#fetchMyTrades
471
- * @see https://docs.kucoin.com/#list-fills
472
- * @see https://docs.kucoin.com/spot-hf/#transaction-details
790
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-trade-history
791
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-trade-history
473
792
  * @description fetch all trades made by the user
474
793
  * @param {string} symbol unified market symbol
475
794
  * @param {int} [since] the earliest time in ms to fetch trades for
476
795
  * @param {int} [limit] the maximum number of trades structures to retrieve
477
796
  * @param {object} [params] extra parameters specific to the exchange API endpoint
797
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
798
+ * @param {string} [params.type] 'spot' or 'swap', used if symbol is not provided (default is 'spot')
799
+ * Check fetchMySpotTrades() and fetchMyContractTrades() for more details on the extra parameters that can be used in params
800
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=trade-structure}
801
+ */
802
+ fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
803
+ /**
804
+ * @method
805
+ * @name kucoin#fetchMySpotTrades
806
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/orders/get-trade-history
807
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/orders/get-trade-history
808
+ * @description fetch all spot trades made by the user
809
+ * @param {string} symbol unified market symbol
810
+ * @param {int} [since] the earliest time in ms to fetch trades for
811
+ * @param {int} [limit] the maximum number of trades structures to retrieve
812
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
478
813
  * @param {int} [params.until] the latest time in ms to fetch entries for
479
814
  * @param {bool} [params.hf] false, // true for hf order
815
+ * @param {string} [params.marginMode] 'cross' or 'isolated', only for margin trades
480
816
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
481
817
  * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=trade-structure}
482
818
  */
483
- fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
819
+ fetchMySpotTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
820
+ /**
821
+ * @method
822
+ * @name kucoin#fetchMyContractTrades
823
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/get-trade-history
824
+ * @description fetch all contract trades made by the user
825
+ * @param {string} symbol unified market symbol
826
+ * @param {int} [since] the earliest time in ms to fetch trades for
827
+ * @param {int} [limit] the maximum number of trades structures to retrieve
828
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
829
+ * @param {int} [params.until] End time in ms
830
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
831
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=trade-structure}
832
+ */
833
+ fetchMyContractTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
484
834
  /**
485
835
  * @method
486
836
  * @name kucoin#fetchTrades
487
837
  * @description get the list of most recent trades for a particular symbol
488
- * @see https://www.kucoin.com/docs/rest/spot-trading/market-data/get-trade-histories
838
+ * @see https://www.kucoin.com/docs-new/rest/spot-trading/market-data/get-trade-history
489
839
  * @see https://www.kucoin.com/docs-new/rest/ua/get-trades
840
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/market-data/get-trade-history
490
841
  * @param {string} symbol unified symbol of the market to fetch trades for
491
842
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
492
843
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -496,11 +847,14 @@ export default class kucoin extends Exchange {
496
847
  */
497
848
  fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
498
849
  parseTrade(trade: Dict, market?: Market): Trade;
850
+ parseSpotOrUtaTrade(trade: Dict, market?: Market): Trade;
851
+ parseContractTrade(trade: Dict, market?: Market): Trade;
499
852
  /**
500
853
  * @method
501
854
  * @name kucoin#fetchTradingFee
502
855
  * @description fetch the trading fees for a market
503
- * @see https://www.kucoin.com/docs/rest/funding/trade-fee/trading-pair-actual-fee-spot-margin-trade_hf
856
+ * @see https://www.kucoin.com/docs-new/rest/account-info/trade-fee/get-actual-fee-spot-margin
857
+ * @see https://www.kucoin.com/docs-new/rest/account-info/trade-fee/get-actual-fee-futures
504
858
  * @param {string} symbol unified market symbol
505
859
  * @param {object} [params] extra parameters specific to the exchange API endpoint
506
860
  * @returns {object} a [fee structure]{@link https://docs.ccxt.com/?id=fee-structure}
@@ -510,7 +864,7 @@ export default class kucoin extends Exchange {
510
864
  * @method
511
865
  * @name kucoin#withdraw
512
866
  * @description make a withdrawal
513
- * @see https://www.kucoin.com/docs/rest/funding/withdrawals/apply-withdraw-v3-
867
+ * @see https://www.kucoin.com/docs-new/rest/account-info/withdrawals/withdraw-v3
514
868
  * @param {string} code unified currency code
515
869
  * @param {float} amount the amount to withdraw
516
870
  * @param {string} address the address to withdraw to
@@ -525,6 +879,7 @@ export default class kucoin extends Exchange {
525
879
  * @method
526
880
  * @name kucoin#fetchDeposits
527
881
  * @description fetch all deposits made to an account
882
+ * @see https://www.kucoin.com/docs-new/rest/account-info/deposit/get-deposit-history
528
883
  * @see https://www.kucoin.com/docs/rest/funding/deposit/get-deposit-list
529
884
  * @see https://www.kucoin.com/docs/rest/funding/deposit/get-v1-historical-deposits-list
530
885
  * @param {string} code unified currency code
@@ -532,14 +887,27 @@ export default class kucoin extends Exchange {
532
887
  * @param {int} [limit] the maximum number of deposits structures to retrieve
533
888
  * @param {object} [params] extra parameters specific to the exchange API endpoint
534
889
  * @param {int} [params.until] the latest time in ms to fetch entries for
535
- * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
890
+ * @param {boolean} [params.paginate] *main account only* default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
891
+ * @param {string} [params.accountType] 'main' or 'contract' (default is 'main')
536
892
  * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/?id=transaction-structure}
537
893
  */
538
894
  fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
895
+ /**
896
+ * @method
897
+ * @name kucoin#fetchContractDeposits
898
+ * @description helper method for fetching deposits for futures accounts
899
+ * @param {string} code unified currency code
900
+ * @param {int} [since] the earliest time in ms to fetch deposits for
901
+ * @param {int} [limit] the maximum number of deposits structures to retrieve
902
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
903
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/?id=transaction-structure}
904
+ */
905
+ fetchContractDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
539
906
  /**
540
907
  * @method
541
908
  * @name kucoin#fetchWithdrawals
542
909
  * @description fetch all withdrawals made from an account
910
+ * @see https://www.kucoin.com/docs-new/rest/account-info/withdrawals/get-withdrawal-history
543
911
  * @see https://www.kucoin.com/docs/rest/funding/withdrawals/get-withdrawals-list
544
912
  * @see https://www.kucoin.com/docs/rest/funding/withdrawals/get-v1-historical-withdrawals-list
545
913
  * @param {string} code unified currency code
@@ -547,18 +915,31 @@ export default class kucoin extends Exchange {
547
915
  * @param {int} [limit] the maximum number of withdrawals structures to retrieve
548
916
  * @param {object} [params] extra parameters specific to the exchange API endpoint
549
917
  * @param {int} [params.until] the latest time in ms to fetch entries for
550
- * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
918
+ * @param {boolean} [params.paginate] *main account only* default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
919
+ * @param {string} [params.accountType] 'main' or 'contract' (default is 'main')
551
920
  * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/?id=transaction-structure}
552
921
  */
553
922
  fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
923
+ /**
924
+ * @method
925
+ * @name kucoin#fetchContractWithdrawals
926
+ * @description helper method for fetching withdrawals for futures accounts
927
+ * @param {string} code unified currency code
928
+ * @param {int} [since] the earliest time in ms to fetch withdrawals for
929
+ * @param {int} [limit] the maximum number of withdrawals structures to retrieve
930
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
931
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/?id=transaction-structure}
932
+ */
933
+ fetchContractWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
554
934
  parseBalanceHelper(entry: any): import("./base/types.js").BalanceAccount;
555
935
  /**
556
936
  * @method
557
937
  * @name kucoin#fetchBalance
558
938
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
559
- * @see https://www.kucoin.com/docs/rest/account/basic-info/get-account-list-spot-margin-trade_hf
560
- * @see https://www.kucoin.com/docs/rest/funding/funding-overview/get-account-detail-margin
561
- * @see https://www.kucoin.com/docs/rest/funding/funding-overview/get-account-detail-isolated-margin
939
+ * @see https://www.kucoin.com/docs-new/rest/account-info/account-funding/get-account-detail-spot
940
+ * @see https://www.kucoin.com/docs-new/rest/account-info/account-funding/get-account-cross-margin
941
+ * @see https://www.kucoin.com/docs-new/rest/account-info/account-funding/get-account-isolated-margin
942
+ * @see https://www.kucoin.com/docs-new/rest/account-info/account-funding/get-account-futures
562
943
  * @param {object} [params] extra parameters specific to the exchange API endpoint
563
944
  * @param {object} [params.marginMode] 'cross' or 'isolated', margin type for fetching margin balance
564
945
  * @param {object} [params.type] extra parameters specific to the exchange API endpoint
@@ -566,6 +947,16 @@ export default class kucoin extends Exchange {
566
947
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/?id=balance-structure}
567
948
  */
568
949
  fetchBalance(params?: {}): Promise<Balances>;
950
+ /**
951
+ * @method
952
+ * @name kucoin#fetchContractBalance
953
+ * @description query for balance and get the amount of funds available for trading or funds locked in orders
954
+ * @see https://www.kucoin.com/docs-new/rest/account-info/account-funding/get-account-futures
955
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
956
+ * @param {object} [params.code] the unified currency code to fetch the balance for, if not provided, the default .options['fetchBalance']['code'] will be used
957
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/?id=balance-structure}
958
+ */
959
+ fetchContractBalance(params?: {}): Promise<Balances>;
569
960
  /**
570
961
  * @method
571
962
  * @name kucoin#transfer
@@ -586,18 +977,22 @@ export default class kucoin extends Exchange {
586
977
  parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
587
978
  parseTransferStatus(status: Str): Str;
588
979
  parseLedgerEntryType(type: any): string;
980
+ parseLedgerDirection(direction: any): string;
981
+ parseLedgerStatus(status: any): string;
589
982
  parseLedgerEntry(item: Dict, currency?: Currency): LedgerEntry;
590
983
  /**
591
984
  * @method
592
985
  * @name kucoin#fetchLedger
593
986
  * @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
594
- * @see https://www.kucoin.com/docs/rest/account/basic-info/get-account-ledgers-spot-margin
595
- * @see https://www.kucoin.com/docs/rest/account/basic-info/get-account-ledgers-trade_hf
596
- * @see https://www.kucoin.com/docs/rest/account/basic-info/get-account-ledgers-margin_hf
987
+ * @see https://www.kucoin.com/docs-new/rest/account-info/account-funding/get-account-ledgers-spot-margin
988
+ * @see https://www.kucoin.com/docs-new/rest/account-info/account-funding/get-account-ledgers-tradehf
989
+ * @see https://www.kucoin.com/docs-new/rest/account-info/account-funding/get-account-ledgers-marginhf
990
+ * @see https://www.kucoin.com/docs-new/rest/account-info/account-funding/get-account-ledgers-futures
597
991
  * @param {string} [code] unified currency code, default is undefined
598
992
  * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
599
993
  * @param {int} [limit] max number of ledger entries to return, default is undefined
600
994
  * @param {object} [params] extra parameters specific to the exchange API endpoint
995
+ * @param {object} [params.type] extra parameters specific to the exchange API endpoint
601
996
  * @param {boolean} [params.hf] default false, when true will fetch ledger entries for the high frequency trading account
602
997
  * @param {int} [params.until] the latest time in ms to fetch entries for
603
998
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
@@ -617,8 +1012,8 @@ export default class kucoin extends Exchange {
617
1012
  * @method
618
1013
  * @name kucoin#fetchBorrowInterest
619
1014
  * @description fetch the interest owed by the user for borrowing currency for margin trading
620
- * @see https://docs.kucoin.com/#get-repay-record
621
- * @see https://docs.kucoin.com/#query-isolated-margin-account-info
1015
+ * @see https://www.kucoin.com/docs-new/rest/account-info/account-funding/get-account-cross-margin
1016
+ * @see https://www.kucoin.com/docs-new/rest/account-info/account-funding/get-account-isolated-margin
622
1017
  * @param {string} [code] unified currency code
623
1018
  * @param {string} [symbol] unified market symbol, required for isolated margin
624
1019
  * @param {int} [since] the earliest time in ms to fetch borrrow interest for
@@ -633,7 +1028,7 @@ export default class kucoin extends Exchange {
633
1028
  * @method
634
1029
  * @name kucoin#fetchBorrowRateHistories
635
1030
  * @description retrieves a history of a multiple currencies borrow interest rate at specific time slots, returns all currencies if no symbols passed, default is undefined
636
- * @see https://www.kucoin.com/docs/rest/margin-trading/margin-trading-v3-/get-cross-isolated-margin-interest-records
1031
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/debit/get-interest-history
637
1032
  * @param {string[]|undefined} codes list of unified currency codes, default is undefined
638
1033
  * @param {int} [since] timestamp in ms of the earliest borrowRate, default is undefined
639
1034
  * @param {int} [limit] max number of borrow rate prices to return, default is undefined
@@ -647,7 +1042,7 @@ export default class kucoin extends Exchange {
647
1042
  * @method
648
1043
  * @name kucoin#fetchBorrowRateHistory
649
1044
  * @description retrieves a history of a currencies borrow interest rate at specific time slots
650
- * @see https://www.kucoin.com/docs/rest/margin-trading/margin-trading-v3-/get-cross-isolated-margin-interest-records
1045
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/debit/get-interest-history
651
1046
  * @param {string} code unified currency code
652
1047
  * @param {int} [since] timestamp for the earliest borrow rate
653
1048
  * @param {int} [limit] the maximum number of [borrow rate structures]{@link https://docs.ccxt.com/?id=borrow-rate-structure} to retrieve
@@ -662,7 +1057,7 @@ export default class kucoin extends Exchange {
662
1057
  * @method
663
1058
  * @name kucoin#borrowCrossMargin
664
1059
  * @description create a loan to borrow margin
665
- * @see https://docs.kucoin.com/#1-margin-borrowing
1060
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/debit/borrow
666
1061
  * @param {string} code unified currency code of the currency to borrow
667
1062
  * @param {float} amount the amount to borrow
668
1063
  * @param {object} [params] extra parameters specific to the exchange API endpoints
@@ -682,7 +1077,7 @@ export default class kucoin extends Exchange {
682
1077
  * @method
683
1078
  * @name kucoin#borrowIsolatedMargin
684
1079
  * @description create a loan to borrow margin
685
- * @see https://docs.kucoin.com/#1-margin-borrowing
1080
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/debit/borrow
686
1081
  * @param {string} symbol unified market symbol, required for isolated margin
687
1082
  * @param {string} code unified currency code of the currency to borrow
688
1083
  * @param {float} amount the amount to borrow
@@ -703,7 +1098,7 @@ export default class kucoin extends Exchange {
703
1098
  * @method
704
1099
  * @name kucoin#repayCrossMargin
705
1100
  * @description repay borrowed margin and interest
706
- * @see https://docs.kucoin.com/#2-repayment
1101
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/debit/repay
707
1102
  * @param {string} code unified currency code of the currency to repay
708
1103
  * @param {float} amount the amount to repay
709
1104
  * @param {object} [params] extra parameters specific to the exchange API endpoints
@@ -722,7 +1117,7 @@ export default class kucoin extends Exchange {
722
1117
  * @method
723
1118
  * @name kucoin#repayIsolatedMargin
724
1119
  * @description repay borrowed margin and interest
725
- * @see https://docs.kucoin.com/#2-repayment
1120
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/debit/repay
726
1121
  * @param {string} symbol unified market symbol
727
1122
  * @param {string} code unified currency code of the currency to repay
728
1123
  * @param {float} amount the amount to repay
@@ -757,38 +1152,75 @@ export default class kucoin extends Exchange {
757
1152
  * @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/?id=fee-structure}
758
1153
  */
759
1154
  fetchDepositWithdrawFees(codes?: Strings, params?: {}): Promise<any>;
1155
+ /**
1156
+ * @method
1157
+ * @name kucoin#fetchLeverage
1158
+ * @description fetch the set leverage for a market
1159
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/positions/get-cross-margin-leverage
1160
+ * @param {string} symbol unified market symbol
1161
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1162
+ * @returns {object} a [leverage structure]{@link https://docs.ccxt.com/?id=leverage-structure}
1163
+ */
1164
+ fetchLeverage(symbol: string, params?: {}): Promise<Leverage>;
760
1165
  /**
761
1166
  * @method
762
1167
  * @name kucoin#setLeverage
763
1168
  * @description set the level of leverage for a market
764
- * @see https://www.kucoin.com/docs/rest/margin-trading/margin-trading-v3-/modify-leverage-multiplier
1169
+ * @see https://www.kucoin.com/docs-new/rest/margin-trading/debit/modify-leverage
1170
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/positions/modify-cross-margin-leverage
765
1171
  * @param {int } [leverage] New leverage multiplier. Must be greater than 1 and up to two decimal places, and cannot be less than the user's current debt leverage or greater than the system's maximum leverage
766
1172
  * @param {string} [symbol] unified market symbol
767
1173
  * @param {object} [params] extra parameters specific to the exchange API endpoint
768
1174
  * @returns {object} response from the exchange
769
1175
  */
770
1176
  setLeverage(leverage: int, symbol?: Str, params?: {}): Promise<any>;
1177
+ /**
1178
+ * @method
1179
+ * @name kucoin#setContractLeverage
1180
+ * @description set the level of leverage for a market
1181
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/positions/modify-cross-margin-leverage
1182
+ * @param {float} leverage the rate of leverage
1183
+ * @param {string} symbol unified market symbol
1184
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1185
+ * @returns {object} response from the exchange
1186
+ */
1187
+ setContractLeverage(leverage: int, symbol?: Str, params?: {}): Promise<Leverage>;
1188
+ /**
1189
+ * @method
1190
+ * @name kucoin#fetchFundingInterval
1191
+ * @description fetch the current funding rate interval
1192
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/funding-fees/get-current-funding-rate
1193
+ * @param {string} symbol unified market symbol
1194
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1195
+ * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/?id=funding-rate-structure}
1196
+ */
1197
+ fetchFundingInterval(symbol: string, params?: {}): Promise<FundingRate>;
771
1198
  /**
772
1199
  * @method
773
1200
  * @name kucoin#fetchFundingRate
774
1201
  * @description fetch the current funding rate
775
1202
  * @see https://www.kucoin.com/docs-new/rest/ua/get-current-funding-rate
1203
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/funding-fees/get-current-funding-rate
776
1204
  * @param {string} symbol unified market symbol
777
1205
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1206
+ * @param {boolean} [params.uta] set to true for the unified trading account (uta)
778
1207
  * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/?id=funding-rate-structure}
779
1208
  */
780
1209
  fetchFundingRate(symbol: string, params?: {}): Promise<FundingRate>;
781
1210
  parseFundingRate(data: any, market?: Market): FundingRate;
1211
+ parseFundingInterval(interval: any): string;
782
1212
  /**
783
1213
  * @method
784
1214
  * @name kucoin#fetchFundingRateHistory
785
1215
  * @description fetches historical funding rate prices
1216
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/funding-fees/get-public-funding-history
786
1217
  * @see https://www.kucoin.com/docs-new/rest/ua/get-history-funding-rate
787
1218
  * @param {string} symbol unified symbol of the market to fetch the funding rate history for
788
1219
  * @param {int} [since] not used by kucuoinfutures
789
1220
  * @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/?id=funding-rate-history-structure} to fetch
790
1221
  * @param {object} [params] extra parameters specific to the exchange API endpoint
791
1222
  * @param {int} [params.until] end time in ms
1223
+ * @param {boolean} [params.uta] set to true for the unified trading account (uta), defaults to true
792
1224
  * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/?id=funding-rate-history-structure}
793
1225
  */
794
1226
  fetchFundingRateHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<import("./base/types.js").FundingRateHistory[]>;
@@ -799,6 +1231,159 @@ export default class kucoin extends Exchange {
799
1231
  timestamp: number;
800
1232
  datetime: string;
801
1233
  };
1234
+ /**
1235
+ * @method
1236
+ * @name kucoin#fetchFundingHistory
1237
+ * @description fetch the history of funding payments paid and received on this account
1238
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/funding-fees/get-private-funding-history
1239
+ * @param {string} symbol unified market symbol
1240
+ * @param {int} [since] the earliest time in ms to fetch funding history for
1241
+ * @param {int} [limit] the maximum number of funding history structures to retrieve
1242
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1243
+ * @returns {object} a [funding history structure]{@link https://docs.ccxt.com/?id=funding-history-structure}
1244
+ */
1245
+ fetchFundingHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<FundingHistory[]>;
1246
+ /**
1247
+ * @method
1248
+ * @name kucoin#fetchPosition
1249
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/positions/get-position-details
1250
+ * @description fetch data on an open position
1251
+ * @param {string} symbol unified market symbol of the market the position is held in
1252
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1253
+ * @returns {object} a [position structure]{@link https://docs.ccxt.com/?id=position-structure}
1254
+ */
1255
+ fetchPosition(symbol: string, params?: {}): Promise<Position>;
1256
+ /**
1257
+ * @method
1258
+ * @name kucoin#fetchPositions
1259
+ * @description fetch all open positions
1260
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/positions/get-position-list
1261
+ * @param {string[]|undefined} symbols list of unified market symbols
1262
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1263
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/?id=position-structure}
1264
+ */
1265
+ fetchPositions(symbols?: Strings, params?: {}): Promise<Position[]>;
1266
+ /**
1267
+ * @method
1268
+ * @name kucoin#fetchPositionsHistory
1269
+ * @description fetches historical positions
1270
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/positions/get-positions-history
1271
+ * @param {string[]} [symbols] list of unified market symbols
1272
+ * @param {int} [since] the earliest time in ms to fetch position history for
1273
+ * @param {int} [limit] the maximum number of entries to retrieve
1274
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1275
+ * @param {int} [params.until] closing end time
1276
+ * @param {int} [params.pageId] page id
1277
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/?id=position-structure}
1278
+ */
1279
+ fetchPositionsHistory(symbols?: Strings, since?: Int, limit?: Int, params?: {}): Promise<Position[]>;
1280
+ parsePosition(position: Dict, market?: Market): Position;
1281
+ /**
1282
+ * @method
1283
+ * @name kucoin#cancelOrders
1284
+ * @description cancel multiple orders for contract markets
1285
+ * @see https://www.kucoin.com/docs-new/3470241e0
1286
+ * @param {string[]} ids order ids
1287
+ * @param {string} symbol unified symbol of the market the order was made in
1288
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1289
+ * @param {string[]} [params.clientOrderIds] client order ids
1290
+ * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
1291
+ */
1292
+ cancelOrders(ids: string[], symbol?: Str, params?: {}): Promise<Order[]>;
1293
+ /**
1294
+ * @method
1295
+ * @name kucoin#addMargin
1296
+ * @description add margin
1297
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/positions/add-isolated-margin
1298
+ * @param {string} symbol unified market symbol
1299
+ * @param {float} amount amount of margin to add
1300
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1301
+ * @param {string} [params.positionSide] *required for hedged position* 'BOTH', 'LONG' or 'SHORT' (default is 'BOTH')
1302
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=margin-structure}
1303
+ */
1304
+ addMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
1305
+ parseMarginModification(info: any, market?: Market): MarginModification;
1306
+ /**
1307
+ * @method
1308
+ * @name kucoin#fetchMarginMode
1309
+ * @description fetches the margin mode of a trading pair
1310
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/positions/get-margin-mode
1311
+ * @param {string} symbol unified symbol of the market to fetch the margin mode for
1312
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1313
+ * @returns {object} a [margin mode structure]{@link https://docs.ccxt.com/?id=margin-mode-structure}
1314
+ */
1315
+ fetchMarginMode(symbol: string, params?: {}): Promise<MarginMode>;
1316
+ parseMarginMode(marginMode: Dict, market?: any): MarginMode;
1317
+ /**
1318
+ * @method
1319
+ * @name kucoin#setMarginMode
1320
+ * @description set margin mode to 'cross' or 'isolated'
1321
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/positions/switch-margin-mode
1322
+ * @param {string} marginMode 'cross' or 'isolated'
1323
+ * @param {string} symbol unified market symbol
1324
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1325
+ * @returns {object} response from the exchange
1326
+ */
1327
+ setMarginMode(marginMode: string, symbol?: Str, params?: {}): Promise<any>;
1328
+ /**
1329
+ * @method
1330
+ * @name kucoin#setPositionMode
1331
+ * @description set hedged to true or false for a market
1332
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/positions/switch-position-mode
1333
+ * @param {bool} hedged set to true to use two way position
1334
+ * @param {string} [symbol] not used by bybit setPositionMode ()
1335
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1336
+ * @returns {object} a response from the exchange
1337
+ */
1338
+ setPositionMode(hedged: boolean, symbol?: Str, params?: {}): Promise<any>;
1339
+ /**
1340
+ * @method
1341
+ * @name kucoin#fetchPositionMode
1342
+ * @description fetchs the position mode, hedged or one way
1343
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/positions/get-position-mode
1344
+ * @param {string} [symbol] unified symbol of the market to fetch the position mode for (not used in blofin fetchPositionMode)
1345
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1346
+ * @returns {object} an object detailing whether the market is in hedged or one-way mode
1347
+ */
1348
+ fetchPositionMode(symbol?: Str, params?: {}): Promise<{
1349
+ info: import("./base/types.js").Dictionary<any>;
1350
+ hedged: boolean;
1351
+ }>;
1352
+ /**
1353
+ * @method
1354
+ * @name kucoin#closePosition
1355
+ * @description closes open positions for a market
1356
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/add-order
1357
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/orders/add-order-test
1358
+ * @param {string} symbol Unified CCXT market symbol
1359
+ * @param {string} side not used by kucoin closePositions
1360
+ * @param {object} [params] extra parameters specific to the okx api endpoint
1361
+ * @param {string} [params.clientOrderId] client order id of the order
1362
+ * @returns {object[]} [A list of position structures]{@link https://docs.ccxt.com/?id=position-structure}
1363
+ */
1364
+ closePosition(symbol: string, side?: OrderSide, params?: {}): Promise<Order>;
1365
+ /**
1366
+ * @method
1367
+ * @name kucoin#fetchMarketLeverageTiers
1368
+ * @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
1369
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/positions/get-isolated-margin-risk-limit
1370
+ * @param {string} symbol unified market symbol
1371
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1372
+ * @param {boolean} [params.uta] set to true to fetch leverage tiers for unified trading account instead of futures account (default is false)
1373
+ * @returns {object} a [leverage tiers structure]{@link https://docs.ccxt.com/?id=leverage-tiers-structure}
1374
+ */
1375
+ fetchMarketLeverageTiers(symbol: string, params?: {}): Promise<LeverageTier[]>;
1376
+ parseMarketLeverageTiers(info: any, market?: Market): LeverageTier[];
1377
+ /**
1378
+ * @method
1379
+ * @name kucoin#fetchLeverageTiers
1380
+ * @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
1381
+ * @see https://www.kucoin.com/docs-new/rest/ua/get-position-tiers
1382
+ * @param {string[]} symbols list of unified market symbols
1383
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1384
+ * @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/?id=leverage-tiers-structure}, indexed by market symbols
1385
+ */
1386
+ fetchLeverageTiers(symbols?: Strings, params?: {}): Promise<LeverageTiers>;
802
1387
  sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
803
1388
  url: any;
804
1389
  method: string;
@@ -820,4 +1405,15 @@ export default class kucoin extends Exchange {
820
1405
  * @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/?id=transfer-structure}
821
1406
  */
822
1407
  fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntry[]>;
1408
+ /**
1409
+ * @method
1410
+ * @name kucoinfutures#fetchPositionsADLRank
1411
+ * @description fetches the auto deleveraging rank and risk percentage for a list of symbols
1412
+ * @see https://www.kucoin.com/docs-new/rest/futures-trading/positions/get-position-list
1413
+ * @param {string[]} [symbols] list of unified market symbols
1414
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1415
+ * @returns {object[]} an array of [auto de leverage structures]{@link https://docs.ccxt.com/?id=auto-de-leverage-structure}
1416
+ */
1417
+ fetchPositionsADLRank(symbols?: Strings, params?: {}): Promise<ADL[]>;
1418
+ parseADLRank(info: Dict, market?: Market): ADL;
823
1419
  }