ccxt 4.1.48 → 4.1.49

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.
@@ -89534,8 +89534,8 @@ class coincheck extends _abstract_coincheck_js__WEBPACK_IMPORTED_MODULE_0__/* ["
89534
89534
  /* harmony export */ "Z": () => (/* binding */ coinex)
89535
89535
  /* harmony export */ });
89536
89536
  /* harmony import */ var _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8519);
89537
- /* harmony import */ var _base_errors_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6689);
89538
- /* harmony import */ var _base_Precise_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2194);
89537
+ /* harmony import */ var _base_errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6689);
89538
+ /* harmony import */ var _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2194);
89539
89539
  /* harmony import */ var _base_functions_number_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9292);
89540
89540
  /* harmony import */ var _static_dependencies_noble_hashes_sha256_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1372);
89541
89541
  /* harmony import */ var _static_dependencies_noble_hashes_md5_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7311);
@@ -89821,6 +89821,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
89821
89821
  },
89822
89822
  },
89823
89823
  'options': {
89824
+ 'brokerId': 'x-167673045',
89824
89825
  'createMarketBuyOrderRequiresPrice': true,
89825
89826
  'defaultType': 'spot',
89826
89827
  'defaultSubType': 'linear',
@@ -89840,6 +89841,26 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
89840
89841
  'ACM': 'Actinium',
89841
89842
  },
89842
89843
  'precisionMode': _base_functions_number_js__WEBPACK_IMPORTED_MODULE_1__/* .TICK_SIZE */ .sh,
89844
+ 'exceptions': {
89845
+ 'exact': {
89846
+ // https://github.com/coinexcom/coinex_exchange_api/wiki/013error_code
89847
+ '23': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.PermissionDenied,
89848
+ '24': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.AuthenticationError,
89849
+ '25': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.AuthenticationError,
89850
+ '34': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.AuthenticationError,
89851
+ '35': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeNotAvailable,
89852
+ '36': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.RequestTimeout,
89853
+ '213': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.RateLimitExceeded,
89854
+ '107': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InsufficientFunds,
89855
+ '600': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.OrderNotFound,
89856
+ '601': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder,
89857
+ '602': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder,
89858
+ '606': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder,
89859
+ },
89860
+ 'broad': {
89861
+ 'ip not allow visit': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.PermissionDenied,
89862
+ },
89863
+ },
89843
89864
  });
89844
89865
  }
89845
89866
  async fetchCurrencies(params = {}) {
@@ -89912,7 +89933,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
89912
89933
  }
89913
89934
  let minFeeString = this.safeString(result[code], 'fee');
89914
89935
  if (feeString !== undefined) {
89915
- minFeeString = (minFeeString === undefined) ? feeString : _base_Precise_js__WEBPACK_IMPORTED_MODULE_2__/* .Precise.stringMin */ .O.stringMin(feeString, minFeeString);
89936
+ minFeeString = (minFeeString === undefined) ? feeString : _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise.stringMin */ .O.stringMin(feeString, minFeeString);
89916
89937
  }
89917
89938
  let depositAvailable = this.safeValue(result[code], 'deposit');
89918
89939
  depositAvailable = (canDeposit) ? canDeposit : depositAvailable;
@@ -89920,15 +89941,15 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
89920
89941
  withdrawAvailable = (canWithdraw) ? canWithdraw : withdrawAvailable;
89921
89942
  let minDepositString = this.safeString(result[code]['limits']['deposit'], 'min');
89922
89943
  if (minNetworkDepositString !== undefined) {
89923
- minDepositString = (minDepositString === undefined) ? minNetworkDepositString : _base_Precise_js__WEBPACK_IMPORTED_MODULE_2__/* .Precise.stringMin */ .O.stringMin(minNetworkDepositString, minDepositString);
89944
+ minDepositString = (minDepositString === undefined) ? minNetworkDepositString : _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise.stringMin */ .O.stringMin(minNetworkDepositString, minDepositString);
89924
89945
  }
89925
89946
  let minWithdrawString = this.safeString(result[code]['limits']['withdraw'], 'min');
89926
89947
  if (minNetworkWithdrawString !== undefined) {
89927
- minWithdrawString = (minWithdrawString === undefined) ? minNetworkWithdrawString : _base_Precise_js__WEBPACK_IMPORTED_MODULE_2__/* .Precise.stringMin */ .O.stringMin(minNetworkWithdrawString, minWithdrawString);
89948
+ minWithdrawString = (minWithdrawString === undefined) ? minNetworkWithdrawString : _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise.stringMin */ .O.stringMin(minNetworkWithdrawString, minWithdrawString);
89928
89949
  }
