ccxt 4.4.10 → 4.4.11

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.
package/dist/cjs/ccxt.js CHANGED
@@ -194,7 +194,7 @@ var xt$1 = require('./src/pro/xt.js');
194
194
 
195
195
  //-----------------------------------------------------------------------------
196
196
  // this is updated by vss.js when building
197
- const version = '4.4.10';
197
+ const version = '4.4.11';
198
198
  Exchange["default"].ccxtVersion = version;
199
199
  const exchanges = {
200
200
  'ace': ace,
@@ -1091,7 +1091,8 @@ class binance extends binance$1 {
1091
1091
  'repay-futures-negative-balance': 150,
1092
1092
  'listenKey': 1,
1093
1093
  'asset-collection': 3,
1094
- 'margin/repay-debt': 0.4, // Weight(Order): 0.4 => (1000 / (50 * 0.4)) * 60 = 3000
1094
+ 'margin/repay-debt': 0.4,
1095
+ 'um/feeBurn': 1,
1095
1096
  },
1096
1097
  'put': {
1097
1098
  'listenKey': 1, // 1
@@ -1413,7 +1413,7 @@ class bitget extends bitget$1 {
1413
1413
  },
1414
1414
  'sandboxMode': false,
1415
1415
  'networks': {
1416
- 'TRX': 'TRC20',
1416
+ 'TRC20': 'TRC20',
1417
1417
  'ERC20': 'ERC20',
1418
1418
  'BEP20': 'BSC',
1419
1419
  'ARB': 'ArbitrumOne',
@@ -1218,6 +1218,7 @@ class htx extends htx$1 {
1218
1218
  // https://github.com/ccxt/ccxt/issues/6081
1219
1219
  // https://github.com/ccxt/ccxt/issues/3365
1220
1220
  // https://github.com/ccxt/ccxt/issues/2873
1221
+ 'NGL': 'GFNGL',
1221
1222
  'GET': 'THEMIS',
1222
1223
  'GTC': 'GAMECOM',
1223
1224
  'HIT': 'HITCHAIN',
@@ -1228,7 +1229,8 @@ class htx extends htx$1 {
1228
1229
  'PNT': 'PENTA',
1229
1230
  'SBTC': 'SUPERBITCOIN',
1230
1231
  'SOUL': 'SOULSAVER',
1231
- 'BIFI': 'BITCOINFILE', // conflict with Beefy.Finance https://github.com/ccxt/ccxt/issues/8706
1232
+ 'BIFI': 'BITCOINFILE',
1233
+ 'FUD': 'FTX Users\' Debt',
1232
1234
  },
1233
1235
  });
1234
1236
  }
@@ -7506,6 +7508,10 @@ class htx extends htx$1 {
7506
7508
  * @method
7507
7509
  * @name htx#setLeverage
7508
7510
  * @description set the level of leverage for a market
7511
+ * @see https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-switch-leverage
7512
+ * @see https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-switch-leverage
7513
+ * @see https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#switch-leverage
7514
+ * @see https://huobiapi.github.io/docs/dm/v1/en/#switch-leverage // Coin-m futures
7509
7515
  * @param {float} leverage the rate of leverage
7510
7516
  * @param {string} symbol unified market symbol
7511
7517
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -48,6 +48,7 @@ class kraken extends kraken$1 {
48
48
  'createStopMarketOrder': true,
49
49
  'createStopOrder': true,
50
50
  'createTrailingAmountOrder': true,
51
+ 'createTrailingPercentOrder': true,
51
52
  'editOrder': true,
52
53
  'fetchBalance': true,
53
54
  'fetchBorrowInterest': false,
@@ -438,7 +439,9 @@ class kraken extends kraken$1 {
438
439
  'EGeneral:Internal error': errors.ExchangeNotAvailable,
439
440
  'EGeneral:Temporary lockout': errors.DDoSProtection,
440
441
  'EGeneral:Permission denied': errors.PermissionDenied,
442
+ 'EGeneral:Invalid arguments:price': errors.InvalidOrder,
441
443
  'EOrder:Unknown order': errors.InvalidOrder,
444
+ 'EOrder:Invalid price:Invalid price argument': errors.InvalidOrder,
442
445
  'EOrder:Order minimum not met': errors.InvalidOrder,
443
446
  'EGeneral:Invalid arguments': errors.BadRequest,
444
447
  'ESession:Invalid session': errors.AuthenticationError,
@@ -1450,8 +1453,8 @@ class kraken extends kraken$1 {
1450
1453
  /**
1451
1454
  * @method
1452
1455
  * @name kraken#createOrder
1453
- * @see https://docs.kraken.com/rest/#tag/Spot-Trading/operation/addOrder
1454
1456
  * @description create a trade order
1457
+ * @see https://docs.kraken.com/api/docs/rest-api/add-order
1455
1458
  * @param {string} symbol unified symbol of the market to create an order in
1456
1459
  * @param {string} type 'market' or 'limit'
1457
1460
  * @param {string} side 'buy' or 'sell'
@@ -1463,7 +1466,9 @@ class kraken extends kraken$1 {
1463
1466
  * @param {float} [params.stopLossPrice] *margin only* the price that a stop loss order is triggered at
1464
1467
  * @param {float} [params.takeProfitPrice] *margin only* the price that a take profit order is triggered at
1465
1468
  * @param {string} [params.trailingAmount] *margin only* the quote amount to trail away from the current market price
1469
+ * @param {string} [params.trailingPercent] *margin only* the percent to trail away from the current market price
1466
1470
  * @param {string} [params.trailingLimitAmount] *margin only* the quote amount away from the trailingAmount
1471
+ * @param {string} [params.trailingLimitPercent] *margin only* the percent away from the trailingAmount
1467
1472
  * @param {string} [params.offset] *margin only* '+' or '-' whether you want the trailingLimitAmount value to be positive or negative, default is negative '-'
1468
1473
  * @param {string} [params.trigger] *margin only* the activation price type, 'last' or 'index', default is 'last'
1469
1474
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -1797,8 +1802,11 @@ class kraken extends kraken$1 {
1797
1802
  const isTakeProfitTriggerOrder = takeProfitTriggerPrice !== undefined;
1798
1803
  const isStopLossOrTakeProfitTrigger = isStopLossTriggerOrder || isTakeProfitTriggerOrder;
1799
1804
  const trailingAmount = this.safeString(params, 'trailingAmount');
1805
+ const trailingPercent = this.safeString(params, 'trailingPercent');
1800
1806
  const trailingLimitAmount = this.safeString(params, 'trailingLimitAmount');
1807
+ const trailingLimitPercent = this.safeString(params, 'trailingLimitPercent');
1801
1808
  const isTrailingAmountOrder = trailingAmount !== undefined;
1809
+ const isTrailingPercentOrder = trailingPercent !== undefined;
1802
1810
  const isLimitOrder = type.endsWith('limit'); // supporting limit, stop-loss-limit, take-profit-limit, etc
1803
1811
  const isMarketOrder = type === 'market';
1804
1812
  const cost = this.safeString(params, 'cost');
@@ -1842,20 +1850,36 @@ class kraken extends kraken$1 {
1842
1850
  request['price2'] = this.priceToPrecision(symbol, price);
1843
1851
  }
1844
1852
  }
1845
- else if (isTrailingAmountOrder) {
1853
+ else if (isTrailingAmountOrder || isTrailingPercentOrder) {
1854
+ let trailingPercentString = undefined;
1855
+ if (isTrailingPercentOrder) {
1856
+ trailingPercentString = (trailingPercent.endsWith('%')) ? trailingPercent : '+' + (this.numberToString(trailingPercent) + '%');
1857
+ }
1858
+ const trailingAmountString = (trailingAmount !== undefined) ? '+' + trailingAmount : undefined; // must use + for this
1859
+ const offset = this.safeString(params, 'offset', '-'); // can use + or - for this
1860
+ const trailingLimitAmountString = (trailingLimitAmount !== undefined) ? offset + this.numberToString(trailingLimitAmount) : undefined;
1846
1861
  const trailingActivationPriceType = this.safeString(params, 'trigger', 'last');
1847
- const trailingAmountString = '+' + trailingAmount;
1848
1862
  request['trigger'] = trailingActivationPriceType;
1849
- if (isLimitOrder || (trailingLimitAmount !== undefined)) {
1850
- const offset = this.safeString(params, 'offset', '-');
1851
- const trailingLimitAmountString = offset + this.numberToString(trailingLimitAmount);
1852
- request['price'] = trailingAmountString;
1853
- request['price2'] = trailingLimitAmountString;
1863
+ if (isLimitOrder || (trailingLimitAmount !== undefined) || (trailingLimitPercent !== undefined)) {
1854
1864
  request['ordertype'] = 'trailing-stop-limit';
1865
+ if (trailingLimitPercent !== undefined) {
1866
+ const trailingLimitPercentString = (trailingLimitPercent.endsWith('%')) ? trailingLimitPercent : (this.numberToString(trailingLimitPercent) + '%');
1867
+ request['price'] = trailingPercentString;
1868
+ request['price2'] = trailingLimitPercentString;
1869
+ }
1870
+ else if (trailingLimitAmount !== undefined) {
1871
+ request['price'] = trailingAmountString;
1872
+ request['price2'] = trailingLimitAmountString;
1873
+ }
1855
1874
  }
1856
1875
  else {
1857
- request['price'] = trailingAmountString;
1858
1876
  request['ordertype'] = 'trailing-stop';
1877
+ if (trailingPercent !== undefined) {
1878
+ request['price'] = trailingPercentString;
1879
+ }
1880
+ else {
1881
+ request['price'] = trailingAmountString;
1882
+ }
1859
1883
  }
1860
1884
  }
1861
1885
  if (reduceOnly) {
@@ -1893,7 +1917,7 @@ class kraken extends kraken$1 {
1893
1917
  if ((flags !== undefined) && !('oflags' in request)) {
1894
1918
  request['oflags'] = flags;
1895
1919
  }
1896
- params = this.omit(params, ['timeInForce', 'reduceOnly', 'stopLossPrice', 'takeProfitPrice', 'trailingAmount', 'trailingLimitAmount', 'offset']);
1920
+ params = this.omit(params, ['timeInForce', 'reduceOnly', 'stopLossPrice', 'takeProfitPrice', 'trailingAmount', 'trailingPercent', 'trailingLimitAmount', 'trailingLimitPercent', 'offset']);
1897
1921
  return [request, params];
1898
1922
  }
1899
1923
  async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
@@ -3115,11 +3139,16 @@ class kraken extends kraken$1 {
3115
3139
  }
3116
3140
  }
3117
3141
  else if (api === 'private') {
3142
+ const price = this.safeString(params, 'price');
3143
+ let isTriggerPercent = false;
3144
+ if (price !== undefined) {
3145
+ isTriggerPercent = (price.endsWith('%')) ? true : false;
3146
+ }
3118
3147
  const isCancelOrderBatch = (path === 'CancelOrderBatch');
3119
3148
  this.checkRequiredCredentials();
3120
3149
  const nonce = this.nonce().toString();
3121
3150
  // urlencodeNested is used to address https://github.com/ccxt/ccxt/issues/12872
3122
- if (isCancelOrderBatch) {
3151
+ if (isCancelOrderBatch || isTriggerPercent) {
3123
3152
  body = this.json(this.extend({ 'nonce': nonce }, params));
3124
3153
  }
3125
3154
  else {
@@ -3134,9 +3163,8 @@ class kraken extends kraken$1 {
3134
3163
  headers = {
3135
3164
  'API-Key': this.apiKey,
3136
3165
  'API-Sign': signature,
3137
- // 'Content-Type': 'application/x-www-form-urlencoded',
3138
3166
  };
3139
- if (isCancelOrderBatch) {
3167
+ if (isCancelOrderBatch || isTriggerPercent) {
3140
3168
  headers['Content-Type'] = 'application/json';
3141
3169
  }
3142
3170
  else {
@@ -3858,6 +3858,7 @@ class mexc extends mexc$1 {
3858
3858
  * @param {int} [since] the earliest time in ms to fetch trades for
3859
3859
  * @param {int} [limit] the maximum number of trades structures to retrieve
3860
3860
  * @param {object} [params] extra parameters specific to the exchange API endpoint
3861
+ * @param {int} [params.until] the latest time in ms to fetch trades for
3861
3862
  * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
3862
3863
  */
3863
3864
  if (symbol === undefined) {
@@ -3865,19 +3866,25 @@ class mexc extends mexc$1 {
3865
3866
  }
3866
3867
  await this.loadMarkets();
3867
3868
  const market = this.market(symbol);
3868
- const [marketType, query] = this.handleMarketTypeAndParams('fetchMyTrades', market, params);
3869
+ let marketType = undefined;
3870
+ [marketType, params] = this.handleMarketTypeAndParams('fetchMyTrades', market, params);
3869
3871
  const request = {
3870
3872
  'symbol': market['id'],
3871
3873
  };
3872
3874
  let trades = undefined;
3873
3875
  if (marketType === 'spot') {
3874
3876
  if (since !== undefined) {
3875
- request['start_time'] = since;
3877
+ request['startTime'] = since;
3876
3878
  }
3877
3879
  if (limit !== undefined) {
3878
3880
  request['limit'] = limit;
3879
3881
  }
3880
- trades = await this.spotPrivateGetMyTrades(this.extend(request, query));
3882
+ const until = this.safeInteger(params, 'until');
3883
+ if (until !== undefined) {
3884
+ params = this.omit(params, 'until');
3885
+ request['endTime'] = until;
3886
+ }
3887
+ trades = await this.spotPrivateGetMyTrades(this.extend(request, params));
3881
3888
  //
3882
3889
  // spot
3883
3890
  //
@@ -3911,7 +3918,7 @@ class mexc extends mexc$1 {
3911
3918
  if (limit !== undefined) {
3912
3919
  request['page_size'] = limit;
3913
3920
  }
3914
- const response = await this.contractPrivateGetOrderListOrderDeals(this.extend(request, query));
3921
+ const response = await this.contractPrivateGetOrderListOrderDeals(this.extend(request, params));
3915
3922
  //
3916
3923
  // {
3917
3924
  // "success": true,
@@ -575,6 +575,7 @@ class okx extends okx$1 {
575
575
  // General Class
576
576
  '1': errors.ExchangeError,
577
577
  '2': errors.ExchangeError,
578
+ '4088': errors.ManualInteractionNeeded,
578
579
  '50000': errors.BadRequest,
579
580
  '50001': errors.OnMaintenance,
580
581
  '50002': errors.BadRequest,
@@ -15,6 +15,7 @@ class deribit extends deribit$1 {
15
15
  'watchBalance': true,
16
16
  'watchTicker': true,
17
17
  'watchTickers': true,
18
+ 'watchBidsAsks': true,
18
19
  'watchTrades': true,
19
20
  'watchTradesForSymbols': true,
20
21
  'watchMyTrades': true,
@@ -266,6 +267,83 @@ class deribit extends deribit$1 {
266
267
  this.tickers[symbol] = ticker;
267
268
  client.resolve(ticker, messageHash);
268
269
  }
270
+ async watchBidsAsks(symbols = undefined, params = {}) {
271
+ /**
272
+ * @method
273
+ * @name deribit#watchBidsAsks
274
+ * @see https://docs.deribit.com/#quote-instrument_name
275
+ * @description watches best bid & ask for symbols
276
+ * @param {string[]} [symbols] unified symbol of the market to fetch the ticker for
277
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
278
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
279
+ */
280
+ await this.loadMarkets();
281
+ symbols = this.marketSymbols(symbols, undefined, false);
282
+ const url = this.urls['api']['ws'];
283
+ const channels = [];
284
+ for (let i = 0; i < symbols.length; i++) {
285
+ const market = this.market(symbols[i]);
286
+ channels.push('quote.' + market['id']);
287
+ }
288
+ const message = {
289
+ 'jsonrpc': '2.0',
290
+ 'method': 'public/subscribe',
291
+ 'params': {
292
+ 'channels': channels,
293
+ },
294
+ 'id': this.requestId(),
295
+ };
296
+ const request = this.deepExtend(message, params);
297
+ const newTickers = await this.watchMultiple(url, channels, request, channels, request);
298
+ if (this.newUpdates) {
299
+ const tickers = {};
300
+ tickers[newTickers['symbol']] = newTickers;
301
+ return tickers;
302
+ }
303
+ return this.filterByArray(this.bidsasks, 'symbol', symbols);
304
+ }
305
+ handleBidAsk(client, message) {
306
+ //
307
+ // {
308
+ // "jsonrpc": "2.0",
309
+ // "method": "subscription",
310
+ // "params": {
311
+ // "channel": "quote.BTC_USDT",
312
+ // "data": {
313
+ // "best_bid_amount": 0.026,
314
+ // "best_ask_amount": 0.026,
315
+ // "best_bid_price": 63908,
316
+ // "best_ask_price": 63940,
317
+ // "instrument_name": "BTC_USDT",
318
+ // "timestamp": 1727765131750
319
+ // }
320
+ // }
321
+ // }
322
+ //
323
+ const params = this.safeDict(message, 'params', {});
324
+ const data = this.safeDict(params, 'data', {});
325
+ const ticker = this.parseWsBidAsk(data);
326
+ const symbol = ticker['symbol'];
327
+ this.bidsasks[symbol] = ticker;
328
+ const messageHash = this.safeString(params, 'channel');
329
+ client.resolve(ticker, messageHash);
330
+ }
331
+ parseWsBidAsk(ticker, market = undefined) {
332
+ const marketId = this.safeString(ticker, 'instrument_name');
333
+ market = this.safeMarket(marketId, market);
334
+ const symbol = this.safeString(market, 'symbol');
335
+ const timestamp = this.safeInteger(ticker, 'timestamp');
336
+ return this.safeTicker({
337
+ 'symbol': symbol,
338
+ 'timestamp': timestamp,
339
+ 'datetime': this.iso8601(timestamp),
340
+ 'ask': this.safeString(ticker, 'best_ask_price'),
341
+ 'askVolume': this.safeString(ticker, 'best_ask_amount'),
342
+ 'bid': this.safeString(ticker, 'best_bid_price'),
343
+ 'bidVolume': this.safeString(ticker, 'best_bid_amount'),
344
+ 'info': ticker,
345
+ }, market);
346
+ }
269
347
  async watchTrades(symbol, since = undefined, limit = undefined, params = {}) {
270
348
  /**
271
349
  * @method
@@ -909,6 +987,7 @@ class deribit extends deribit$1 {
909
987
  };
910
988
  const handlers = {
911
989
  'ticker': this.handleTicker,
990
+ 'quote': this.handleBidAsk,
912
991
  'book': this.handleOrderBook,
913
992
  'trades': this.handleTrades,
914
993
  'chart': this.handleOHLCV,
@@ -14,7 +14,7 @@ class exmo extends exmo$1 {
14
14
  'ws': true,
15
15
  'watchBalance': true,
16
16
  'watchTicker': true,
17
- 'watchTickers': false,
17
+ 'watchTickers': true,
18
18
  'watchTrades': true,
19
19
  'watchMyTrades': true,
20
20
  'watchOrders': false,
@@ -200,6 +200,7 @@ class exmo extends exmo$1 {
200
200
  * @method
201
201
  * @name exmo#watchTicker
202
202
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
203
+ * @see https://documenter.getpostman.com/view/10287440/SzYXWKPi#fd8f47bc-8517-43c0-bb60-1d61a86d4471
203
204
  * @param {string} symbol unified symbol of the market to fetch the ticker for
204
205
  * @param {object} [params] extra parameters specific to the exchange API endpoint
205
206
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -219,6 +220,35 @@ class exmo extends exmo$1 {
219
220
  const request = this.deepExtend(message, params);
220
221
  return await this.watch(url, messageHash, request, messageHash, request);
221
222
  }
223
+ async watchTickers(symbols = undefined, params = {}) {
224
+ /**
225
+ * @method
226
+ * @name exmo#watchTickers
227
+ * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
228
+ * @see https://documenter.getpostman.com/view/10287440/SzYXWKPi#fd8f47bc-8517-43c0-bb60-1d61a86d4471
229
+ * @param {string[]} [symbols] unified symbol of the market to fetch the ticker for
230
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
231
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
232
+ */
233
+ await this.loadMarkets();
234
+ symbols = this.marketSymbols(symbols, undefined, false);
235
+ const messageHashes = [];
236
+ const args = [];
237
+ for (let i = 0; i < symbols.length; i++) {
238
+ const market = this.market(symbols[i]);
239
+ messageHashes.push('ticker:' + market['symbol']);
240
+ args.push('spot/ticker:' + market['id']);
241
+ }
242
+ const url = this.urls['api']['ws']['public'];
243
+ const message = {
244
+ 'method': 'subscribe',
245
+ 'topics': args,
246
+ 'id': this.requestId(),
247
+ };
248
+ const request = this.deepExtend(message, params);
249
+ await this.watchMultiple(url, messageHashes, request, messageHashes, request);
250
+ return this.filterByArray(this.tickers, 'symbol', symbols);
251
+ }
222
252
  handleTicker(client, message) {
223
253
  //
224
254
  // spot
@@ -1949,7 +1949,7 @@ class okx extends okx$1 {
1949
1949
  const tradeSymbols = Object.keys(symbols);
1950
1950
  for (let i = 0; i < tradeSymbols.length; i++) {
1951
1951
  const symbolMessageHash = messageHash + '::' + tradeSymbols[i];
1952
- client.resolve(this.orders, symbolMessageHash);
1952
+ client.resolve(this.myTrades, symbolMessageHash);
1953
1953
  }
1954
1954
  }
1955
1955
  requestId() {
package/js/ccxt.d.ts CHANGED
@@ -4,7 +4,7 @@ import * as functions from './src/base/functions.js';
4
4
  import * as errors from './src/base/errors.js';
5
5
  import type { Int, int, Str, Strings, Num, Bool, IndexType, OrderSide, OrderType, MarketType, SubType, Dict, NullableDict, List, NullableList, Fee, OHLCV, OHLCVC, implicitReturnType, Market, Currency, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketInterface, Trade, Order, OrderBook, Ticker, Transaction, Tickers, CurrencyInterface, Balance, BalanceAccount, Account, PartialBalances, Balances, DepositAddress, WithdrawalResponse, DepositAddressResponse, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarketMarginModes, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, LeverageTiers } from './src/base/types.js';
6
6
  import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending, UnsubscribeError } from './src/base/errors.js';
7
- declare const version = "4.4.9";
7
+ declare const version = "4.4.10";
8
8
  import ace from './src/ace.js';
9
9
  import alpaca from './src/alpaca.js';
10
10
  import ascendex from './src/ascendex.js';
package/js/ccxt.js CHANGED
@@ -38,7 +38,7 @@ import * as errors from './src/base/errors.js';
38
38
  import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending, UnsubscribeError } from './src/base/errors.js';
39
39
  //-----------------------------------------------------------------------------
40
40
  // this is updated by vss.js when building
41
- const version = '4.4.10';
41
+ const version = '4.4.11';
42
42
  Exchange.ccxtVersion = version;
43
43
  //-----------------------------------------------------------------------------
44
44
  import ace from './src/ace.js';
@@ -702,6 +702,7 @@ interface Exchange {
702
702
  papiPostListenKey(params?: {}): Promise<implicitReturnType>;
703
703
  papiPostAssetCollection(params?: {}): Promise<implicitReturnType>;
704
704
  papiPostMarginRepayDebt(params?: {}): Promise<implicitReturnType>;
705
+ papiPostUmFeeBurn(params?: {}): Promise<implicitReturnType>;
705
706
  papiPutListenKey(params?: {}): Promise<implicitReturnType>;
706
707
  papiDeleteUmOrder(params?: {}): Promise<implicitReturnType>;
707
708
  papiDeleteUmConditionalOrder(params?: {}): Promise<implicitReturnType>;
@@ -702,6 +702,7 @@ interface binance {
702
702
  papiPostListenKey(params?: {}): Promise<implicitReturnType>;
703
703
  papiPostAssetCollection(params?: {}): Promise<implicitReturnType>;
704
704
  papiPostMarginRepayDebt(params?: {}): Promise<implicitReturnType>;
705
+ papiPostUmFeeBurn(params?: {}): Promise<implicitReturnType>;
705
706
  papiPutListenKey(params?: {}): Promise<implicitReturnType>;
706
707
  papiDeleteUmOrder(params?: {}): Promise<implicitReturnType>;
707
708
  papiDeleteUmConditionalOrder(params?: {}): Promise<implicitReturnType>;
@@ -754,6 +754,7 @@ interface binance {
754
754
  papiPostListenKey(params?: {}): Promise<implicitReturnType>;
755
755
  papiPostAssetCollection(params?: {}): Promise<implicitReturnType>;
756
756
  papiPostMarginRepayDebt(params?: {}): Promise<implicitReturnType>;
757
+ papiPostUmFeeBurn(params?: {}): Promise<implicitReturnType>;
757
758
  papiPutListenKey(params?: {}): Promise<implicitReturnType>;
758
759
  papiDeleteUmOrder(params?: {}): Promise<implicitReturnType>;
759
760
  papiDeleteUmConditionalOrder(params?: {}): Promise<implicitReturnType>;
@@ -702,6 +702,7 @@ interface binance {
702
702
  papiPostListenKey(params?: {}): Promise<implicitReturnType>;
703
703
  papiPostAssetCollection(params?: {}): Promise<implicitReturnType>;
704
704
  papiPostMarginRepayDebt(params?: {}): Promise<implicitReturnType>;
705
+ papiPostUmFeeBurn(params?: {}): Promise<implicitReturnType>;
705
706
  papiPutListenKey(params?: {}): Promise<implicitReturnType>;
706
707
  papiDeleteUmOrder(params?: {}): Promise<implicitReturnType>;
707
708
  papiDeleteUmConditionalOrder(params?: {}): Promise<implicitReturnType>;
package/js/src/binance.js CHANGED
@@ -1094,7 +1094,8 @@ export default class binance extends Exchange {
1094
1094
  'repay-futures-negative-balance': 150,
1095
1095
  'listenKey': 1,
1096
1096
  'asset-collection': 3,
1097
- 'margin/repay-debt': 0.4, // Weight(Order): 0.4 => (1000 / (50 * 0.4)) * 60 = 3000
1097
+ 'margin/repay-debt': 0.4,
1098
+ 'um/feeBurn': 1,
1098
1099
  },
1099
1100
  'put': {
1100
1101
  'listenKey': 1, // 1
package/js/src/bitget.js CHANGED
@@ -1416,7 +1416,7 @@ export default class bitget extends Exchange {
1416
1416
  },
1417
1417
  'sandboxMode': false,
1418
1418
  'networks': {
1419
- 'TRX': 'TRC20',
1419
+ 'TRC20': 'TRC20',
1420
1420
  'ERC20': 'ERC20',
1421
1421
  'BEP20': 'BSC',
1422
1422
  'ARB': 'ArbitrumOne',
package/js/src/htx.js CHANGED
@@ -1221,6 +1221,7 @@ export default class htx extends Exchange {
1221
1221
  // https://github.com/ccxt/ccxt/issues/6081
1222
1222
  // https://github.com/ccxt/ccxt/issues/3365
1223
1223
  // https://github.com/ccxt/ccxt/issues/2873
1224
+ 'NGL': 'GFNGL',
1224
1225
  'GET': 'THEMIS',
1225
1226
  'GTC': 'GAMECOM',
1226
1227
  'HIT': 'HITCHAIN',
@@ -1231,7 +1232,8 @@ export default class htx extends Exchange {
1231
1232
  'PNT': 'PENTA',
1232
1233
  'SBTC': 'SUPERBITCOIN',
1233
1234
  'SOUL': 'SOULSAVER',
1234
- 'BIFI': 'BITCOINFILE', // conflict with Beefy.Finance https://github.com/ccxt/ccxt/issues/8706
1235
+ 'BIFI': 'BITCOINFILE',
1236
+ 'FUD': 'FTX Users\' Debt',
1235
1237
  },
1236
1238
  });
1237
1239
  }
@@ -7509,6 +7511,10 @@ export default class htx extends Exchange {
7509
7511
  * @method
7510
7512
  * @name htx#setLeverage
7511
7513
  * @description set the level of leverage for a market
7514
+ * @see https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-switch-leverage
7515
+ * @see https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-switch-leverage
7516
+ * @see https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#switch-leverage
7517
+ * @see https://huobiapi.github.io/docs/dm/v1/en/#switch-leverage // Coin-m futures
7512
7518
  * @param {float} leverage the rate of leverage
7513
7519
  * @param {string} symbol unified market symbol
7514
7520
  * @param {object} [params] extra parameters specific to the exchange API endpoint