ccxt 4.0.104 → 4.0.105

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/README.md CHANGED
@@ -214,13 +214,13 @@ console.log(version, Object.keys(exchanges));
214
214
 
215
215
  All-in-one browser bundle (dependencies included), served from a CDN of your choice:
216
216
 
217
- * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.0.104/dist/ccxt.browser.js
218
- * unpkg: https://unpkg.com/ccxt@4.0.104/dist/ccxt.browser.js
217
+ * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.0.105/dist/ccxt.browser.js
218
+ * unpkg: https://unpkg.com/ccxt@4.0.105/dist/ccxt.browser.js
219
219
 
220
220
  CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.
221
221
 
222
222
  ```HTML
223
- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.0.104/dist/ccxt.browser.js"></script>
223
+ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.0.105/dist/ccxt.browser.js"></script>
224
224
  ```
225
225
 
226
226
  Creates a global `ccxt` object:
@@ -45874,8 +45874,10 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
45874
45874
  * @name bitmart#cancelAllOrders
45875
45875
  * @description cancel all open orders in a market
45876
45876
  * @see https://developer-pro.bitmart.com/en/spot/#cancel-all-orders
45877
+ * @see https://developer-pro.bitmart.com/en/futures/#cancel-all-orders-signed
45877
45878
  * @param {string} symbol unified market symbol of the market to cancel orders in
45878
45879
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
45880
+ * @param {string} [params.side] *spot only* 'buy' or 'sell'
45879
45881
  * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
45880
45882
  */
45881
45883
  await this.loadMarkets();
@@ -45885,17 +45887,18 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
45885
45887
  market = this.market(symbol);
45886
45888
  request['symbol'] = market['id'];
45887
45889
  }
45890
+ let response = undefined;
45888
45891
  let type = undefined;
45889
45892
  [type, params] = this.handleMarketTypeAndParams('cancelAllOrders', market, params);
45890
- if (type !== 'spot') {
45891
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.NotSupported(this.id + ' cancelAllOrders() does not support ' + type + ' orders, only spot orders are accepted');
45893
+ if (type === 'spot') {
45894
+ response = await this.privatePostSpotV1CancelOrders(this.extend(request, params));
45892
45895
  }
45893
- const side = this.safeString(params, 'side');
45894
- if (side !== undefined) {
45895
- request['side'] = side;
45896
- params = this.omit(params, 'side');
45896
+ else if (type === 'swap') {
45897
+ this.checkRequiredSymbol('cancelAllOrders', symbol);
45898
+ response = await this.privatePostContractPrivateCancelOrders(this.extend(request, params));
45897
45899
  }
45898
- const response = await this.privatePostSpotV1CancelOrders(this.extend(request, params));
45900
+ //
45901
+ // spot
45899
45902
  //
45900
45903
  // {
45901
45904
  // "code": 1000,
@@ -45904,6 +45907,14 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
45904
45907
  // "data": {}
45905
45908
  // }
45906
45909
  //
45910
+ // swap
45911
+ //
45912
+ // {
45913
+ // "code": 1000,
45914
+ // "message": "Ok",
45915
+ // "trace": "7f9c94e10f9d4513bc08a7bfc2a5559a.70.16954131323145323"
45916
+ // }
45917
+ //
45907
45918
  return response;
45908
45919
  }
45909
45920
  async fetchOrdersByStatus(status, symbol = undefined, since = undefined, limit = undefined, params = {}) {
@@ -73769,7 +73780,6 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
73769
73780
  * @param {boolean} [params.isLeverage] *unified spot only* false then spot trading true then margin trading
73770
73781
  * @param {string} [params.tpslMode] *contract only* 'full' or 'partial'
73771
73782
  * @param {string} [params.mmp] *option only* market maker protection
73772
- * @param {int} [params.triggerDirection] *contract only* conditional orders, 1: triggered when market price rises to triggerPrice, 2: triggered when market price falls to triggerPrice
73773
73783
  * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
73774
73784
  */
73775
73785
  await this.loadMarkets();
@@ -73877,6 +73887,7 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
73877
73887
  const isBuy = side === 'buy';
73878
73888
  const ascending = stopLossTriggerPrice ? !isBuy : isBuy;
73879
73889
  if (triggerPrice !== undefined) {
73890
+ request['triggerDirection'] = ascending ? 2 : 1;
73880
73891
  request['triggerPrice'] = this.priceToPrecision(symbol, triggerPrice);
73881
73892
  }
73882
73893
  else if (isStopLossTriggerOrder || isTakeProfitTriggerOrder) {
@@ -145240,6 +145251,11 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
145240
145251
  const rawPrecision = this.safeString(entry, 'precision');
145241
145252
  const precision = this.parseNumber(this.parsePrecision(rawPrecision));
145242
145253
  const chainsLength = chains.length;
145254
+ if (!chainsLength) {
145255
+ // https://t.me/KuCoin_API/173118
145256
+ isWithdrawEnabled = false;
145257
+ isDepositEnabled = false;
145258
+ }
145243
145259
  for (let j = 0; j < chainsLength; j++) {
145244
145260
  const chain = chains[j];
145245
145261
  const chainId = this.safeString(chain, 'chain');
@@ -272475,7 +272491,7 @@ SOFTWARE.
272475
272491
 
272476
272492
  //-----------------------------------------------------------------------------
272477
272493
  // this is updated by vss.js when building
272478
- const version = '4.0.104';
272494
+ const version = '4.0.105';
272479
272495
  _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange.ccxtVersion */ .e.ccxtVersion = version;
272480
272496
  //-----------------------------------------------------------------------------
272481
272497