ccxt 4.5.0 → 4.5.1

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 +4 -4
  2. package/dist/ccxt.browser.min.js +5 -5
  3. package/dist/cjs/ccxt.js +1 -1
  4. package/dist/cjs/src/base/Exchange.js +13 -0
  5. package/dist/cjs/src/coinbase.js +46 -34
  6. package/dist/cjs/src/gate.js +39 -18
  7. package/dist/cjs/src/gemini.js +1 -1
  8. package/dist/cjs/src/hibachi.js +1 -1
  9. package/dist/cjs/src/hyperliquid.js +16 -2
  10. package/dist/cjs/src/kraken.js +1 -12
  11. package/dist/cjs/src/krakenfutures.js +25 -25
  12. package/dist/cjs/src/mexc.js +2 -1
  13. package/dist/cjs/src/pro/bitget.js +193 -51
  14. package/dist/cjs/src/pro/bybit.js +8 -15
  15. package/dist/cjs/src/pro/gate.js +6 -1
  16. package/dist/cjs/src/pro/hyperliquid.js +4 -1
  17. package/dist/cjs/src/pro/kraken.js +1 -0
  18. package/dist/cjs/src/pro/lbank.js +55 -1
  19. package/dist/cjs/src/pro/mexc.js +1 -1
  20. package/dist/cjs/src/timex.js +35 -0
  21. package/dist/cjs/src/tradeogre.js +32 -0
  22. package/dist/cjs/src/wavesexchange.js +33 -0
  23. package/js/ccxt.d.ts +1 -1
  24. package/js/ccxt.js +1 -1
  25. package/js/src/base/Exchange.d.ts +1 -0
  26. package/js/src/base/Exchange.js +14 -1
  27. package/js/src/coinbase.js +46 -34
  28. package/js/src/gate.d.ts +2 -1
  29. package/js/src/gate.js +39 -18
  30. package/js/src/gemini.js +1 -1
  31. package/js/src/hibachi.js +1 -1
  32. package/js/src/hyperliquid.d.ts +1 -0
  33. package/js/src/hyperliquid.js +16 -2
  34. package/js/src/kraken.d.ts +0 -1
  35. package/js/src/kraken.js +1 -12
  36. package/js/src/krakenfutures.d.ts +24 -24
  37. package/js/src/krakenfutures.js +25 -25
  38. package/js/src/mexc.js +2 -1
  39. package/js/src/pro/bitget.d.ts +8 -2
  40. package/js/src/pro/bitget.js +193 -51
  41. package/js/src/pro/bybit.js +8 -15
  42. package/js/src/pro/gate.d.ts +5 -0
  43. package/js/src/pro/gate.js +6 -1
  44. package/js/src/pro/hyperliquid.js +4 -1
  45. package/js/src/pro/kraken.js +1 -0
  46. package/js/src/pro/lbank.d.ts +11 -1
  47. package/js/src/pro/lbank.js +55 -1
  48. package/js/src/pro/mexc.js +1 -1
  49. package/js/src/timex.js +35 -0
  50. package/js/src/tradeogre.js +32 -0
  51. package/js/src/wavesexchange.js +33 -0
  52. package/package.json +1 -1
package/js/src/kraken.js CHANGED
@@ -236,6 +236,7 @@ export default class kraken extends Exchange {
236
236
  'UST': 'USTC',
237
237
  'XBT': 'BTC',
238
238
  'XDG': 'DOGE',
239
+ 'FEE': 'KFEE',
239
240
  },
