ccxt 4.5.44 → 4.5.45

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 (81) 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 +36 -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/bitrue.js +1 -1
  9. package/dist/cjs/src/bitteam.js +1 -1
  10. package/dist/cjs/src/btcbox.js +1 -1
  11. package/dist/cjs/src/cex.js +1 -0
  12. package/dist/cjs/src/gate.js +227 -168
  13. package/dist/cjs/src/grvt.js +3 -2
  14. package/dist/cjs/src/hyperliquid.js +16 -5
  15. package/dist/cjs/src/kraken.js +2 -2
  16. package/dist/cjs/src/krakenfutures.js +1 -5
  17. package/dist/cjs/src/kucoin.js +4729 -970
  18. package/dist/cjs/src/kucoinfutures.js +14 -3434
  19. package/dist/cjs/src/lbank.js +1 -1
  20. package/dist/cjs/src/poloniex.js +1 -1
  21. package/dist/cjs/src/pro/gate.js +37 -1
  22. package/dist/cjs/src/pro/kucoin.js +819 -178
  23. package/dist/cjs/src/pro/kucoinfutures.js +95 -1261
  24. package/dist/cjs/src/pro/mexc.js +10 -5
  25. package/dist/cjs/src/pro/okx.js +84 -39
  26. package/js/ccxt.d.ts +2 -14
  27. package/js/ccxt.js +2 -10
  28. package/js/src/abstract/kucoin.d.ts +46 -3
  29. package/js/src/abstract/kucoinfutures.d.ts +27 -12
  30. package/js/src/base/Exchange.d.ts +12 -1
  31. package/js/src/base/Exchange.js +36 -3
  32. package/js/src/base/functions/encode.js +2 -2
  33. package/js/src/base/functions/generic.js +9 -3
  34. package/js/src/bitrue.js +1 -1
  35. package/js/src/bitteam.js +1 -1
  36. package/js/src/btcbox.js +1 -1
  37. package/js/src/cex.js +2 -1
  38. package/js/src/gate.d.ts +125 -119
  39. package/js/src/gate.js +227 -168
  40. package/js/src/grvt.js +3 -2
  41. package/js/src/hyperliquid.d.ts +3 -1
  42. package/js/src/hyperliquid.js +16 -5
  43. package/js/src/kraken.js +2 -2
  44. package/js/src/krakenfutures.js +1 -5
  45. package/js/src/kucoin.d.ts +696 -100
  46. package/js/src/kucoin.js +4730 -971
  47. package/js/src/kucoinfutures.d.ts +4 -522
  48. package/js/src/kucoinfutures.js +14 -3434
  49. package/js/src/lbank.js +1 -1
  50. package/js/src/poloniex.js +1 -1
  51. package/js/src/pro/gate.d.ts +30 -1
  52. package/js/src/pro/gate.js +37 -1
  53. package/js/src/pro/kucoin.d.ts +70 -30
  54. package/js/src/pro/kucoin.js +821 -180
  55. package/js/src/pro/kucoinfutures.d.ts +17 -195
  56. package/js/src/pro/kucoinfutures.js +96 -1262
  57. package/js/src/pro/mexc.js +10 -5
  58. package/js/src/pro/okx.d.ts +1 -0
  59. package/js/src/pro/okx.js +84 -39
  60. package/package.json +1 -1
  61. package/dist/cjs/src/abstract/alp.js +0 -11
  62. package/dist/cjs/src/abstract/defx.js +0 -11
  63. package/dist/cjs/src/abstract/timex.js +0 -11
  64. package/dist/cjs/src/alp.js +0 -1059
  65. package/dist/cjs/src/defx.js +0 -2142
  66. package/dist/cjs/src/pro/defx.js +0 -866
  67. package/dist/cjs/src/timex.js +0 -1793
  68. package/js/src/abstract/alp.d.ts +0 -21
  69. package/js/src/abstract/alp.js +0 -5
  70. package/js/src/abstract/defx.d.ts +0 -72
  71. package/js/src/abstract/defx.js +0 -5
  72. package/js/src/abstract/timex.d.ts +0 -65
  73. package/js/src/abstract/timex.js +0 -5
  74. package/js/src/alp.d.ts +0 -209
  75. package/js/src/alp.js +0 -1052
  76. package/js/src/defx.d.ts +0 -348
  77. package/js/src/defx.js +0 -2135
  78. package/js/src/pro/defx.d.ts +0 -236
  79. package/js/src/pro/defx.js +0 -859
  80. package/js/src/timex.d.ts +0 -247
  81. package/js/src/timex.js +0 -1786
