ccxt 4.3.60 → 4.3.61

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
@@ -191,7 +191,7 @@ var xt$1 = require('./src/pro/xt.js');
191
191
 
192
192
  //-----------------------------------------------------------------------------
193
193
  // this is updated by vss.js when building
194
- const version = '4.3.60';
194
+ const version = '4.3.61';
195
195
  Exchange["default"].ccxtVersion = version;
196
196
  const exchanges = {
197
197
  'ace': ace,
@@ -4343,6 +4343,11 @@ class bybit extends bybit$1 {
4343
4343
  }
4344
4344
  await this.loadMarkets();
4345
4345
  const market = this.market(symbol);
4346
+ const types = await this.isUnifiedEnabled();
4347
+ const enableUnifiedAccount = types[1];
4348
+ if (!enableUnifiedAccount) {
4349
+ throw new errors.NotSupported(this.id + ' cancelOrders() supports UTA accounts only');
4350
+ }
4346
4351
  let category = undefined;
4347
4352
  [category, params] = this.getBybitType('cancelOrders', market, params);
4348
4353
  if (category === 'inverse') {
@@ -4451,6 +4456,11 @@ class bybit extends bybit$1 {
4451
4456
  * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
4452
4457
  */
4453
4458
  await this.loadMarkets();
4459
+ const types = await this.isUnifiedEnabled();
4460
+ const enableUnifiedAccount = types[1];
4461
+ if (!enableUnifiedAccount) {
4462
+ throw new errors.NotSupported(this.id + ' cancelOrdersForSymbols() supports UTA accounts only');
4463
+ }
4454
4464
  const ordersRequests = [];
4455
4465
  let category = undefined;
4456
4466
  for (let i = 0; i < orders.length; i++) {
@@ -248,8 +248,16 @@ class hyperliquid extends hyperliquid$1 {
248
248
  'withdraw': undefined,
249
249
  'networks': undefined,
250
250
  'fee': undefined,
251
- // 'fees': fees,
252
- 'limits': undefined,
251
+ 'limits': {
252
+ 'amount': {
253
+ 'min': undefined,
254
+ 'max': undefined,
255
+ },
256
+ 'withdraw': {
257
+ 'min': undefined,
258
+ 'max': undefined,
259
+ },
260
+ },
253
261
  };
254
262
  }
255
263
  return result;
@@ -5232,9 +5232,10 @@ class mexc extends mexc$1 {
5232
5232
  * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
5233
5233
  */
5234
5234
  [tag, params] = this.handleWithdrawTagAndParams(tag, params);
5235
- const networks = this.safeValue(this.options, 'networks', {});
5235
+ const networks = this.safeDict(this.options, 'networks', {});
5236
5236
  let network = this.safeString2(params, 'network', 'netWork'); // this line allows the user to specify either ERC20 or ETH
5237
5237
  network = this.safeString(networks, network, network); // handle ETH > ERC-20 alias
5238
+ network = this.networkCodeToId(network);
5238
5239
  this.checkAddress(address);
5239
5240
  await this.loadMarkets();
5240
5241
  const currency = this.currency(code);
@@ -991,9 +991,8 @@ class kucoin extends kucoin$1 {
991
991
  */
992
992
  await this.loadMarkets();
993
993
  const url = await this.negotiate(true);
994
- const options = this.safeDict(this.options, 'watchMyTrades');
995
- const defaultMethod = this.safeString(params, 'method', '/spotMarket/tradeOrders');
996
- const topic = (defaultMethod !== undefined) ? defaultMethod : this.safeString(options, 'method');
994
+ let topic = undefined;
995
+ [topic, params] = this.handleOptionAndParams(params, 'watchMyTrades', 'method', '/spotMarket/tradeOrders');
997
996
  const request = {
998
997
  'privateChannel': true,
999
998
  };
@@ -396,7 +396,16 @@ class vertex extends vertex$1 {
396
396
  'withdraw': this.safeBool(data, 'can_withdraw'),
397
397
  'networks': undefined,
398
398
  'fee': undefined,
399
- 'limits': undefined,
399
+ 'limits': {
400
+ 'amount': {
401
+ 'min': undefined,
402
+ 'max': undefined,
403
+ },
404
+ 'withdraw': {
405
+ 'min': undefined,
406
+ 'max': undefined,
407
+ },
408
+ },
400
409
  };
401
410
  }
402
411
  return result;
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, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, TransferEntries, LeverageTiers } from './src/base/types.js';
6
6
  import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, BadResponse, NullResponse, CancelPending } from './src/base/errors.js';
7
- declare const version = "4.3.59";
7
+ declare const version = "4.3.60";
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, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, BadResponse, NullResponse, CancelPending } from './src/base/errors.js';
39
39
  //-----------------------------------------------------------------------------
40
40
  // this is updated by vss.js when building
41
- const version = '4.3.60';
41
+ const version = '4.3.61';
42
42
  Exchange.ccxtVersion = version;
43
43
  //-----------------------------------------------------------------------------
44
44
  import ace from './src/ace.js';
package/js/src/bybit.js CHANGED
@@ -4346,6 +4346,11 @@ export default class bybit extends Exchange {
4346
4346
  }
4347
4347
  await this.loadMarkets();
4348
4348
  const market = this.market(symbol);
4349
+ const types = await this.isUnifiedEnabled();
4350
+ const enableUnifiedAccount = types[1];
4351
+ if (!enableUnifiedAccount) {
4352
+ throw new NotSupported(this.id + ' cancelOrders() supports UTA accounts only');
4353
+ }
4349
4354
  let category = undefined;
4350
4355
  [category, params] = this.getBybitType('cancelOrders', market, params);
4351
4356
  if (category === 'inverse') {
@@ -4454,6 +4459,11 @@ export default class bybit extends Exchange {
4454
4459
  * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
4455
4460
  */
4456
4461
  await this.loadMarkets();
4462
+ const types = await this.isUnifiedEnabled();
4463
+ const enableUnifiedAccount = types[1];
4464
+ if (!enableUnifiedAccount) {
4465
+ throw new NotSupported(this.id + ' cancelOrdersForSymbols() supports UTA accounts only');
4466
+ }
4457
4467
  const ordersRequests = [];
4458
4468
  let category = undefined;
4459
4469
  for (let i = 0; i < orders.length; i++) {
@@ -251,8 +251,16 @@ export default class hyperliquid extends Exchange {
251
251
  'withdraw': undefined,
252
252
  'networks': undefined,
253
253
  'fee': undefined,
254
- // 'fees': fees,
255
- 'limits': undefined,
254
+ 'limits': {
255
+ 'amount': {
256
+ 'min': undefined,
257
+ 'max': undefined,
258
+ },
259
+ 'withdraw': {
260
+ 'min': undefined,
261
+ 'max': undefined,
262
+ },
263
+ },
256
264
  };
257
265
  }
258
266
  return result;
package/js/src/mexc.js CHANGED
@@ -5236,9 +5236,10 @@ export default class mexc extends Exchange {
5236
5236
  * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
5237
5237
  */
5238
5238
  [tag, params] = this.handleWithdrawTagAndParams(tag, params);
5239
- const networks = this.safeValue(this.options, 'networks', {});
5239
+ const networks = this.safeDict(this.options, 'networks', {});
5240
5240
  let network = this.safeString2(params, 'network', 'netWork'); // this line allows the user to specify either ERC20 or ETH
5241
5241
  network = this.safeString(networks, network, network); // handle ETH > ERC-20 alias
5242
+ network = this.networkCodeToId(network);
5242
5243
  this.checkAddress(address);
5243
5244
  await this.loadMarkets();
5244
5245
  const currency = this.currency(code);
@@ -994,9 +994,8 @@ export default class kucoin extends kucoinRest {
994
994
  */
995
995
  await this.loadMarkets();
996
996
  const url = await this.negotiate(true);
997
- const options = this.safeDict(this.options, 'watchMyTrades');
998
- const defaultMethod = this.safeString(params, 'method', '/spotMarket/tradeOrders');
999
- const topic = (defaultMethod !== undefined) ? defaultMethod : this.safeString(options, 'method');
997
+ let topic = undefined;
998
+ [topic, params] = this.handleOptionAndParams(params, 'watchMyTrades', 'method', '/spotMarket/tradeOrders');
1000
999
  const request = {
1001
1000
  'privateChannel': true,
1002
1001
  };
package/js/src/vertex.js CHANGED
@@ -399,7 +399,16 @@ export default class vertex extends Exchange {
399
399
  'withdraw': this.safeBool(data, 'can_withdraw'),
400
400
  'networks': undefined,
401
401
  'fee': undefined,
402
- 'limits': undefined,
402
+ 'limits': {
403
+ 'amount': {
404
+ 'min': undefined,
405
+ 'max': undefined,
406
+ },
407
+ 'withdraw': {
408
+ 'min': undefined,
409
+ 'max': undefined,
410
+ },
411
+ },
403
412
  };
404
413
  }
405
414
  return result;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.3.60",
3
+ "version": "4.3.61",
4
4
  "description": "A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges",
5
5
  "unpkg": "dist/ccxt.browser.min.js",
6
6
  "type": "module",