240
241
  'options': {
241
242
  'timeDifference': 0,
@@ -706,18 +707,6 @@ export default class kraken extends Exchange {
706
707
  this.options['marketsByAltname'] = this.indexBy(result, 'altname');
707
708
  return result;
708
709
  }
709
- safeCurrency(currencyId, currency = undefined) {
710
- if (currencyId !== undefined) {
711
- if (currencyId.length > 3) {
712
- if ((currencyId.indexOf('X') === 0) || (currencyId.indexOf('Z') === 0)) {
713
- if (!(currencyId.indexOf('.') > 0) && (currencyId !== 'ZEUS')) {
714
- currencyId = currencyId.slice(1);
715
- }
716
- }
717
- }
718
- }
719
- return super.safeCurrency(currencyId, currency);
720
- }
721
710
  /**
722
711
  * @method
723
712
  * @name kraken#fetchStatus
@@ -10,7 +10,7 @@ export default class krakenfutures extends Exchange {
10
10
  * @method
11
11
  * @name krakenfutures#fetchMarkets
12
12
  * @description Fetches the available trading markets from the exchange, Multi-collateral markets are returned as linear markets, but can be settled in multiple currencies
13
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-instrument-details-get-instruments
13
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/get-instruments
14
14
  * @param {object} [params] exchange specific params
15
15
  * @returns An array of market structures
16
16
  */
@@ -18,7 +18,7 @@ export default class krakenfutures extends Exchange {
18
18
  /**
19
19
  * @method
20
20
  * @name krakenfutures#fetchOrderBook
21
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-market-data-get-orderbook
21
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/get-orderbook
22
22
  * @description Fetches a list of open orders in a market
23
23
  * @param {string} symbol Unified market symbol
24
24
  * @param {int} [limit] Not used by krakenfutures
@@ -30,7 +30,7 @@ export default class krakenfutures extends Exchange {
30
30
  * @method
31
31
  * @name krakenfutures#fetchTickers
32
32
  * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
33
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-market-data-get-tickers
33
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/get-tickers
34
34
  * @param {string[]} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
35
35
  * @param {object} [params] extra parameters specific to the exchange API endpoint
36
36
  * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -40,7 +40,7 @@ export default class krakenfutures extends Exchange {
40
40
  /**
41
41
  * @method
42
42
  * @name krakenfutures#fetchOHLCV
43
- * @see https://docs.futures.kraken.com/#http-api-charts-candles
43
+ * @see https://docs.kraken.com/api/docs/futures-api/charts/candles
44
44
  * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
45
45
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
46
46
  * @param {string} timeframe the length of time each candle represents
@@ -55,8 +55,8 @@ export default class krakenfutures extends Exchange {
55
55
  /**
56
56
  * @method
57
57
  * @name krakenfutures#fetchTrades
58
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-market-data-get-trade-history
59
- * @see https://docs.futures.kraken.com/#http-api-history-market-history-get-public-execution-events
58
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/get-history
59
+ * @see https://docs.kraken.com/api/docs/futures-api/history/get-public-execution-events
60
60
  * @description Fetch a history of filled trades that this account has made
61
61
  * @param {string} symbol Unified CCXT market symbol
62
62
  * @param {int} [since] Timestamp in ms of earliest trade. Not used by krakenfutures except in combination with params.until
@@ -104,7 +104,7 @@ export default class krakenfutures extends Exchange {
104
104
  /**
105
105
  * @method
106
106
  * @name krakenfutures#editOrder
107
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-order-management-edit-order
107
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/edit-order-spring
108
108
  * @description Edit an open order on the exchange
109
109
  * @param {string} id order id
110
110
  * @param {string} symbol Not used by Krakenfutures
@@ -119,7 +119,7 @@ export default class krakenfutures extends Exchange {
119
119
  /**
120
120
  * @method
121
121
  * @name krakenfutures#cancelOrder
122
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-order-management-cancel-order
122
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/cancel-order
123
123
  * @description Cancel an open order on the exchange
124
124
  * @param {string} id Order id
125
125
  * @param {string} symbol Not used by Krakenfutures
@@ -131,7 +131,7 @@ export default class krakenfutures extends Exchange {
131
131
  * @method
132
132
  * @name krakenfutures#cancelOrders
133
133
  * @description cancel multiple orders
134
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-order-management-batch-order-management
134
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/send-batch-order
135
135
  * @param {string[]} ids order ids
136
136
  * @param {string} [symbol] unified market symbol
137
137
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -144,7 +144,7 @@ export default class krakenfutures extends Exchange {
144
144
  /**
145
145
  * @method
146
146
  * @name krakenfutures#cancelAllOrders
147
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-order-management-cancel-all-orders
147
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/cancel-all-orders
148
148
  * @description Cancels all orders on the exchange, including trigger orders
149
149
  * @param {str} symbol Unified market symbol
150
150
  * @param {dict} [params] Exchange specific params
@@ -155,7 +155,7 @@ export default class krakenfutures extends Exchange {
155
155
  * @method
156
156
  * @name krakenfutures#cancelAllOrdersAfter
157
157
  * @description dead man's switch, cancel all orders after the given timeout
158
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-order-management-dead-man-39-s-switch
158
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/cancel-all-orders-after
159
159
  * @param {number} timeout time in milliseconds, 0 represents cancel the timer
160
160
  * @param {object} [params] extra parameters specific to the exchange API endpoint
161
161
  * @returns {object} the api result
@@ -164,7 +164,7 @@ export default class krakenfutures extends Exchange {
164
164
  /**
165
165
  * @method
166
166
  * @name krakenfutures#fetchOpenOrders
167
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-order-management-get-open-orders
167
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/get-open-orders
168
168
  * @description Gets all open orders, including trigger orders, for an account from the exchange api
169
169
  * @param {string} symbol Unified market symbol
170
170
  * @param {int} [since] Timestamp (ms) of earliest order. (Not used by kraken api but filtered internally by CCXT)
@@ -188,7 +188,7 @@ export default class krakenfutures extends Exchange {
188
188
  /**
189
189
  * @method
190
190
  * @name krakenfutures#fetchCanceledOrders
191
- * @see https://docs.futures.kraken.com/#http-api-history-account-history-get-order-events
191
+ * @see https://docs.kraken.com/api/docs/futures-api/history/get-order-events
192
192
  * @description Gets all canceled orders, including trigger orders, for an account from the exchange api
193
193
  * @param {string} symbol Unified market symbol
194
194
  * @param {int} [since] Timestamp (ms) of earliest order.
@@ -205,7 +205,7 @@ export default class krakenfutures extends Exchange {
205
205
  * @method
206
206
  * @name krakenfutures#fetchMyTrades
207
207
  * @description fetch all trades made by the user
208
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-historical-data-get-your-fills
208
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/get-fills
209
209
  * @param {string} symbol unified market symbol
210
210
  * @param {int} [since] *not used by the api* the earliest time in ms to fetch trades for
211
211
  * @param {int} [limit] the maximum number of trades structures to retrieve
@@ -217,7 +217,7 @@ export default class krakenfutures extends Exchange {
217
217
  /**
218
218
  * @method
219
219
  * @name krakenfutures#fetchBalance
220
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-account-information-get-wallets
220
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/get-accounts
221
221
  * @description Fetch the balance for a sub-account, all sub-account balances are inside 'info' in the response
222
222
  * @param {object} [params] Exchange specific parameters
223
223
  * @param {string} [params.type] The sub-account type to query the balance of, possible values include 'flex', 'cash'/'main'/'funding', or a market symbol * defaults to 'flex' *
@@ -230,7 +230,7 @@ export default class krakenfutures extends Exchange {
230
230
  * @method
231
231
  * @name krakenfutures#fetchFundingRates
232
232
  * @description fetch the current funding rates for multiple markets
233
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-market-data-get-tickers
233
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/get-tickers
234
234
  * @param {string[]} symbols unified market symbols
235
235
  * @param {object} [params] extra parameters specific to the exchange API endpoint
236
236
  * @returns {Order[]} an array of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
@@ -241,7 +241,7 @@ export default class krakenfutures extends Exchange {
241
241
  * @method
242
242
  * @name krakenfutures#fetchFundingRateHistory
243
243
  * @description fetches historical funding rate prices
244
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-historical-funding-rates-historical-funding-rates
244
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/historical-funding-rates
245
245
  * @param {string} symbol unified symbol of the market to fetch the funding rate history for
246
246
  * @param {int} [since] timestamp in ms of the earliest funding rate to fetch
247
247
  * @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
@@ -252,7 +252,7 @@ export default class krakenfutures extends Exchange {
252
252
  /**
253
253
  * @method
254
254
  * @name krakenfutures#fetchPositions
255
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-account-information-get-open-positions
255
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/get-open-positions
256
256
  * @description Fetches current contract trading positions
257
257
  * @param {string[]} symbols List of unified symbols
258
258
  * @param {object} [params] Not used by krakenfutures
@@ -287,7 +287,7 @@ export default class krakenfutures extends Exchange {
287
287
  * @method
288
288
  * @name krakenfutures#fetchLeverageTiers
289
289
  * @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
290
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-instrument-details-get-instruments
290
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/get-instruments
291
291
  * @param {string[]|undefined} symbols list of unified market symbols
292
292
  * @param {object} [params] extra parameters specific to the exchange API endpoint
293
293
  * @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}, indexed by market symbols
@@ -309,8 +309,8 @@ export default class krakenfutures extends Exchange {
309
309
  /**
310
310
  * @method
311
311
  * @name krakenfutures#transfer
312
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-transfers-initiate-wallet-transfer
313
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-transfers-initiate-withdrawal-to-spot-wallet
312
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/transfer
313
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/sub-account-transfer
314
314
  * @description transfers currencies between sub-accounts
315
315
  * @param {string} code Unified currency code
316
316
  * @param {float} amount Size of the transfer
@@ -324,7 +324,7 @@ export default class krakenfutures extends Exchange {
324
324
  * @method
325
325
  * @name krakenfutures#setLeverage
326
326
  * @description set the level of leverage for a market
327
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-multi-collateral-set-the-leverage-setting-for-a-market
327
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/set-leverage-setting
328
328
  * @param {float} leverage the rate of leverage
329
329
  * @param {string} symbol unified market symbol
330
330
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -335,7 +335,7 @@ export default class krakenfutures extends Exchange {
335
335
  * @method
336
336
  * @name krakenfutures#fetchLeverages
337
337
  * @description fetch the set leverage for all contract and margin markets
338
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-multi-collateral-get-the-leverage-setting-for-a-market
338
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/get-leverage-setting
339
339
  * @param {string[]} [symbols] a list of unified market symbols
340
340
  * @param {object} [params] extra parameters specific to the exchange API endpoint
341
341
  * @returns {object} a list of [leverage structures]{@link https://docs.ccxt.com/#/?id=leverage-structure}
@@ -345,7 +345,7 @@ export default class krakenfutures extends Exchange {
345
345
  * @method
346
346
  * @name krakenfutures#fetchLeverage
347
347
  * @description fetch the set leverage for a market
348
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-multi-collateral-get-the-leverage-setting-for-a-market
348
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/get-leverage-setting
349
349
  * @param {string} symbol unified market symbol
350
350
  * @param {object} [params] extra parameters specific to the exchange API endpoint
351
351
  * @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
@@ -103,7 +103,7 @@ export default class krakenfutures extends Exchange {
103
103
  },
104
104
  'www': 'https://futures.kraken.com/',
105
105
  'doc': [
106
- 'https://docs.futures.kraken.com/#introduction',
106
+ 'https://docs.kraken.com/api/docs/futures-api/trading/market-data/',
107
107
  ],
108
108
  'fees': 'https://support.kraken.com/hc/en-us/articles/360022835771-Transaction-fees-and-rebates-for-Kraken-Futures',
109
109
  'referral': undefined,
@@ -366,7 +366,7 @@ export default class krakenfutures extends Exchange {
366
366
  * @method
367
367
  * @name krakenfutures#fetchMarkets
368
368
  * @description Fetches the available trading markets from the exchange, Multi-collateral markets are returned as linear markets, but can be settled in multiple currencies
369
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-instrument-details-get-instruments
369
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/get-instruments
370
370
  * @param {object} [params] exchange specific params
371
371
  * @returns An array of market structures
372
372
  */
@@ -541,7 +541,7 @@ export default class krakenfutures extends Exchange {
541
541
  /**
542
542
  * @method
543
543
  * @name krakenfutures#fetchOrderBook
544
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-market-data-get-orderbook
544
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/get-orderbook
545
545
  * @description Fetches a list of open orders in a market
546
546
  * @param {string} symbol Unified market symbol
547
547
  * @param {int} [limit] Not used by krakenfutures
@@ -592,7 +592,7 @@ export default class krakenfutures extends Exchange {
592
592
  * @method
593
593
  * @name krakenfutures#fetchTickers
594
594
  * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
595
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-market-data-get-tickers
595
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/get-tickers
596
596
  * @param {string[]} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
597
597
  * @param {object} [params] extra parameters specific to the exchange API endpoint
598
598
  * @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -711,7 +711,7 @@ export default class krakenfutures extends Exchange {
711
711
  /**
712
712
  * @method
713
713
  * @name krakenfutures#fetchOHLCV
714
- * @see https://docs.futures.kraken.com/#http-api-charts-candles
714
+ * @see https://docs.kraken.com/api/docs/futures-api/charts/candles
715
715
  * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
716
716
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
717
717
  * @param {string} timeframe the length of time each candle represents
@@ -794,8 +794,8 @@ export default class krakenfutures extends Exchange {
794
794
  /**
795
795
  * @method
796
796
  * @name krakenfutures#fetchTrades
797
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-market-data-get-trade-history
798
- * @see https://docs.futures.kraken.com/#http-api-history-market-history-get-public-execution-events
797
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/get-history
798
+ * @see https://docs.kraken.com/api/docs/futures-api/history/get-public-execution-events
799
799
  * @description Fetch a history of filled trades that this account has made
800
800
  * @param {string} symbol Unified CCXT market symbol
801
801
  * @param {int} [since] Timestamp in ms of earliest trade. Not used by krakenfutures except in combination with params.until
@@ -1240,7 +1240,7 @@ export default class krakenfutures extends Exchange {
1240
1240
  /**
1241
1241
  * @method
1242
1242
  * @name krakenfutures#editOrder
1243
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-order-management-edit-order
1243
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/edit-order-spring
1244
1244
  * @description Edit an open order on the exchange
1245
1245
  * @param {string} id order id
1246
1246
  * @param {string} symbol Not used by Krakenfutures
@@ -1272,7 +1272,7 @@ export default class krakenfutures extends Exchange {
1272
1272
  /**
1273
1273
  * @method
1274
1274
  * @name krakenfutures#cancelOrder
1275
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-order-management-cancel-order
1275
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/cancel-order
1276
1276
  * @description Cancel an open order on the exchange
1277
1277
  * @param {string} id Order id
1278
1278
  * @param {string} symbol Not used by Krakenfutures
@@ -1294,7 +1294,7 @@ export default class krakenfutures extends Exchange {
1294
1294
  * @method
1295
1295
  * @name krakenfutures#cancelOrders
1296
1296
  * @description cancel multiple orders
1297
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-order-management-batch-order-management
1297
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/send-batch-order
1298
1298
  * @param {string[]} ids order ids
1299
1299
  * @param {string} [symbol] unified market symbol
1300
1300
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -1357,7 +1357,7 @@ export default class krakenfutures extends Exchange {
1357
1357
  /**
1358
1358
  * @method
1359
1359
  * @name krakenfutures#cancelAllOrders
1360
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-order-management-cancel-all-orders
1360
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/cancel-all-orders
1361
1361
  * @description Cancels all orders on the exchange, including trigger orders
1362
1362
  * @param {str} symbol Unified market symbol
1363
1363
  * @param {dict} [params] Exchange specific params
@@ -1414,7 +1414,7 @@ export default class krakenfutures extends Exchange {
1414
1414
  * @method
1415
1415
  * @name krakenfutures#cancelAllOrdersAfter
1416
1416
  * @description dead man's switch, cancel all orders after the given timeout
1417
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-order-management-dead-man-39-s-switch
1417
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/cancel-all-orders-after
1418
1418
  * @param {number} timeout time in milliseconds, 0 represents cancel the timer
1419
1419
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1420
1420
  * @returns {object} the api result
@@ -1440,7 +1440,7 @@ export default class krakenfutures extends Exchange {
1440
1440
  /**
1441
1441
  * @method
1442
1442
  * @name krakenfutures#fetchOpenOrders
1443
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-order-management-get-open-orders
1443
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/get-open-orders
1444
1444
  * @description Gets all open orders, including trigger orders, for an account from the exchange api
1445
1445
  * @param {string} symbol Unified market symbol
1446
1446
  * @param {int} [since] Timestamp (ms) of earliest order. (Not used by kraken api but filtered internally by CCXT)
@@ -1503,7 +1503,7 @@ export default class krakenfutures extends Exchange {
1503
1503
  /**
1504
1504
  * @method
1505
1505
  * @name krakenfutures#fetchCanceledOrders
1506
- * @see https://docs.futures.kraken.com/#http-api-history-account-history-get-order-events
1506
+ * @see https://docs.kraken.com/api/docs/futures-api/history/get-order-events
1507
1507
  * @description Gets all canceled orders, including trigger orders, for an account from the exchange api
1508
1508
  * @param {string} symbol Unified market symbol
1509
1509
  * @param {int} [since] Timestamp (ms) of earliest order.
@@ -1992,7 +1992,7 @@ export default class krakenfutures extends Exchange {
1992
1992
  * @method
1993
1993
  * @name krakenfutures#fetchMyTrades
1994
1994
  * @description fetch all trades made by the user
1995
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-historical-data-get-your-fills
1995
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/get-fills
1996
1996
  * @param {string} symbol unified market symbol
1997
1997
  * @param {int} [since] *not used by the api* the earliest time in ms to fetch trades for
1998
1998
  * @param {int} [limit] the maximum number of trades structures to retrieve
@@ -2033,7 +2033,7 @@ export default class krakenfutures extends Exchange {
2033
2033
  /**
2034
2034
  * @method
2035
2035
  * @name krakenfutures#fetchBalance
2036
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-account-information-get-wallets
2036
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/get-accounts
2037
2037
  * @description Fetch the balance for a sub-account, all sub-account balances are inside 'info' in the response
2038
2038
  * @param {object} [params] Exchange specific parameters
2039
2039
  * @param {string} [params.type] The sub-account type to query the balance of, possible values include 'flex', 'cash'/'main'/'funding', or a market symbol * defaults to 'flex' *
@@ -2257,7 +2257,7 @@ export default class krakenfutures extends Exchange {
2257
2257
  * @method
2258
2258
  * @name krakenfutures#fetchFundingRates
2259
2259
  * @description fetch the current funding rates for multiple markets
2260
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-market-data-get-tickers
2260
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/get-tickers
2261
2261
  * @param {string[]} symbols unified market symbols
2262
2262
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2263
2263
  * @returns {Order[]} an array of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
@@ -2343,7 +2343,7 @@ export default class krakenfutures extends Exchange {
2343
2343
  * @method
2344
2344
  * @name krakenfutures#fetchFundingRateHistory
2345
2345
  * @description fetches historical funding rate prices
2346
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-historical-funding-rates-historical-funding-rates
2346
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/historical-funding-rates
2347
2347
  * @param {string} symbol unified symbol of the market to fetch the funding rate history for
2348
2348
  * @param {int} [since] timestamp in ms of the earliest funding rate to fetch
2349
2349
  * @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
@@ -2394,7 +2394,7 @@ export default class krakenfutures extends Exchange {
2394
2394
  /**
2395
2395
  * @method
2396
2396
  * @name krakenfutures#fetchPositions
2397
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-account-information-get-open-positions
2397
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/get-open-positions
2398
2398
  * @description Fetches current contract trading positions
2399
2399
  * @param {string[]} symbols List of unified symbols
2400
2400
  * @param {object} [params] Not used by krakenfutures
@@ -2491,7 +2491,7 @@ export default class krakenfutures extends Exchange {
2491
2491
  * @method
2492
2492
  * @name krakenfutures#fetchLeverageTiers
2493
2493
  * @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
2494
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-instrument-details-get-instruments
2494
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/get-instruments
2495
2495
  * @param {string[]|undefined} symbols list of unified market symbols
2496
2496
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2497
2497
  * @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}, indexed by market symbols
@@ -2681,8 +2681,8 @@ export default class krakenfutures extends Exchange {
2681
2681
  /**
2682
2682
  * @method
2683
2683
  * @name krakenfutures#transfer
2684
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-transfers-initiate-wallet-transfer
2685
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-transfers-initiate-withdrawal-to-spot-wallet
2684
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/transfer
2685
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/sub-account-transfer
2686
2686
  * @description transfers currencies between sub-accounts
2687
2687
  * @param {string} code Unified currency code
2688
2688
  * @param {float} amount Size of the transfer
@@ -2731,7 +2731,7 @@ export default class krakenfutures extends Exchange {
2731
2731
  * @method
2732
2732
  * @name krakenfutures#setLeverage
2733
2733
  * @description set the level of leverage for a market
2734
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-multi-collateral-set-the-leverage-setting-for-a-market
2734
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/set-leverage-setting
2735
2735
  * @param {float} leverage the rate of leverage
2736
2736
  * @param {string} symbol unified market symbol
2737
2737
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -2755,7 +2755,7 @@ export default class krakenfutures extends Exchange {
2755
2755
  * @method
2756
2756
  * @name krakenfutures#fetchLeverages
2757
2757
  * @description fetch the set leverage for all contract and margin markets
2758
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-multi-collateral-get-the-leverage-setting-for-a-market
2758
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/get-leverage-setting
2759
2759
  * @param {string[]} [symbols] a list of unified market symbols
2760
2760
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2761
2761
  * @returns {object} a list of [leverage structures]{@link https://docs.ccxt.com/#/?id=leverage-structure}
@@ -2782,7 +2782,7 @@ export default class krakenfutures extends Exchange {
2782
2782
  * @method
2783
2783
  * @name krakenfutures#fetchLeverage
2784
2784
  * @description fetch the set leverage for a market
2785
- * @see https://docs.futures.kraken.com/#http-api-trading-v3-api-multi-collateral-get-the-leverage-setting-for-a-market
2785
+ * @see https://docs.kraken.com/api/docs/futures-api/trading/get-leverage-setting
2786
2786
  * @param {string} symbol unified market symbol
2787
2787
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2788
2788
  * @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
package/js/src/mexc.js CHANGED
@@ -669,6 +669,7 @@ export default class mexc extends Exchange {
669
669
  'BNB Smart Chain(BEP20-RACAV1)': 'BSC',
670
670
  'BNB Smart Chain(BEP20-RACAV2)': 'BSC',
671
671
  'BNB Smart Chain(BEP20)': 'BSC',
672
+ 'Ethereum(ERC20)': 'ERC20',
672
673
  // TODO: uncomment below after deciding unified name
673
674
  // 'PEPE COIN BSC':
674
675
  // 'SMART BLOCKCHAIN':
@@ -5202,7 +5203,7 @@ export default class mexc extends Exchange {
5202
5203
  // positionShowStatus: 'CLOSED'
5203
5204
  // }
5204
5205
  //
5205
- market = this.safeMarket(this.safeString(position, 'symbol'), market);
5206
+ market = this.safeMarket(this.safeString(position, 'symbol'), market, undefined, 'swap');
5206
5207
  const symbol = market['symbol'];
5207
5208
  const contracts = this.safeString(position, 'holdVol');
5208
5209
  const entryPrice = this.safeNumber(position, 'openAvgPrice');
@@ -8,15 +8,17 @@ import Client from '../base/ws/Client.js';
8
8
  */
9
9
  export default class bitget extends bitgetRest {
10
10
  describe(): any;
11
- getInstType(market: any, params?: {}): any[];
11
+ getInstType(market: any, uta?: boolean, params?: {}): any[];
12
12
  /**
13
13
  * @method
14
14
  * @name bitget#watchTicker
15
15
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
16
16
  * @see https://www.bitget.com/api-doc/spot/websocket/public/Tickers-Channel
17
17
  * @see https://www.bitget.com/api-doc/contract/websocket/public/Tickers-Channel
18
+ * @see https://www.bitget.com/api-doc/uta/websocket/public/Tickers-Channel
18
19
  * @param {string} symbol unified symbol of the market to watch the ticker for
19
20
  * @param {object} [params] extra parameters specific to the exchange API endpoint
21
+ * @param {boolean} [params.uta] set to true for the unified trading account (uta), defaults to false
20
22
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
21
23
  */
22
24
  watchTicker(symbol: string, params?: {}): Promise<Ticker>;
@@ -37,8 +39,10 @@ export default class bitget extends bitgetRest {
37
39
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
38
40
  * @see https://www.bitget.com/api-doc/spot/websocket/public/Tickers-Channel
39
41
  * @see https://www.bitget.com/api-doc/contract/websocket/public/Tickers-Channel
42
+ * @see https://www.bitget.com/api-doc/uta/websocket/public/Tickers-Channel
40
43
  * @param {string[]} symbols unified symbol of the market to watch the tickers for
41
44
  * @param {object} [params] extra parameters specific to the exchange API endpoint
45
+ * @param {boolean} [params.uta] set to true for the unified trading account (uta), defaults to false
42
46
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
43
47
  */
44
48
  watchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
@@ -47,11 +51,13 @@ export default class bitget extends bitgetRest {
47
51
  /**
48
52
  * @method
49
53
  * @name bitget#watchBidsAsks
54
+ * @description watches best bid & ask for symbols
50
55
  * @see https://www.bitget.com/api-doc/spot/websocket/public/Tickers-Channel
51
56
  * @see https://www.bitget.com/api-doc/contract/websocket/public/Tickers-Channel
52
- * @description watches best bid & ask for symbols
57
+ * @see https://www.bitget.com/api-doc/uta/websocket/public/Tickers-Channel
53
58
  * @param {string[]} symbols unified symbol of the market to fetch the ticker for
54
59
  * @param {object} [params] extra parameters specific to the exchange API endpoint
60
+ * @param {boolean} [params.uta] set to true for the unified trading account (uta), defaults to false
55
61
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
56
62
  */
57
63
  watchBidsAsks(symbols?: Strings, params?: {}): Promise<Tickers>;