@@ -1,112 +1,7 @@
1
- import kucoin from './abstract/kucoinfutures.js';
2
- import type { TransferEntry, Int, OrderSide, OrderType, OHLCV, Order, Trade, OrderRequest, FundingHistory, Balances, Str, Ticker, Tickers, OrderBook, Transaction, Strings, Market, Currency, Num, MarginModification, TradingFeeInterface, Dict, LeverageTier, MarginMode, Leverage, FundingRate, DepositAddress, Position, int, ADL } from './base/types.js';
3
- /**
4
- * @class kucoinfutures
5
- * @augments Exchange
6
- */
1
+ import kucoin from './kucoin.js';
2
+ import type { Strings, TransferEntry } from './base/types.js';
7
3
  export default class kucoinfutures extends kucoin {
8
4
  describe(): any;
9
- /**
10
- * @method
11
- * @name kucoinfutures#fetchStatus
12
- * @description the latest known information on the availability of the exchange API
13
- * @see https://www.kucoin.com/docs/rest/futures-trading/market-data/get-service-status
14
- * @param {object} [params] extra parameters specific to the exchange API endpoint
15
- * @returns {object} a [status structure]{@link https://docs.ccxt.com/?id=exchange-status-structure}
16
- */
17
- fetchStatus(params?: {}): Promise<{
18
- status: string;
19
- updated: any;
20
- eta: any;
21
- url: any;
22
- info: any;
23
- }>;
24
- /**
25
- * @method
26
- * @name kucoinfutures#fetchMarkets
27
- * @description retrieves data on all markets for kucoinfutures
28
- * @see https://www.kucoin.com/docs/rest/futures-trading/market-data/get-symbols-list
29
- * @param {object} [params] extra parameters specific to the exchange api endpoint
30
- * @returns {object[]} an array of objects representing market data
31
- */
32
- fetchMarkets(params?: {}): Promise<Market[]>;
33
- /**
34
- * @method
35
- * @name kucoinfutures#fetchTime
36
- * @description fetches the current integer timestamp in milliseconds from the exchange server
37
- * @see https://www.kucoin.com/docs/rest/futures-trading/market-data/get-server-time
38
- * @param {object} [params] extra parameters specific to the exchange API endpoint
39
- * @returns {int} the current integer timestamp in milliseconds from the exchange server
40
- */
41
- fetchTime(params?: {}): Promise<Int>;
42
- /**
43
- * @method
44
- * @name kucoinfutures#fetchOHLCV
45
- * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
46
- * @see https://www.kucoin.com/docs/rest/futures-trading/market-data/get-klines
47
- * @param {string} symbol unified symbol of the market to fetch OHLCV data for
48
- * @param {string} timeframe the length of time each candle represents
49
- * @param {int} [since] timestamp in ms of the earliest candle to fetch
50
- * @param {int} [limit] the maximum amount of candles to fetch
51
- * @param {object} [params] extra parameters specific to the exchange API endpoint
52
- * @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)
53
- * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
54
- */
55
- fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
56
- parseOHLCV(ohlcv: any, market?: Market): OHLCV;
57
- /**
58
- * @method
59
- * @name kucoinfutures#fetchDepositAddress
60
- * @description fetch the deposit address for a currency associated with this account
61
- * @see https://www.kucoin.com/docs/rest/funding/deposit/get-deposit-address
62
- * @param {string} code unified currency code
63
- * @param {object} [params] extra parameters specific to the exchange API endpoint
64
- * @returns {object} an [address structure]{@link https://docs.ccxt.com/?id=address-structure}
65
- */
66
- fetchDepositAddress(code: string, params?: {}): Promise<DepositAddress>;
67
- /**
68
- * @method
69
- * @name kucoinfutures#fetchOrderBook
70
- * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
71
- * @see https://www.kucoin.com/docs/rest/futures-trading/market-data/get-part-order-book-level-2
72
- * @param {string} symbol unified symbol of the market to fetch the order book for
73
- * @param {int} [limit] the maximum amount of order book entries to return
74
- * @param {object} [params] extra parameters specific to the exchange API endpoint
75
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
76
- */
77
- fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
78
- /**
79
- * @method
80
- * @name kucoinfutures#fetchTicker
81
- * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
82
- * @see https://www.kucoin.com/docs/rest/futures-trading/market-data/get-ticker
83
- * @param {string} symbol unified symbol of the market to fetch the ticker for
84
- * @param {object} [params] extra parameters specific to the exchange API endpoint
85
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
86
- */
87
- fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
88
- /**
89
- * @method
90
- * @name kucoinfutures#fetchMarkPrice
91
- * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
92
- * @see https://www.kucoin.com/docs/rest/futures-trading/market-data/get-current-mark-price
93
- * @param {string} symbol unified symbol of the market to fetch the ticker for
94
- * @param {object} [params] extra parameters specific to the exchange API endpoint
95
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
96
- */
97
- fetchMarkPrice(symbol: string, params?: {}): Promise<Ticker>;
98
- /**
99
- * @method
100
- * @name kucoinfutures#fetchTickers
101
- * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
102
- * @see https://www.kucoin.com/docs/rest/futures-trading/market-data/get-symbols-list
103
- * @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
104
- * @param {object} [params] extra parameters specific to the exchange API endpoint
105
- * @param {string} [params.method] the method to use, futuresPublicGetAllTickers or futuresPublicGetContractsActive
106
- * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/?id=ticker-structure}
107
- */
108
- fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
109
- parseTicker(ticker: Dict, market?: Market): Ticker;
110
5
  /**
111
6
  * @method
112
7
  * @name kucoinfutures#fetchBidsAsks
@@ -115,254 +10,11 @@ export default class kucoinfutures extends kucoin {
115
10
  * @param {object} [params] extra parameters specific to the exchange API endpoint
116
11
  * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/?id=ticker-structure}
117
12
  */
118
- fetchBidsAsks(symbols?: Strings, params?: {}): Promise<Tickers>;
119
- /**
120
- * @method
121
- * @name kucoinfutures#fetchFundingHistory
122
- * @description fetch the history of funding payments paid and received on this account
123
- * @see https://www.kucoin.com/docs/rest/futures-trading/funding-fees/get-funding-history
124
- * @param {string} symbol unified market symbol
125
- * @param {int} [since] the earliest time in ms to fetch funding history for
126
- * @param {int} [limit] the maximum number of funding history structures to retrieve
127
- * @param {object} [params] extra parameters specific to the exchange API endpoint
128
- * @returns {object} a [funding history structure]{@link https://docs.ccxt.com/?id=funding-history-structure}
129
- */
130
- fetchFundingHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<FundingHistory[]>;
131
- /**
132
- * @method
133
- * @name kucoinfutures#fetchPosition
134
- * @see https://docs.kucoin.com/futures/#get-position-details
135
- * @description fetch data on an open position
136
- * @param {string} symbol unified market symbol of the market the position is held in
137
- * @param {object} [params] extra parameters specific to the exchange API endpoint
138
- * @returns {object} a [position structure]{@link https://docs.ccxt.com/?id=position-structure}
139
- */
140
- fetchPosition(symbol: string, params?: {}): Promise<Position>;
141
- /**
142
- * @method
143
- * @name kucoinfutures#fetchPositions
144
- * @description fetch all open positions
145
- * @see https://docs.kucoin.com/futures/#get-position-list
146
- * @param {string[]|undefined} symbols list of unified market symbols
147
- * @param {object} [params] extra parameters specific to the exchange API endpoint
148
- * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/?id=position-structure}
149
- */
150
- fetchPositions(symbols?: Strings, params?: {}): Promise<Position[]>;
151
- /**
152
- * @method
153
- * @name kucoinfutures#fetchPositionsHistory
154
- * @description fetches historical positions
155
- * @see https://www.kucoin.com/docs/rest/futures-trading/positions/get-positions-history
156
- * @param {string[]} [symbols] list of unified market symbols
157
- * @param {int} [since] the earliest time in ms to fetch position history for
158
- * @param {int} [limit] the maximum number of entries to retrieve
159
- * @param {object} [params] extra parameters specific to the exchange API endpoint
160
- * @param {int} [params.until] closing end time
161
- * @param {int} [params.pageId] page id
162
- * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/?id=position-structure}
163
- */
164
- fetchPositionsHistory(symbols?: Strings, since?: Int, limit?: Int, params?: {}): Promise<Position[]>;
165
- parsePosition(position: Dict, market?: Market): Position;
166
- /**
167
- * @method
168
- * @name kucoinfutures#createOrder
169
- * @description Create an order on the exchange
170
- * @see https://www.kucoin.com/docs/rest/futures-trading/orders/place-order
171
- * @see https://www.kucoin.com/docs/rest/futures-trading/orders/place-take-profit-and-stop-loss-order#http-request
172
- * @param {string} symbol Unified CCXT market symbol
173
- * @param {string} type 'limit' or 'market'
174
- * @param {string} side 'buy' or 'sell'
175
- * @param {float} amount the amount of currency to trade
176
- * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
177
- * @param {object} [params] extra parameters specific to the exchange API endpoint
178
- * @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered and the triggerPriceType
179
- * @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered and the triggerPriceType
180
- * @param {float} [params.triggerPrice] The price a trigger order is triggered at
181
- * @param {float} [params.stopLossPrice] price to trigger stop-loss orders
182
- * @param {float} [params.takeProfitPrice] price to trigger take-profit orders
183
- * @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.
184
- * @param {string} [params.timeInForce] GTC, GTT, IOC, or FOK, default is GTC, limit orders only
185
- * @param {string} [params.postOnly] Post only flag, invalid when timeInForce is IOC or FOK
186
- * @param {float} [params.cost] the cost of the order in units of USDT
187
- * @param {string} [params.marginMode] 'cross' or 'isolated', default is 'isolated'
188
- * @param {bool} [params.hedged] *swap and future only* true for hedged mode, false for one way mode, default is false
189
- * ----------------- Exchange Specific Parameters -----------------
190
- * @param {float} [params.leverage] Leverage size of the order (mandatory param in request, default is 1)
191
- * @param {string} [params.clientOid] client order id, defaults to uuid if not passed
192
- * @param {string} [params.remark] remark for the order, length cannot exceed 100 utf8 characters
193
- * @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.
194
- * @param {string} [params.triggerPriceType] "last", "mark", "index" - defaults to "mark"
195
- * @param {string} [params.stopPriceType] exchange-specific alternative for triggerPriceType: TP, IP or MP
196
- * @param {bool} [params.closeOrder] set to true to close position
197
- * @param {bool} [params.test] set to true to use the test order endpoint (does not submit order, use to validate params)
198
- * @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.\
199
- * @param {string} [params.positionSide] *swap and future only* hedged two-way position side, LONG or SHORT
200
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
201
- */
202
- createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
203
- /**
204
- * @method
205
- * @name kucoinfutures#createOrders
206
- * @description create a list of trade orders
207
- * @see https://www.kucoin.com/docs/rest/futures-trading/orders/place-multiple-orders
208
- * @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
209
- * @param {object} [params] extra parameters specific to the exchange API endpoint
210
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
211
- */
212
- createOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
213
- createContractOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): any;
214
- /**
215
- * @method
216
- * @name kucoinfutures#cancelOrder
217
- * @description cancels an open order
218
- * @see https://www.kucoin.com/docs/rest/futures-trading/orders/cancel-futures-order-by-orderid
219
- * @param {string} id order id
220
- * @param {string} symbol unified symbol of the market the order was made in
221
- * @param {object} [params] extra parameters specific to the exchange API endpoint
222
- * @param {string} [params.clientOrderId] cancel order by client order id
223
- * @returns {object} An [order structure]{@link https://docs.ccxt.com/?id=order-structure}
224
- */
225
- cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
226
- /**
227
- * @method
228
- * @name kucoinfutures#cancelOrders
229
- * @description cancel multiple orders
230
- * @see https://www.kucoin.com/docs/rest/futures-trading/orders/batch-cancel-orders
231
- * @param {string[]} ids order ids
232
- * @param {string} symbol unified symbol of the market the order was made in
233
- * @param {object} [params] extra parameters specific to the exchange API endpoint
234
- * @param {string[]} [params.clientOrderIds] client order ids
235
- * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
236
- */
237
- cancelOrders(ids: string[], symbol?: Str, params?: {}): Promise<Order[]>;
238
- /**
239
- * @method
240
- * @name kucoinfutures#cancelAllOrders
241
- * @description cancel all open orders
242
- * @see https://www.kucoin.com/docs/rest/futures-trading/orders/cancel-multiple-futures-limit-orders
243
- * @see https://www.kucoin.com/docs/rest/futures-trading/orders/cancel-multiple-futures-stop-orders
244
- * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
245
- * @param {object} [params] extra parameters specific to the exchange API endpoint
246
- * @param {object} [params.trigger] When true, all the trigger orders will be cancelled
247
- * @returns Response from the exchange
248
- */
249
- cancelAllOrders(symbol?: Str, params?: {}): Promise<Order[]>;
250
- /**
251
- * @method
252
- * @name kucoinfutures#addMargin
253
- * @description add margin
254
- * @see https://www.kucoin.com/docs/rest/futures-trading/positions/add-margin-manually
255
- * @param {string} symbol unified market symbol
256
- * @param {float} amount amount of margin to add
257
- * @param {object} [params] extra parameters specific to the exchange API endpoint
258
- * @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=margin-structure}
259
- */
260
- addMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
261
- parseMarginModification(info: any, market?: Market): MarginModification;
262
- /**
263
- * @method
264
- * @name kucoinfutures#fetchOrdersByStatus
265
- * @description fetches a list of orders placed on the exchange
266
- * @see https://docs.kucoin.com/futures/#get-order-list
267
- * @see https://docs.kucoin.com/futures/#get-untriggered-stop-order-list
268
- * @param {string} status 'active' or 'closed', only 'active' is valid for stop orders
269
- * @param {string} symbol unified symbol for the market to retrieve orders from
270
- * @param {int} [since] timestamp in ms of the earliest order to retrieve
271
- * @param {int} [limit] The maximum number of orders to retrieve
272
- * @param {object} [params] exchange specific parameters
273
- * @param {bool} [params.trigger] set to true to retrieve untriggered stop orders
274
- * @param {int} [params.until] End time in ms
275
- * @param {string} [params.side] buy or sell
276
- * @param {string} [params.type] limit or market
277
- * @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)
278
- * @returns An [array of order structures]{@link https://docs.ccxt.com/?id=order-structure}
279
- */
280
- fetchOrdersByStatus(status: any, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
281
- /**
282
- * @method
283
- * @name kucoinfutures#fetchClosedOrders
284
- * @description fetches information on multiple closed orders made by the user
285
- * @see https://docs.kucoin.com/futures/#get-order-list
286
- * @param {string} symbol unified market symbol of the market orders were made in
287
- * @param {int} [since] the earliest time in ms to fetch orders for
288
- * @param {int} [limit] the maximum number of order structures to retrieve
289
- * @param {object} [params] extra parameters specific to the exchange API endpoint
290
- * @param {int} [params.until] end time in ms
291
- * @param {string} [params.side] buy or sell
292
- * @param {string} [params.type] limit, or market
293
- * @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)
294
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
295
- */
296
- fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
297
- /**
298
- * @method
299
- * @name kucoinfutures#fetchOpenOrders
300
- * @description fetches information on multiple open orders made by the user
301
- * @see https://docs.kucoin.com/futures/#get-order-list
302
- * @see https://docs.kucoin.com/futures/#get-untriggered-stop-order-list
303
- * @param {string} symbol unified market symbol of the market orders were made in
304
- * @param {int} [since] the earliest time in ms to fetch orders for
305
- * @param {int} [limit] the maximum number of order structures to retrieve
306
- * @param {object} [params] extra parameters specific to the exchange API endpoint
307
- * @param {int} [params.until] end time in ms
308
- * @param {string} [params.side] buy or sell
309
- * @param {string} [params.type] limit, or market
310
- * @param {boolean} [params.trigger] set to true to retrieve untriggered stop orders
311
- * @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)
312
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
313
- */
314
- fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
315
- /**
316
- * @method
317
- * @name kucoinfutures#fetchOrder
318
- * @description fetches information on an order made by the user
319
- * @see https://docs.kucoin.com/futures/#get-details-of-a-single-order
320
- * @param {string} id order id
321
- * @param {string} symbol unified symbol of the market the order was made in
322
- * @param {object} [params] extra parameters specific to the exchange API endpoint
323
- * @returns {object} An [order structure]{@link https://docs.ccxt.com/?id=order-structure}
324
- */
325
- fetchOrder(id: Str, symbol?: Str, params?: {}): Promise<Order>;
326
- parseOrder(order: Dict, market?: Market): Order;
327
- /**
328
- * @method
329
- * @name kucoinfutures#fetchFundingRate
330
- * @description fetch the current funding rate
331
- * @see https://www.kucoin.com/docs/rest/futures-trading/funding-fees/get-current-funding-rate
332
- * @param {string} symbol unified market symbol
333
- * @param {object} [params] extra parameters specific to the exchange API endpoint
334
- * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/?id=funding-rate-structure}
335
- */
336
- fetchFundingRate(symbol: string, params?: {}): Promise<FundingRate>;
337
- /**
338
- * @method
339
- * @name kucoinfutures#fetchFundingInterval
340
- * @description fetch the current funding rate interval
341
- * @see https://www.kucoin.com/docs/rest/futures-trading/funding-fees/get-current-funding-rate
342
- * @param {string} symbol unified market symbol
343
- * @param {object} [params] extra parameters specific to the exchange API endpoint
344
- * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/?id=funding-rate-structure}
345
- */
346
- fetchFundingInterval(symbol: string, params?: {}): Promise<FundingRate>;
347
- parseFundingRate(data: any, market?: Market): FundingRate;
348
- parseFundingInterval(interval: any): string;
349
- parseBalance(response: any): Balances;
350
- /**
351
- * @method
352
- * @name kucoinfutures#fetchBalance
353
- * @description query for balance and get the amount of funds available for trading or funds locked in orders
354
- * @see https://www.kucoin.com/docs/rest/funding/funding-overview/get-account-detail-futures
355
- * @param {object} [params] extra parameters specific to the exchange API endpoint
356
- * @param {object} [params.code] the unified currency code to fetch the balance for, if not provided, the default .options['fetchBalance']['code'] will be used
357
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/?id=balance-structure}
358
- */
359
- fetchBalance(params?: {}): Promise<Balances>;
13
+ fetchBidsAsks(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Tickers>;
360
14
  /**
361
15
  * @method
362
16
  * @name kucoinfutures#transfer
363
17
  * @description transfer currency internally between wallets on the same account
364
- * @see https://www.kucoin.com/docs/rest/funding/transfer/transfer-to-main-or-trade-account
365
- * @see https://www.kucoin.com/docs/rest/funding/transfer/transfer-to-futures-account
366
18
  * @param {string} code unified currency code
367
19
  * @param {float} amount amount to transfer
368
20
  * @param {string} fromAccount account to transfer from
@@ -371,175 +23,5 @@ export default class kucoinfutures extends kucoin {
371
23
  * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/?id=transfer-structure}
372
24
  */
373
25
  transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
374
- parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
375
- parseTransferStatus(status: Str): Str;
376
- parseTransferType(transferType: Str): Str;
377
- /**
378
- * @method
379
- * @name kucoinfutures#fetchMyTrades
380
- * @see https://docs.kucoin.com/futures/#get-fills
381
- * @description fetch all trades made by the user
382
- * @param {string} symbol unified market symbol
383
- * @param {int} [since] the earliest time in ms to fetch trades for
384
- * @param {int} [limit] the maximum number of trades structures to retrieve
385
- * @param {object} [params] extra parameters specific to the exchange API endpoint
386
- * @param {int} [params.until] End time in ms
387
- * @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)
388
- * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=trade-structure}
389
- */
390
- fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
391
- /**
392
- * @method
393
- * @name kucoinfutures#fetchTrades
394
- * @description get the list of most recent trades for a particular symbol
395
- * @see https://www.kucoin.com/docs/rest/futures-trading/market-data/get-transaction-history
396
- * @param {string} symbol unified symbol of the market to fetch trades for
397
- * @param {int} [since] timestamp in ms of the earliest trade to fetch
398
- * @param {int} [limit] the maximum amount of trades to fetch
399
- * @param {object} [params] extra parameters specific to the exchange API endpoint
400
- * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=public-trades}
401
- */
402
- fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
403
- parseTrade(trade: Dict, market?: Market): Trade;
404
- /**
405
- * @method
406
- * @name kucoinfutures#fetchDeposits
407
- * @description fetch all deposits made to an account
408
- * @param {string} code unified currency code
409
- * @param {int} [since] the earliest time in ms to fetch deposits for
410
- * @param {int} [limit] the maximum number of deposits structures to retrieve
411
- * @param {object} [params] extra parameters specific to the exchange API endpoint
412
- * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/?id=transaction-structure}
413
- */
414
- fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
415
- /**
416
- * @method
417
- * @name kucoinfutures#fetchWithdrawals
418
- * @description fetch all withdrawals made from an account
419
- * @param {string} code unified currency code
420
- * @param {int} [since] the earliest time in ms to fetch withdrawals for
421
- * @param {int} [limit] the maximum number of withdrawals structures to retrieve
422
- * @param {object} [params] extra parameters specific to the exchange API endpoint
423
- * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/?id=transaction-structure}
424
- */
425
- fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
426
- /**
427
- * @method
428
- * @name kucoinfutures#fetchMarketLeverageTiers
429
- * @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
430
- * @see https://www.kucoin.com/docs/rest/futures-trading/risk-limit/get-futures-risk-limit-level
431
- * @param {string} symbol unified market symbol
432
- * @param {object} [params] extra parameters specific to the exchange API endpoint
433
- * @returns {object} a [leverage tiers structure]{@link https://docs.ccxt.com/?id=leverage-tiers-structure}
434
- */
435
- fetchMarketLeverageTiers(symbol: string, params?: {}): Promise<LeverageTier[]>;
436
- parseMarketLeverageTiers(info: any, market?: Market): LeverageTier[];
437
- /**
438
- * @method
439
- * @name kucoinfutures#fetchFundingRateHistory
440
- * @see https://www.kucoin.com/docs/rest/futures-trading/funding-fees/get-public-funding-history#request-url
441
- * @description fetches historical funding rate prices
442
- * @param {string} symbol unified symbol of the market to fetch the funding rate history for
443
- * @param {int} [since] not used by kucuoinfutures
444
- * @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/?id=funding-rate-history-structure} to fetch
445
- * @param {object} [params] extra parameters specific to the exchange API endpoint
446
- * @param {int} [params.until] end time in ms
447
- * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/?id=funding-rate-history-structure}
448
- */
449
- fetchFundingRateHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<import("./base/types.js").FundingRateHistory[]>;
450
- parseFundingRateHistory(info: any, market?: Market): {
451
- info: any;
452
- symbol: string;
453
- fundingRate: number;
454
- timestamp: number;
455
- datetime: string;
456
- };
457
- /**
458
- * @method
459
- * @name kucoinfutures#closePosition
460
- * @description closes open positions for a market
461
- * @see https://www.kucoin.com/docs/rest/futures-trading/orders/place-order
462
- * @param {string} symbol Unified CCXT market symbol
463
- * @param {string} side not used by kucoinfutures closePositions
464
- * @param {object} [params] extra parameters specific to the okx api endpoint
465
- * @param {string} [params.clientOrderId] client order id of the order
466
- * @returns {object[]} [A list of position structures]{@link https://docs.ccxt.com/?id=position-structure}
467
- */
468
- closePosition(symbol: string, side?: OrderSide, params?: {}): Promise<Order>;
469
- /**
470
- * @method
471
- * @name kucoinfutures#fetchTradingFee
472
- * @description fetch the trading fees for a market
473
- * @see https://www.kucoin.com/docs/rest/funding/trade-fee/trading-pair-actual-fee-futures
474
- * @param {string} symbol unified market symbol
475
- * @param {object} [params] extra parameters specific to the exchange API endpoint
476
- * @returns {object} a [fee structure]{@link https://docs.ccxt.com/?id=fee-structure}
477
- */
478
- fetchTradingFee(symbol: string, params?: {}): Promise<TradingFeeInterface>;
479
- /**
480
- * @method
481
- * @name kucoinfutures#fetchMarginMode
482
- * @description fetches the margin mode of a trading pair
483
- * @see https://www.kucoin.com/docs/rest/futures-trading/positions/get-margin-mode
484
- * @param {string} symbol unified symbol of the market to fetch the margin mode for
485
- * @param {object} [params] extra parameters specific to the exchange API endpoint
486
- * @returns {object} a [margin mode structure]{@link https://docs.ccxt.com/?id=margin-mode-structure}
487
- */
488
- fetchMarginMode(symbol: string, params?: {}): Promise<MarginMode>;
489
- parseMarginMode(marginMode: Dict, market?: any): MarginMode;
490
- /**
491
- * @method
492
- * @name kucoinfutures#setMarginMode
493
- * @description set margin mode to 'cross' or 'isolated'
494
- * @see https://www.kucoin.com/docs/rest/futures-trading/positions/modify-margin-mode
495
- * @param {string} marginMode 'cross' or 'isolated'
496
- * @param {string} symbol unified market symbol
497
- * @param {object} [params] extra parameters specific to the exchange API endpoint
498
- * @returns {object} response from the exchange
499
- */
500
- setMarginMode(marginMode: string, symbol?: Str, params?: {}): Promise<any>;
501
- /**
502
- * @method
503
- * @name kucoinfutures#setPositionMode
504
- * @description set hedged to true or false for a market
505
- * @see https://www.kucoin.com/docs-new/3475097e0
506
- * @param {bool} hedged set to true to use two way position
507
- * @param {string} [symbol] not used by bybit setPositionMode ()
508
- * @param {object} [params] extra parameters specific to the exchange API endpoint
509
- * @returns {object} a response from the exchange
510
- */
511
- setPositionMode(hedged: boolean, symbol?: Str, params?: {}): Promise<any>;
512
- /**
513
- * @method
514
- * @name kucoinfutures#fetchLeverage
515
- * @description fetch the set leverage for a market
516
- * @see https://www.kucoin.com/docs/rest/futures-trading/positions/get-cross-margin-leverage
517
- * @param {string} symbol unified market symbol
518
- * @param {object} [params] extra parameters specific to the exchange API endpoint
519
- * @returns {object} a [leverage structure]{@link https://docs.ccxt.com/?id=leverage-structure}
520
- */
521
- fetchLeverage(symbol: string, params?: {}): Promise<Leverage>;
522
- /**
523
- * @method
524
- * @name kucoinfutures#setLeverage
525
- * @description set the level of leverage for a market
526
- * @see https://www.kucoin.com/docs/rest/futures-trading/positions/modify-cross-margin-leverage
527
- * @param {float} leverage the rate of leverage
528
- * @param {string} symbol unified market symbol
529
- * @param {object} [params] extra parameters specific to the exchange API endpoint
530
- * @returns {object} response from the exchange
531
- */
532
- setLeverage(leverage: int, symbol?: Str, params?: {}): Promise<Leverage>;
533
- parseLeverage(leverage: Dict, market?: Market): Leverage;
534
- /**
535
- * @method
536
- * @name kucoinfutures#fetchPositionsADLRank
537
- * @description fetches the auto deleveraging rank and risk percentage for a list of symbols
538
- * @see https://www.kucoin.com/docs-new/rest/futures-trading/positions/get-position-list
539
- * @param {string[]} [symbols] list of unified market symbols
540
- * @param {object} [params] extra parameters specific to the exchange API endpoint
541
- * @returns {object[]} an array of [auto de leverage structures]{@link https://docs.ccxt.com/?id=auto-de-leverage-structure}
542
- */
543
- fetchPositionsADLRank(symbols?: Strings, params?: {}): Promise<ADL[]>;
544
- parseADLRank(info: Dict, market?: Market): ADL;
26
+ parseTransferType(transferType: any): string;
545
27
  }