ccxt 4.5.45 → 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 (52) hide show
  1. package/README.md +3 -3
  2. package/dist/ccxt.browser.min.js +2 -2
  3. package/dist/cjs/ccxt.js +1 -1
  4. package/dist/cjs/src/base/Exchange.js +3 -0
  5. package/dist/cjs/src/binance.js +11 -2
  6. package/dist/cjs/src/bitget.js +3 -1
  7. package/dist/cjs/src/bitmart.js +144 -21
  8. package/dist/cjs/src/bybit.js +58 -56
  9. package/dist/cjs/src/bydfi.js +102 -100
  10. package/dist/cjs/src/gate.js +37 -2
  11. package/dist/cjs/src/kraken.js +2 -0
  12. package/dist/cjs/src/kucoin.js +4 -2
  13. package/dist/cjs/src/okx.js +75 -57
  14. package/dist/cjs/src/paradex.js +2 -6
  15. package/dist/cjs/src/pro/bydfi.js +19 -19
  16. package/dist/cjs/src/pro/gate.js +79 -54
  17. package/dist/cjs/src/pro/grvt.js +5 -3
  18. package/dist/cjs/src/pro/htx.js +4 -4
  19. package/dist/cjs/src/pro/okx.js +1 -1
  20. package/index.d.cts +2 -0
  21. package/js/ccxt.d.ts +1 -1
  22. package/js/ccxt.js +1 -1
  23. package/js/src/abstract/bitmart.d.ts +7 -0
  24. package/js/src/abstract/bydfi.d.ts +29 -29
  25. package/js/src/abstract/kraken.d.ts +1 -0
  26. package/js/src/abstract/kucoin.d.ts +1 -0
  27. package/js/src/abstract/kucoinfutures.d.ts +1 -0
  28. package/js/src/base/Exchange.d.ts +1 -0
  29. package/js/src/base/Exchange.js +3 -0
  30. package/js/src/binance.js +11 -2
  31. package/js/src/bitget.js +3 -1
  32. package/js/src/bitmart.d.ts +18 -4
  33. package/js/src/bitmart.js +144 -21
  34. package/js/src/bybit.d.ts +1 -0
  35. package/js/src/bybit.js +58 -56
  36. package/js/src/bydfi.d.ts +31 -31
  37. package/js/src/bydfi.js +102 -100
  38. package/js/src/gate.js +37 -2
  39. package/js/src/kraken.js +2 -0
  40. package/js/src/kucoin.js +4 -2
  41. package/js/src/okx.d.ts +1 -0
  42. package/js/src/okx.js +75 -57
  43. package/js/src/paradex.d.ts +0 -1
  44. package/js/src/paradex.js +2 -6
  45. package/js/src/pro/bydfi.d.ts +18 -18
  46. package/js/src/pro/bydfi.js +19 -19
  47. package/js/src/pro/gate.d.ts +2 -2
  48. package/js/src/pro/gate.js +79 -54
  49. package/js/src/pro/grvt.js +5 -3
  50. package/js/src/pro/htx.js +4 -4
  51. package/js/src/pro/okx.js +1 -1
  52. package/package.json +2 -2