89929
89950
  let minPrecisionString = this.safeString(result[code], 'precision');
89930
89951
  if (precisionString !== undefined) {
89931
- minPrecisionString = (minPrecisionString === undefined) ? precisionString : _base_Precise_js__WEBPACK_IMPORTED_MODULE_2__/* .Precise.stringMin */ .O.stringMin(precisionString, minPrecisionString);
89952
+ minPrecisionString = (minPrecisionString === undefined) ? precisionString : _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise.stringMin */ .O.stringMin(precisionString, minPrecisionString);
89932
89953
  }
89933
89954
  const networks = this.safeValue(result[code], 'networks', {});
89934
89955
  const network = {
@@ -90834,7 +90855,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
90834
90855
  marketId = market['id'];
90835
90856
  }
90836
90857
  else if (marketId === undefined) {
90837
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.ArgumentsRequired(this.id + ' fetchMarginBalance() fetching a margin account requires a market parameter or a symbol parameter');
90858
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' fetchMarginBalance() fetching a margin account requires a market parameter or a symbol parameter');
90838
90859
  }
90839
90860
  params = this.omit(params, ['symbol', 'market']);
90840
90861
  const request = {
@@ -90890,7 +90911,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
90890
90911
  sellAccount['total'] = this.safeString(total, 'sell_type');
90891
90912
  const sellDebt = this.safeString(loan, 'sell_type');
90892
90913
  const sellInterest = this.safeString(interest, 'sell_type');
90893
- sellAccount['debt'] = _base_Precise_js__WEBPACK_IMPORTED_MODULE_2__/* .Precise.stringAdd */ .O.stringAdd(sellDebt, sellInterest);
90914
+ sellAccount['debt'] = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise.stringAdd */ .O.stringAdd(sellDebt, sellInterest);
90894
90915
  result[sellCurrencyCode] = sellAccount;
90895
90916
  //
90896
90917
  const buyAccount = this.account();
@@ -90900,7 +90921,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
90900
90921
  buyAccount['total'] = this.safeString(total, 'buy_type');
90901
90922
  const buyDebt = this.safeString(loan, 'buy_type');
90902
90923
  const buyInterest = this.safeString(interest, 'buy_type');
90903
- buyAccount['debt'] = _base_Precise_js__WEBPACK_IMPORTED_MODULE_2__/* .Precise.stringAdd */ .O.stringAdd(buyDebt, buyInterest);
90924
+ buyAccount['debt'] = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise.stringAdd */ .O.stringAdd(buyDebt, buyInterest);
90904
90925
  result[buyCurrencyCode] = buyAccount;
90905
90926
  //
90906
90927
  return this.safeBalance(result);
@@ -91009,7 +91030,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
91009
91030
  account['free'] = this.safeString(balance, 'available');
91010
91031
  const frozen = this.safeString(balance, 'frozen');
91011
91032
  const locked = this.safeString(balance, 'lock');
91012
- account['used'] = _base_Precise_js__WEBPACK_IMPORTED_MODULE_2__/* .Precise.stringAdd */ .O.stringAdd(frozen, locked);
91033
+ account['used'] = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise.stringAdd */ .O.stringAdd(frozen, locked);
91013
91034
  result[code] = account;
91014
91035
  }
91015
91036
  return this.safeBalance(result);
@@ -91077,6 +91098,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
91077
91098
  // "status": "done",
91078
91099
  // "taker_fee_rate": "0.0005",
91079
91100
  // "type": "sell",
91101
+ // "client_id": "",
91080
91102
  // }
91081
91103
  //
91082
91104
  // Spot and Margin createOrder, cancelOrder, fetchOrder
@@ -91104,6 +91126,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
91104
91126
  // "stock_fee":"0",
91105
91127
  // "taker_fee_rate":"0.002",
91106
91128
  // "type":"buy"
91129
+ // "client_id": "",
91107
91130
  // }
91108
91131
  //
91109
91132
  // Swap createOrder, cancelOrder, fetchOrder
@@ -91319,9 +91342,13 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
91319
91342
  else {
91320
91343
  type = rawType;
91321
91344
  }