package/js/src/bydfi.d.ts CHANGED
@@ -10,7 +10,7 @@ export default class bydfi extends Exchange {
10
10
  * @method
11
11
  * @name bydfi#fetchMarkets
12
12
  * @description retrieves data on all markets for bydfi
13
- * @see https://developers.bydfi.com/en/swap/market#fetching-trading-rules-and-pairs
13
+ * @see https://developers.bydfi.com/en/futures/market#fetching-trading-rules-and-pairs
14
14
  * @param {object} [params] extra parameters specific to the exchange API endpoint
15
15
  * @returns {object[]} an array of objects representing market data
16
16
  */
@@ -20,7 +20,7 @@ export default class bydfi extends Exchange {
20
20
  * @method
21
21
  * @name bydfi#fetchOrderBook
22
22
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
23
- * @see https://developers.bydfi.com/en/swap/market#depth-information
23
+ * @see https://developers.bydfi.com/en/futures/market#depth-information
24
24
  * @param {string} symbol unified symbol of the market to fetch the order book for
25
25
  * @param {int} [limit] the maximum amount of order book entries to return, could be 5, 10, 20, 50, 100, 500 or 1000 (default 500)
26
26
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -33,7 +33,7 @@ export default class bydfi extends Exchange {
33
33
  * @method
34
34
  * @name bydfi#fetchTrades
35
35
  * @description get the list of most recent trades for a particular symbol
36
- * @see https://developers.bydfi.com/en/swap/market#recent-trades
36
+ * @see https://developers.bydfi.com/en/futures/market#recent-trades
37
37
  * @param {string} symbol unified symbol of the market to fetch trades for
38
38
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
39
39
  * @param {int} [limit] the maximum amount of trades to fetch (default 500, max 1000)
@@ -46,7 +46,7 @@ export default class bydfi extends Exchange {
46
46
  * @method
47
47
  * @name bydfi#fetchMyTrades
48
48
  * @description fetch all trades made by the user
49
- * @see https://developers.bydfi.com/en/swap/trade#historical-trades-query
49
+ * @see https://developers.bydfi.com/en/futures/trade#historical-trades-query
50
50
  * @param {string} symbol unified market symbol
51
51
  * @param {int} [since] the earliest time in ms to fetch trades for
52
52
  * @param {int} [limit] the maximum number of trades structures to retrieve
@@ -64,7 +64,7 @@ export default class bydfi extends Exchange {
64
64
  * @method
65
65
  * @name bydfi#fetchOHLCV
66
66
  * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
67
- * @see https://developers.bydfi.com/en/swap/market#candlestick-data
67
+ * @see https://developers.bydfi.com/en/futures/market#candlestick-data
68
68
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
69
69
  * @param {string} timeframe the length of time each candle represents
70
70
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
@@ -78,7 +78,7 @@ export default class bydfi extends Exchange {
78
78
  /**
79
79
  * @method
80
80
  * @name bydfi#fetchTickers
81
- * @see https://developers.bydfi.com/en/swap/market#24hr-price-change-statistics
81
+ * @see https://developers.bydfi.com/en/futures/market#24hr-price-change-statistics
82
82
  * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
83
83
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
84
84
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -89,7 +89,7 @@ export default class bydfi extends Exchange {
89
89
  * @method
90
90
  * @name bydfi#fetchTicker
91
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://developers.bydfi.com/en/swap/market#24hr-price-change-statistics
92
+ * @see https://developers.bydfi.com/en/futures/market#24hr-price-change-statistics
93
93
  * @param {string} symbol unified symbol of the market to fetch the ticker for
94
94
  * @param {object} [params] extra parameters specific to the exchange API endpoint
95
95
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
@@ -100,7 +100,7 @@ export default class bydfi extends Exchange {
100
100
  * @method
101
101
  * @name bydfi#fetchFundingRate
102
102
  * @description fetch the current funding rate
103
- * @see https://developers.bydfi.com/en/swap/market#recent-funding-rate
103
+ * @see https://developers.bydfi.com/en/futures/market#recent-funding-rate
104
104
  * @param {string} symbol unified market symbol
105
105
  * @param {object} [params] extra parameters specific to the exchange API endpoint
106
106
  * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/?id=funding-rate-structure}
@@ -111,7 +111,7 @@ export default class bydfi extends Exchange {
111
111
  * @method
112
112
  * @name bydfi#fetchFundingRateHistory
113
113
  * @description fetches historical funding rate prices
114
- * @see https://developers.bydfi.com/en/swap/market#historical-funding-rates
114
+ * @see https://developers.bydfi.com/en/futures/market#historical-funding-rates
115
115
  * @param {string} symbol unified symbol of the market to fetch the funding rate history for
116
116
  * @param {int} [since] timestamp in ms of the earliest funding rate to fetch
117
117
  * @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/?id=funding-rate-history-structure} to fetch
@@ -131,7 +131,7 @@ export default class bydfi extends Exchange {
131
131
  * @method
132
132
  * @name bydfi#createOrder
133
133
  * @description create a trade order
134
- * @see https://developers.bydfi.com/en/swap/trade#placing-an-order
134
+ * @see https://developers.bydfi.com/en/futures/trade#placing-an-order
135
135
  * @param {string} symbol unified symbol of the market to create an order in
136
136
  * @param {string} type 'market' or 'limit'
137
137
  * @param {string} side 'buy' or 'sell'
@@ -159,7 +159,7 @@ export default class bydfi extends Exchange {
159
159
  * @method
160
160
  * @name bydfi#createOrders
161
161
  * @description create a list of trade orders
162
- * @see https://developers.bydfi.com/en/swap/trade#batch-order-placement
162
+ * @see https://developers.bydfi.com/en/futures/trade#batch-order-placement
163
163
  * @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
164
164
  * @param {object} [params] extra parameters specific to the exchange API endpoint
165
165
  * @param {string} [params.wallet] The unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract
@@ -170,7 +170,7 @@ export default class bydfi extends Exchange {
170
170
  * @method
171
171
  * @name bydfi#editOrder
172
172
  * @description edit a trade order
173
- * @see https://developers.bydfi.com/en/swap/trade#order-modification
173
+ * @see https://developers.bydfi.com/en/futures/trade#order-modification
174
174
  * @param {string} id order id (mandatory if params.clientOrderId is not provided)
175
175
  * @param {string} [symbol] unified symbol of the market to create an order in
176
176
  * @param {string} [type] not used by bydfi editOrder
@@ -187,7 +187,7 @@ export default class bydfi extends Exchange {
187
187
  * @method
188
188
  * @name bydfi#editOrders
189
189
  * @description edit a list of trade orders
190
- * @see https://developers.bydfi.com/en/swap/trade#batch-order-modification
190
+ * @see https://developers.bydfi.com/en/futures/trade#batch-order-modification
191
191
  * @param {Array} orders list of orders to edit, each object should contain the parameters required by editOrder, namely id, symbol, amount, price and params
192
192
  * @param {object} [params] extra parameters specific to the exchange API endpoint
193
193
  * @param {string} [params.wallet] The unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract
@@ -199,7 +199,7 @@ export default class bydfi extends Exchange {
199
199
  * @method
200
200
  * @name bydfi#cancelAllOrders
201
201
  * @description cancel all open orders in a market
202
- * @see https://developers.bydfi.com/en/swap/trade#complete-order-cancellation
202
+ * @see https://developers.bydfi.com/en/futures/trade#complete-order-cancellation
203
203
  * @param {string} symbol unified market symbol of the market to cancel orders in
204
204
  * @param {object} [params] extra parameters specific to the exchange API endpoint
205
205
  * @param {string} [params.wallet] The unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract
@@ -210,8 +210,8 @@ export default class bydfi extends Exchange {
210
210
  * @method
211
211
  * @name bydfi#fetchOpenOrders
212
212
  * @description fetch all unfilled currently open orders
213
- * @see https://developers.bydfi.com/en/swap/trade#pending-order-query
214
- * @see https://developers.bydfi.com/en/swap/trade#planned-order-query
213
+ * @see https://developers.bydfi.com/en/futures/trade#pending-order-query
214
+ * @see https://developers.bydfi.com/en/futures/trade#planned-order-query
215
215
  * @param {string} symbol unified market symbol of the market orders were made in
216
216
  * @param {int} [since] the earliest time in ms to fetch orders for
217
217
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -225,8 +225,8 @@ export default class bydfi extends Exchange {
225
225
  * @method
226
226
  * @name bydfi#fetchOpenOrder
227
227
  * @description fetch an open order by the id
228
- * @see https://developers.bydfi.com/en/swap/trade#pending-order-query
229
- * @see https://developers.bydfi.com/en/swap/trade#planned-order-query
228
+ * @see https://developers.bydfi.com/en/futures/trade#pending-order-query
229
+ * @see https://developers.bydfi.com/en/futures/trade#planned-order-query
230
230
  * @param {string} id order id (mandatory if params.clientOrderId is not provided)
231
231
  * @param {string} symbol unified market symbol
232
232
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -240,7 +240,7 @@ export default class bydfi extends Exchange {
240
240
  * @method
241
241
  * @name bydfi#fetchCanceledAndClosedOrders
242
242
  * @description fetches information on multiple canceled and closed orders made by the user
243
- * @see https://developers.bydfi.com/en/swap/trade#historical-orders-query
243
+ * @see https://developers.bydfi.com/en/futures/trade#historical-orders-query
244
244
  * @param {string} symbol unified market symbol of the closed orders
245
245
  * @param {int} [since] timestamp in ms of the earliest order
246
246
  * @param {int} [limit] the max number of closed orders to return
@@ -261,7 +261,7 @@ export default class bydfi extends Exchange {
261
261
  * @method
262
262
  * @name bydfi#setLeverage
263
263
  * @description set the level of leverage for a market
264
- * @see https://developers.bydfi.com/en/swap/trade#set-leverage-for-single-trading-pair
264
+ * @see https://developers.bydfi.com/en/futures/trade#set-leverage-for-single-trading-pair
265
265
  * @param {float} leverage the rate of leverage
266
266
  * @param {string} symbol unified market symbol
267
267
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -273,7 +273,7 @@ export default class bydfi extends Exchange {
273
273
  * @method
274
274
  * @name bydfi#fetchLeverage
275
275
  * @description fetch the set leverage for a market
276
- * @see https://developers.bydfi.com/en/swap/trade#get-leverage-for-single-trading-pair
276
+ * @see https://developers.bydfi.com/en/futures/trade#get-leverage-for-single-trading-pair
277
277
  * @param {string} symbol unified market symbol
278
278
  * @param {object} [params] extra parameters specific to the exchange API endpoint
279
279
  * @param {string} [params.wallet] The unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract
@@ -285,7 +285,7 @@ export default class bydfi extends Exchange {
285
285
  * @method
286
286
  * @name bydfi#fetchPositions
287
287
  * @description fetch all open positions
288
- * @see https://developers.bydfi.com/en/swap/trade#positions-query
288
+ * @see https://developers.bydfi.com/en/futures/trade#positions-query
289
289
  * @param {string[]} [symbols] list of unified market symbols
290
290
  * @param {object} [params] extra parameters specific to the exchange API endpoint
291
291
  * @param {string} [params.contractType] FUTURE or DELIVERY, default is FUTURE
@@ -297,7 +297,7 @@ export default class bydfi extends Exchange {
297
297
  * @method
298
298
  * @name bydfi#fetchPositionsForSymbol
299
299
  * @description fetch open positions for a single market
300
- * @see https://developers.bydfi.com/en/swap/trade#positions-query
300
+ * @see https://developers.bydfi.com/en/futures/trade#positions-query
301
301
  * @description fetch all open positions for specific symbol
302
302
  * @param {string} symbol unified market symbol
303
303
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -311,7 +311,7 @@ export default class bydfi extends Exchange {
311
311
  * @method
312
312
  * @name bydfi#fetchPositionHistory
313
313
  * @description fetches historical positions
314
- * @see https://developers.bydfi.com/en/swap/trade#query-historical-position-profit-and-loss-records
314
+ * @see https://developers.bydfi.com/en/futures/trade#query-historical-position-profit-and-loss-records
315
315
  * @param {string} symbol a unified market symbol
316
316
  * @param {int} [since] timestamp in ms of the earliest position to fetch , params["until"] - since <= 7 days
317
317
  * @param {int} [limit] the maximum amount of records to fetch (default 500, max 500)
@@ -326,7 +326,7 @@ export default class bydfi extends Exchange {
326
326
  * @method
327
327
  * @name bydfi#fetchPositionsHistory
328
328
  * @description fetches historical positions
329
- * @see https://developers.bydfi.com/en/swap/trade#query-historical-position-profit-and-loss-records
329
+ * @see https://developers.bydfi.com/en/futures/trade#query-historical-position-profit-and-loss-records
330
330
  * @param {string[]} symbols a list of unified market symbols
331
331
  * @param {int} [since] timestamp in ms of the earliest position to fetch , params["until"] - since <= 7 days
332
332
  * @param {int} [limit] the maximum amount of records to fetch (default 500, max 500)
@@ -341,7 +341,7 @@ export default class bydfi extends Exchange {
341
341
  * @method
342
342
  * @name bydfi#fetchMarginMode
343
343
  * @description fetches the margin mode of a trading pair
344
- * @see https://developers.bydfi.com/en/swap/user#margin-mode-query
344
+ * @see https://developers.bydfi.com/en/futures/user#margin-mode-query
345
345
  * @param {string} symbol unified symbol of the market to fetch the margin mode for
346
346
  * @param {object} [params] extra parameters specific to the exchange API endpoint
347
347
  * @param {string} [params.contractType] FUTURE or DELIVERY, default is FUTURE
@@ -354,7 +354,7 @@ export default class bydfi extends Exchange {
354
354
  * @method
355
355
  * @name bydfi#setMarginMode
356
356
  * @description set margin mode to 'cross' or 'isolated'
357
- * @see https://developers.bydfi.com/en/swap/user#change-margin-type-cross-margin
357
+ * @see https://developers.bydfi.com/en/futures/user#change-margin-type-cross-margin
358
358
  * @param {string} marginMode 'cross' or 'isolated'
359
359
  * @param {string} symbol unified market symbol
360
360
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -367,7 +367,7 @@ export default class bydfi extends Exchange {
367
367
  * @method
368
368
  * @name bydfi#setPositionMode
369
369
  * @description set hedged to true or false for a market, hedged for bydfi is set identically for all markets with same settle currency
370
- * @see https://developers.bydfi.com/en/swap/user#change-position-mode-dual
370
+ * @see https://developers.bydfi.com/en/futures/user#change-position-mode-dual
371
371
  * @param {bool} hedged set to true to use dualSidePosition
372
372
  * @param {string} [symbol] not used by bydfi setPositionMode ()
373
373
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -381,7 +381,7 @@ export default class bydfi extends Exchange {
381
381
  * @method
382
382
  * @name bydfi#fetchPositionMode
383
383
  * @description fetchs the position mode, hedged or one way, hedged for bydfi is set identically for all markets with same settle currency
384
- * @see https://developers.bydfi.com/en/swap/user#get-position-mode
384
+ * @see https://developers.bydfi.com/en/futures/user#get-position-mode
385
385
  * @param {string} [symbol] unified symbol of the market to fetch the order book for
386
386
  * @param {object} [params] extra parameters specific to the exchange API endpoint
387
387
  * @param {string} [params.contractType] FUTURE or DELIVERY, default is FUTURE
@@ -398,9 +398,9 @@ export default class bydfi extends Exchange {
398
398
  * @name bydfi#fetchBalance
399
399
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
400
400
  * @see https://developers.bydfi.com/en/account#asset-inquiry
401
- * @see https://developers.bydfi.com/en/swap/user#asset-query
401
+ * @see https://developers.bydfi.com/en/futures/user#asset-query
402
402
  * @param {object} [params] extra parameters specific to the exchange API endpoint
403
- * @param {string} [params.accountType] the type of account to fetch the balance for, either 'spot' or 'swap' or 'funding' (default is 'spot')
403
+ * @param {string} [params.account] the type of account to fetch the balance for, either 'SPOT' or 'UMFUTURE' or 'CMFUTURE' or 'COPY' or 'GRID' or 'FUNDING' (default is 'SPOT')
404
404
  * @param {string} [params.wallet] *swap only* The unique code of a sub-wallet. W001 is the default wallet and the main wallet code of the contract
405
405
  * @param {string} [params.asset] currency id for the balance to fetch
406
406
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/?id=balance-structure}