91345
+ let clientOrderId = this.safeString(order, 'client_id');
91346
+ if (clientOrderId === '') {
91347
+ clientOrderId = undefined;
91348
+ }
91322
91349
  return this.safeOrder({
91323
91350
  'id': this.safeString2(order, 'id', 'order_id'),
91324
- 'clientOrderId': undefined,
91351
+ 'clientOrderId': clientOrderId,
91325
91352
  'datetime': this.iso8601(timestamp),
91326
91353
  'timestamp': timestamp,
91327
91354
  'lastTradeTimestamp': this.safeTimestamp(order, 'update_time'),
@@ -91378,6 +91405,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
91378
91405
  await this.loadMarkets();
91379
91406
  const market = this.market(symbol);
91380
91407
  const swap = market['swap'];
91408
+ const clientOrderId = this.safeString2(params, 'client_id', 'clientOrderId');
91381
91409
  const stopPrice = this.safeValue2(params, 'stopPrice', 'triggerPrice');
91382
91410
  const stopLossPrice = this.safeValue(params, 'stopLossPrice');
91383
91411
  const takeProfitPrice = this.safeValue(params, 'takeProfitPrice');
@@ -91389,21 +91417,29 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
91389
91417
  const reduceOnly = this.safeValue(params, 'reduceOnly');
91390
91418
  if (reduceOnly) {
91391
91419
  if (market['type'] !== 'swap') {
91392
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.InvalidOrder(this.id + ' createOrder() does not support reduceOnly for ' + market['type'] + ' orders, reduceOnly orders are supported for swap markets only');
91420
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder(this.id + ' createOrder() does not support reduceOnly for ' + market['type'] + ' orders, reduceOnly orders are supported for swap markets only');
91393
91421
  }
91394
91422
  if (positionId === undefined) {
91395
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.ArgumentsRequired(this.id + ' createOrder() requires a position_id/positionId parameter for reduceOnly orders');
91423
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' createOrder() requires a position_id/positionId parameter for reduceOnly orders');
91396
91424
  }
91397
91425
  }
91398
91426
  let method = undefined;
91399
91427
  const request = {
91400
91428
  'market': market['id'],
91401
91429
  };
91430
+ if (clientOrderId === undefined) {
91431
+ const defaultId = 'x-167673045';
91432
+ const brokerId = this.safeString(this.options, 'brokerId', defaultId);
91433
+ request['client_id'] = brokerId + '-' + this.uuid16();
91434
+ }
91435
+ else {
91436
+ request['client_id'] = clientOrderId;
91437
+ }
91402
91438
  if (swap) {
91403
91439
  if (stopLossPrice || takeProfitPrice) {
91404
91440
  request['stop_type'] = this.safeInteger(params, 'stop_type', 1); // 1: triggered by the latest transaction, 2: mark price, 3: index price
91405
91441
  if (positionId === undefined) {
91406
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.ArgumentsRequired(this.id + ' createOrder() requires a position_id parameter for stop loss and take profit orders');
91442
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' createOrder() requires a position_id parameter for stop loss and take profit orders');
91407
91443
  }
91408
91444
  request['position_id'] = positionId;
91409
91445
  if (stopLossPrice) {
@@ -91479,12 +91515,12 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
91479
91515
  if ((type === 'market') && (side === 'buy')) {
91480
91516
  if (this.options['createMarketBuyOrderRequiresPrice']) {
91481
91517
  if (price === undefined) {
91482
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.InvalidOrder(this.id + " createOrder() requires the price argument with market buy orders to calculate total order cost (amount to spend), where cost = amount * price. Supply a price argument to createOrder() call if you want the cost to be calculated for you from price and amount, or, alternatively, add .options['createMarketBuyOrderRequiresPrice'] = false to supply the cost in the amount argument (the exchange-specific behaviour)");
91518
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder(this.id + " createOrder() requires the price argument with market buy orders to calculate total order cost (amount to spend), where cost = amount * price. Supply a price argument to createOrder() call if you want the cost to be calculated for you from price and amount, or, alternatively, add .options['createMarketBuyOrderRequiresPrice'] = false to supply the cost in the amount argument (the exchange-specific behaviour)");
91483
91519
  }
91484
91520
  else {
91485
91521
  const amountString = this.amountToPrecision(symbol, amount);
91486
91522
  const priceString = this.priceToPrecision(symbol, price);
91487
- const costString = _base_Precise_js__WEBPACK_IMPORTED_MODULE_2__/* .Precise.stringMul */ .O.stringMul(amountString, priceString);
91523
+ const costString = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise.stringMul */ .O.stringMul(amountString, priceString);
91488
91524
  const costNumber = this.parseNumber(costString);
91489
91525
  request['amount'] = this.costToPrecision(symbol, costNumber);
91490
91526
  }
@@ -91512,7 +91548,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
91512
91548
  // following options cannot be applied to vanilla market orders (but can be applied to stop-market orders)
91513
91549
  if ((timeInForceRaw !== undefined) || postOnly) {
91514
91550
  if ((postOnly || (timeInForceRaw !== 'IOC')) && ((type === 'limit') && (stopPrice !== undefined))) {
91515
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.InvalidOrder(this.id + ' createOrder() only supports the IOC option for stop-limit orders');
91551
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder(this.id + ' createOrder() only supports the IOC option for stop-limit orders');
91516
91552
  }
91517
91553
  if (postOnly) {
91518
91554
  request['option'] = 'MAKER_ONLY';
@@ -91529,7 +91565,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
91529
91565
  const defaultType = this.safeString(this.options, 'defaultType');
91530
91566
  if (defaultType === 'margin') {
91531
91567
  if (accountId === undefined) {
91532
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.BadRequest(this.id + ' createOrder() requires an account_id parameter for margin orders');
91568
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadRequest(this.id + ' createOrder() requires an account_id parameter for margin orders');
91533
91569
  }
91534
91570
  request['account_id'] = accountId;
91535
91571
  }
@@ -91634,7 +91670,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
91634
91670
  await this.loadMarkets();
91635
91671
  const market = this.market(symbol);
91636
91672
  if (!market['spot']) {
91637
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' editOrder() does not support ' + market['type'] + ' orders, only spot orders are accepted');
91673
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.NotSupported(this.id + ' editOrder() does not support ' + market['type'] + ' orders, only spot orders are accepted');
91638
91674
  }
91639
91675
  const request = {
91640
91676
  'market': market['id'],
@@ -91713,7 +91749,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
91713
91749
  const defaultType = this.safeString(this.options, 'defaultType');
91714
91750
  if (defaultType === 'margin') {
91715
91751
  if (accountId === undefined) {
91716
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.BadRequest(this.id + ' cancelOrder() requires an account_id parameter for margin orders');
91752
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadRequest(this.id + ' cancelOrder() requires an account_id parameter for margin orders');
91717
91753
  }
91718
91754
  request['account_id'] = accountId;
91719
91755
  }
@@ -92028,7 +92064,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
92028
92064
  let method = undefined;
92029
92065
  if (marketType === 'swap') {
92030
92066
  if (symbol === undefined) {
92031
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.ArgumentsRequired(this.id + ' fetchOrdersByStatus() requires a symbol argument for swap markets');
92067
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' fetchOrdersByStatus() requires a symbol argument for swap markets');
92032
92068
  }
92033
92069
  method = 'perpetualPrivateGetOrder' + this.capitalize(status);
92034
92070
  if (stop) {
@@ -92053,7 +92089,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
92053
92089
  const defaultType = this.safeString(this.options, 'defaultType');
92054
92090
  if (defaultType === 'margin') {
92055
92091
  if (accountId === undefined) {
92056
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.BadRequest(this.id + ' fetchOpenOrders() and fetchClosedOrders() require an account_id parameter for margin orders');
92092
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadRequest(this.id + ' fetchOpenOrders() and fetchClosedOrders() require an account_id parameter for margin orders');
92057
92093
  }
92058
92094
  request['account_id'] = accountId;
92059
92095
  }
@@ -92293,10 +92329,10 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
92293
92329
  const numOfNetworks = networksKeys.length;
92294
92330
  if (networks !== undefined && numOfNetworks > 1) {
92295
92331
  if (network === undefined) {
92296
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.ArgumentsRequired(this.id + ' fetchDepositAddress() ' + code + ' requires a network parameter');
92332
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' fetchDepositAddress() ' + code + ' requires a network parameter');
92297
92333
  }
92298
92334
  if (!(network in networks)) {
92299
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.ExchangeError(this.id + ' fetchDepositAddress() ' + network + ' network not supported for ' + code);
92335
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeError(this.id + ' fetchDepositAddress() ' + network + ' network not supported for ' + code);
92300
92336
  }
92301
92337
  }
92302
92338
  if (network !== undefined) {
@@ -92397,7 +92433,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
92397
92433
  let type = undefined;
92398
92434
  [type, params] = this.handleMarketTypeAndParams('fetchMyTrades', market, params);
92399
92435
  if (type !== 'spot' && symbol === undefined) {
92400
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol argument for non-spot markets');
92436
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol argument for non-spot markets');
92401
92437
  }
92402
92438
  const swap = (type === 'swap');
92403
92439
  let method = undefined;
@@ -92405,7 +92441,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
92405
92441
  method = 'perpetualPublicGetMarketUserDeals';
92406
92442
  const side = this.safeInteger(params, 'side');
92407
92443
  if (side === undefined) {
92408
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.ArgumentsRequired(this.id + ' fetchMyTrades() requires a side parameter for swap markets');
92444
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' fetchMyTrades() requires a side parameter for swap markets');
92409
92445
  }
92410
92446
  if (since !== undefined) {
92411
92447
  request['start_time'] = since;
@@ -92421,7 +92457,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
92421
92457
  const defaultType = this.safeString(this.options, 'defaultType');
92422
92458
  if (defaultType === 'margin') {
92423
92459
  if (accountId === undefined) {
92424
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.BadRequest(this.id + ' fetchMyTrades() requires an account_id parameter for margin trades');
92460
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadRequest(this.id + ' fetchMyTrades() requires an account_id parameter for margin trades');
92425
92461
  }
92426
92462
  request['account_id'] = accountId;
92427
92463
  params = this.omit(params, 'account_id');
@@ -92522,7 +92558,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
92522
92558
  if (Array.isArray(symbols)) {
92523
92559
  const symbolsLength = symbols.length;
92524
92560
  if (symbolsLength > 1) {
92525
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.BadRequest(this.id + ' fetchPositions() symbols argument cannot contain more than 1 symbol');
92561
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadRequest(this.id + ' fetchPositions() symbols argument cannot contain more than 1 symbol');
92526
92562
  }
92527
92563
  symbol = symbols[0];
92528
92564
  }
@@ -92791,12 +92827,12 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
92791
92827
  this.checkRequiredSymbol('setMarginMode', symbol);
92792
92828
  marginMode = marginMode.toLowerCase();
92793
92829
  if (marginMode !== 'isolated' && marginMode !== 'cross') {
92794
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.BadRequest(this.id + ' setMarginMode() marginMode argument should be isolated or cross');
92830
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadRequest(this.id + ' setMarginMode() marginMode argument should be isolated or cross');
92795
92831
  }
92796
92832
  await this.loadMarkets();
92797
92833
  const market = this.market(symbol);
92798
92834
  if (market['type'] !== 'swap') {
92799
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.BadSymbol(this.id + ' setMarginMode() supports swap contracts only');
92835
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadSymbol(this.id + ' setMarginMode() supports swap contracts only');
92800
92836
  }
92801
92837
  let defaultPositionType = undefined;
92802
92838
  if (marginMode === 'isolated') {
@@ -92809,13 +92845,13 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
92809
92845
  const maxLeverage = this.safeInteger(market['limits']['leverage'], 'max', 100);
92810
92846
  const positionType = this.safeInteger(params, 'position_type', defaultPositionType);
92811
92847
  if (leverage === undefined) {
92812
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.ArgumentsRequired(this.id + ' setMarginMode() requires a leverage parameter');
92848
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' setMarginMode() requires a leverage parameter');
92813
92849
  }
92814
92850
  if (positionType === undefined) {
92815
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.ArgumentsRequired(this.id + ' setMarginMode() requires a position_type parameter that will transfer margin to the specified trading pair');
92851
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' setMarginMode() requires a position_type parameter that will transfer margin to the specified trading pair');
92816
92852
  }
92817
92853
  if ((leverage < 3) || (leverage > maxLeverage)) {
92818
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.BadRequest(this.id + ' setMarginMode() leverage should be between 3 and ' + maxLeverage.toString() + ' for ' + symbol);
92854
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadRequest(this.id + ' setMarginMode() leverage should be between 3 and ' + maxLeverage.toString() + ' for ' + symbol);
92819
92855
  }
92820
92856
  const request = {
92821
92857
  'market': market['id'],
@@ -92840,7 +92876,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
92840
92876
  await this.loadMarkets();
92841
92877
  const market = this.market(symbol);
92842
92878
  if (!market['swap']) {
92843
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.BadSymbol(this.id + ' setLeverage() supports swap contracts only');
92879
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadSymbol(this.id + ' setLeverage() supports swap contracts only');
92844
92880
  }
92845
92881
  let marginMode = undefined;
92846
92882
  [marginMode, params] = this.handleMarginModeAndParams('setLeverage', params, 'cross');
@@ -92854,7 +92890,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
92854
92890
  const minLeverage = this.safeInteger(market['limits']['leverage'], 'min', 1);
92855
92891
  const maxLeverage = this.safeInteger(market['limits']['leverage'], 'max', 100);
92856
92892
  if ((leverage < minLeverage) || (leverage > maxLeverage)) {
92857
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.BadRequest(this.id + ' setLeverage() leverage should be between ' + minLeverage.toString() + ' and ' + maxLeverage.toString() + ' for ' + symbol);
92893
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadRequest(this.id + ' setLeverage() leverage should be between ' + minLeverage.toString() + ' and ' + maxLeverage.toString() + ' for ' + symbol);
92858
92894
  }
92859
92895
  const request = {
92860
92896
  'market': market['id'],
@@ -93136,7 +93172,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
93136
93172
  await this.loadMarkets();
93137
93173
  const market = this.market(symbol);
93138
93174
  if (!market['swap']) {
93139
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.BadSymbol(this.id + ' fetchFundingRate() supports swap contracts only');
93175
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadSymbol(this.id + ' fetchFundingRate() supports swap contracts only');
93140
93176
  }
93141
93177
  const request = {
93142
93178
  'market': market['id'],
@@ -93248,7 +93284,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
93248
93284
  const symbol = this.safeValue(symbols, 0);
93249
93285
  market = this.market(symbol);
93250
93286
  if (!market['swap']) {
93251
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.BadSymbol(this.id + ' fetchFundingRates() supports swap contracts only');
93287
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadSymbol(this.id + ' fetchFundingRates() supports swap contracts only');
93252
93288
  }
93253
93289
  }
93254
93290
  const response = await this.perpetualPublicGetMarketTickerAll(params);
@@ -94074,7 +94110,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
94074
94110
  const timestamp = this.safeTimestamp(info, 'expire_time');
94075
94111
  const unflatAmount = this.safeString(info, 'unflat_amount');
94076
94112
  const loanAmount = this.safeString(info, 'loan_amount');
94077
- let interest = _base_Precise_js__WEBPACK_IMPORTED_MODULE_2__/* .Precise.stringSub */ .O.stringSub(unflatAmount, loanAmount);
94113
+ let interest = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise.stringSub */ .O.stringSub(unflatAmount, loanAmount);
94078
94114
  if (unflatAmount === '0') {
94079
94115
  interest = undefined;
94080
94116
  }
@@ -94300,6 +94336,32 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
94300
94336
  let url = this.urls['api'][api] + '/' + this.version + '/' + path;
94301
94337
  let query = this.omit(params, this.extractParams(path));
94302
94338
  const nonce = this.nonce().toString();
94339
+ if (method === 'POST') {
94340
+ const parts = path.split('/');
94341
+ const firstPart = this.safeString(parts, 0, '');
94342
+ const numParts = parts.length;
94343
+ const lastPart = this.safeString(parts, numParts - 1, '');
94344
+ const lastWords = lastPart.split('_');
94345
+ const numWords = lastWords.length;
94346
+ const lastWord = this.safeString(lastWords, numWords - 1, '');
94347
+ if ((firstPart === 'order') && (lastWord === 'limit' || lastWord === 'market')) {
94348
+ // inject in implicit API calls
94349
+ // POST /order/limit - Place limit orders
94350
+ // POST /order/market - Place market orders
94351
+ // POST /order/stop/limit - Place stop limit orders
94352
+ // POST /order/stop/market - Place stop market orders
94353
+ // POST /perpetual/v1/order/put_limit - Place limit orders
94354
+ // POST /perpetual/v1/order/put_market - Place market orders
94355
+ // POST /perpetual/v1/order/put_stop_limit - Place stop limit orders
94356
+ // POST /perpetual/v1/order/put_stop_market - Place stop market orders
94357
+ const clientOrderId = this.safeString(params, 'client_id');
94358
+ if (clientOrderId === undefined) {
94359
+ const defaultId = 'x-167673045';
94360
+ const brokerId = this.safeValue(this.options, 'brokerId', defaultId);
94361
+ query['client_id'] = brokerId + '_' + this.uuid16();
94362
+ }
94363
+ }
94364
+ }
94303
94365
  if (api === 'perpetualPrivate' || url === 'https://api.coinex.com/perpetual/v1/market/user_deals') {
94304
94366
  this.checkRequiredCredentials();
94305
94367
  query = this.extend({
@@ -94356,23 +94418,10 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
94356
94418
  const data = this.safeValue(response, 'data');
94357
94419
  const message = this.safeString(response, 'message');
94358
94420
  if ((code !== '0') || ((message !== 'Success') && (message !== 'Succeeded') && (message !== 'Ok') && !data)) {
94359
- const responseCodes = {
94360
- // https://github.com/coinexcom/coinex_exchange_api/wiki/013error_code
94361
- '23': _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.PermissionDenied,
94362
- '24': _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.AuthenticationError,
94363
- '25': _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.AuthenticationError,
94364
- '34': _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.AuthenticationError,
94365
- '35': _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.ExchangeNotAvailable,
94366
- '36': _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.RequestTimeout,
94367
- '213': _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.RateLimitExceeded,
94368
- '107': _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.InsufficientFunds,
94369
- '600': _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.OrderNotFound,
94370
- '601': _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.InvalidOrder,
94371
- '602': _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.InvalidOrder,
94372
- '606': _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.InvalidOrder,
94373
- };
94374
- const ErrorClass = this.safeValue(responseCodes, code, _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.ExchangeError);
94375
- throw new ErrorClass(response['message']);
94421
+ const feedback = this.id + ' ' + message;
94422
+ this.throwBroadlyMatchedException(this.exceptions['broad'], message, feedback);
94423
+ this.throwExactlyMatchedException(this.exceptions['exact'], code, feedback);
94424
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeError(feedback);
94376
94425
  }
94377
94426
  return undefined;
94378
94427
  }
@@ -171125,8 +171174,8 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
171125
171174
  },
171126
171175
  'www': 'https://www.mexc.com/',
171127
171176
  'doc': [
171128
- 'https://mxcdevelop.github.io/apidocs/spot_v3_en/',
171129
- 'https://mxcdevelop.github.io/APIDoc/', // v1 & v2 : soon to be deprecated
171177
+ 'https://mexcdevelop.github.io/apidocs/spot_v3_en/',
171178
+ 'https://mexcdevelop.github.io/APIDoc/', // v1 & v2 : soon to be deprecated
171130
171179
  ],
171131
171180
  'fees': [
171132
171181
  'https://www.mexc.com/fee',
@@ -171878,7 +171927,7 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
171878
171927
  * @method
171879
171928
  * @name mexc3#fetchCurrencies
171880
171929
  * @description fetches all available currencies on an exchange
171881
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
171930
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
171882
171931
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
171883
171932
  * @returns {object} an associative dictionary of currencies
171884
171933
  */
@@ -172278,8 +172327,8 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
172278
172327
  /**
172279
172328
  * @method
172280
172329
  * @name mexc3#fetchOrderBook
172281
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#order-book
172282
- * @see https://mxcdevelop.github.io/apidocs/contract_v1_en/#get-the-contract-s-depth-information
172330
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#order-book
172331
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-contract-s-depth-information
172283
172332
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
172284
172333
  * @param {string} symbol unified symbol of the market to fetch the order book for
172285
172334
  * @param {int} [limit] the maximum amount of order book entries to return
@@ -174527,9 +174576,9 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
174527
174576
  * @method
174528
174577
  * @name mexc3#fetchBalance
174529
174578
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
174530
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#account-information
174531
- * @see https://mxcdevelop.github.io/apidocs/contract_v1_en/#get-all-informations-of-user-39-s-asset
174532
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#isolated-account
174579
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#account-information
174580
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-all-informations-of-user-39-s-asset
174581
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#isolated-account
174533
174582
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
174534
174583
  * @param {string} [params.symbols] // required for margin, market id's separated by commas
174535
174584
  * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
@@ -175226,7 +175275,7 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
175226
175275
  * @method
175227
175276
  * @name mexc3#fetchDepositAddressesByNetwork
175228
175277
  * @description fetch a dictionary of addresses for a currency, indexed by network
175229
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
175278
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
175230
175279
  * @param {string} code unified currency code of the currency for the deposit address
175231
175280
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
175232
175281
  * @returns {object} a dictionary of [address structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure} indexed by the network
@@ -175265,7 +175314,7 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
175265
175314
  /**
175266
175315
  * @method
175267
175316
  * @name mexc3#createDepositAddress
175268
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#generate-deposit-address-supporting-network
175317
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#generate-deposit-address-supporting-network
175269
175318
  * @description create a currency deposit address
175270
175319
  * @param {string} code unified currency code of the currency for the deposit address
175271
175320
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
@@ -175306,7 +175355,7 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
175306
175355
  * @method
175307
175356
  * @name mexc3#fetchDepositAddress
175308
175357
  * @description fetch the deposit address for a currency associated with this account
175309
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
175358
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
175310
175359
  * @param {string} code unified currency code
175311
175360
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
175312
175361
  * @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
@@ -175334,7 +175383,7 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
175334
175383
  * @method
175335
175384
  * @name mexc3#fetchDeposits
175336
175385
  * @description fetch all deposits made to an account
175337
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#deposit-history-supporting-network
175386
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-history-supporting-network
175338
175387
  * @param {string} code unified currency code
175339
175388
  * @param {int} [since] the earliest time in ms to fetch deposits for
175340
175389
  * @param {int} [limit] the maximum number of deposits structures to retrieve
@@ -175394,7 +175443,7 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
175394
175443
  * @method
175395
175444
  * @name mexc3#fetchWithdrawals
175396
175445
  * @description fetch all withdrawals made from an account
175397
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#withdraw-history-supporting-network
175446
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#withdraw-history-supporting-network
175398
175447
  * @param {string} code unified currency code
175399
175448
  * @param {int} [since] the earliest time in ms to fetch withdrawals for
175400
175449
  * @param {int} [limit] the maximum number of withdrawals structures to retrieve
@@ -175813,7 +175862,7 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
175813
175862
  * @method
175814
175863
  * @name mexc3#transfer
175815
175864
  * @description transfer currency internally between wallets on the same account
175816
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#user-universal-transfer
175865
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#user-universal-transfer
175817
175866
  * @param {string} code unified currency code
175818
175867
  * @param {float} amount amount to transfer
175819
175868
  * @param {string} fromAccount account to transfer from
@@ -175946,7 +175995,7 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
175946
175995
  * @method
175947
175996
  * @name mexc3#withdraw
175948
175997
  * @description make a withdrawal
175949
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#withdraw
175998
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#withdraw
175950
175999
  * @param {string} code unified currency code
175951
176000
  * @param {float} amount the amount to withdraw
175952
176001
  * @param {string} address the address to withdraw to
@@ -175956,7 +176005,7 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
175956
176005
  */
175957
176006
  [tag, params] = this.handleWithdrawTagAndParams(tag, params);
175958
176007
  const networks = this.safeValue(this.options, 'networks', {});
175959
- let network = this.safeStringUpper2(params, 'network', 'chain'); // this line allows the user to specify either ERC20 or ETH
176008
+ let network = this.safeString2(params, 'network', 'chain'); // this line allows the user to specify either ERC20 or ETH
175960
176009
  network = this.safeString(networks, network, network); // handle ETH > ERC-20 alias
175961
176010
  this.checkAddress(address);
175962
176011
  await this.loadMarkets();
@@ -175971,7 +176020,7 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
175971
176020
  }
175972
176021
  if (network !== undefined) {
175973
176022
  request['network'] = network;
175974
- params = this.omit(params, 'network');
176023
+ params = this.omit(params, ['network', 'chain']);
175975
176024
  }
175976
176025
  const response = await this.spotPrivatePostCapitalWithdrawApply(this.extend(request, params));
175977
176026
  //
@@ -176014,7 +176063,7 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
176014
176063
  * @method
176015
176064
  * @name mexc3#borrowMargin
176016
176065
  * @description create a loan to borrow margin
176017
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#loan
176066
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#loan
176018
176067
  * @param {string} code unified currency code of the currency to borrow
176019
176068
  * @param {float} amount the amount to borrow
176020
176069
  * @param {string} symbol unified market symbol
@@ -176047,7 +176096,7 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
176047
176096
  * @method
176048
176097
  * @name mexc3#repayMargin
176049
176098
  * @description repay borrowed margin and interest
176050
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#repayment
176099
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#repayment
176051
176100
  * @param {string} code unified currency code of the currency to repay
176052
176101
  * @param {float} amount the amount to repay
176053
176102
  * @param {string} symbol unified market symbol
@@ -176086,7 +176135,7 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
176086
176135
  * @method
176087
176136
  * @name mexc3#fetchTransactionFees
176088
176137
  * @description fetch deposit and withdrawal fees
176089
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
176138
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
176090
176139
  * @param {string[]|undefined} codes returns fees for all currencies if undefined
176091
176140
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
176092
176141
  * @returns {object[]} a list of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
@@ -176184,7 +176233,7 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
176184
176233
  * @method
176185
176234
  * @name mexc3#fetchDepositWithdrawFees
176186
176235
  * @description fetch deposit and withdrawal fees
176187
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
176236
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
176188
176237
  * @param {string[]|undefined} codes returns fees for all currencies if undefined
176189
176238
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
176190
176239
  * @returns {object[]} a list of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
@@ -285736,7 +285785,7 @@ SOFTWARE.
285736
285785
 
285737
285786
  //-----------------------------------------------------------------------------
285738
285787
  // this is updated by vss.js when building
285739
- const version = '4.1.48';
285788
+ const version = '4.1.49';
285740
285789
  _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange.ccxtVersion */ .e.ccxtVersion = version;
285741
285790
  //-----------------------------------------------------------------------------
285742
285791