ccxt 4.0.76 → 4.0.77

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
@@ -215,13 +215,13 @@ console.log(version, Object.keys(exchanges));
215
215
 
216
216
  All-in-one browser bundle (dependencies included), served from a CDN of your choice:
217
217
 
218
- * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.0.76/dist/ccxt.browser.js
219
- * unpkg: https://unpkg.com/ccxt@4.0.76/dist/ccxt.browser.js
218
+ * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.0.77/dist/ccxt.browser.js
219
+ * unpkg: https://unpkg.com/ccxt@4.0.77/dist/ccxt.browser.js
220
220
 
221
221
  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.
222
222
 
223
223
  ```HTML
224
- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.0.76/dist/ccxt.browser.js"></script>
224
+ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.0.77/dist/ccxt.browser.js"></script>
225
225
  ```
226
226
 
227
227
  Creates a global `ccxt` object:
@@ -25653,10 +25653,10 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
25653
25653
  };
25654
25654
  let response = undefined;
25655
25655
  if (market['spot']) {
25656
- response = await this.swapV2PublicGetQuoteTicker(this.extend(request, params));
25656
+ response = await this.spotV1PrivateGetTicker24hr(this.extend(request, params));
25657
25657
  }
25658
25658
  else {
25659
- response = await this.spotV1PublicGetCommonSymbols(this.extend(request, params));
25659
+ response = await this.swapV2PublicGetQuoteTicker(this.extend(request, params));
25660
25660
  }
25661
25661
  //
25662
25662
  // {
@@ -25679,7 +25679,8 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
25679
25679
  // }
25680
25680
  //
25681
25681
  const data = this.safeValue(response, 'data');
25682
- return this.parseTicker(data, market);
25682
+ const ticker = this.safeValue(data, 0, data);
25683
+ return this.parseTicker(ticker, market);
25683
25684
  }
25684
25685
  async fetchTickers(symbols = undefined, params = {}) {
25685
25686
  /**
@@ -25727,6 +25728,20 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
25727
25728
  return this.parseTickers(tickers, symbols);
25728
25729
  }
25729
25730
  parseTicker(ticker, market = undefined) {
25731
+ //
25732
+ // spot
25733
+ // {
25734
+ // symbol: 'BTC-USDT',
25735
+ // openPrice: '26032.08',
25736
+ // highPrice: '26178.86',
25737
+ // lowPrice: '25968.18',
25738
+ // lastPrice: '26113.60',
25739
+ // volume: '1161.79',
25740
+ // quoteVolume: '30288466.44',
25741
+ // openTime: '1693081020762',
25742
+ // closeTime: '1693167420762'
25743
+ // }
25744
+ // swap
25730
25745
  //
25731
25746
  // {
25732
25747
  // "symbol": "BTC-USDT",
@@ -25744,15 +25759,15 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
25744
25759
  // }
25745
25760
  //
25746
25761
  const marketId = this.safeString(ticker, 'symbol');
25747
- const defaultType = this.safeString(this.options, 'defaultType', 'swap');
25748
- const symbol = this.safeSymbol(marketId, market, '-', defaultType);
25762
+ const change = this.safeString(ticker, 'priceChange');
25763
+ const type = (change === undefined) ? 'spot' : 'swap';
25764
+ const symbol = this.safeSymbol(marketId, market, undefined, type);
25749
25765
  const open = this.safeString(ticker, 'openPrice');
25750
25766
  const high = this.safeString(ticker, 'highPrice');
25751
25767
  const low = this.safeString(ticker, 'lowPrice');
25752
25768
  const close = this.safeString(ticker, 'lastPrice');
25753
25769
  const quoteVolume = this.safeString(ticker, 'quoteVolume');
25754
25770
  const baseVolume = this.safeString(ticker, 'volume');
25755
- const change = this.safeString(ticker, 'chapriceChangenge');
25756
25771
  const percentage = this.safeString(ticker, 'priceChangePercent');
25757
25772
  const ts = this.safeInteger(ticker, 'closeTime');
25758
25773
  const datetime = this.iso8601(ts);
@@ -115528,6 +115543,29 @@ class gate extends _abstract_gate_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
115528
115543
  'sub_accounts/{user_id}/keys/{key}': 1,
115529
115544
  },
115530
115545
  },
115546
+ 'portfolio': {
115547
+ 'get': {
115548
+ 'accounts': 1.5,
115549
+ 'account_mode': 1.5,
115550
+ 'borrowable': 1.5,
115551
+ 'transferable': 1.5,
115552
+ 'loans': 1.5,
115553
+ 'loan_records': 1.5,
115554
+ 'interest_records': 1.5,
115555
+ 'spot/orders': 1.5,
115556
+ 'spot/orders/{order_id}': 1.5,
115557
+ },
115558
+ 'post': {
115559
+ 'loans': 1.5,
115560
+ 'spot/orders': 1.5,
115561
+ },
115562
+ 'delete': {
115563
+ 'spot/orders/{order_id}': 1.5,
115564
+ },
115565
+ 'patch': {
115566
+ 'spot/orders/{order_id}': 1.5,
115567
+ },
115568
+ },
115531
115569
  'spot': {
115532
115570
  'get': {
115533
115571
  'fee': 1,
@@ -115721,6 +115759,22 @@ class gate extends _abstract_gate_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
115721
115759
  'uni/lends': 1.5,
115722
115760
  },
115723
115761
  },
115762
+ 'loan': {
115763
+ 'get': {
115764
+ 'collateral/orders': 1.5,
115765
+ 'collateral/orders/{order_id}': 1.5,
115766
+ 'collateral/repay_records': 1.5,
115767
+ 'collateral/collaterals': 1.5,
115768
+ 'collateral/total_amount': 1.5,
115769
+ 'collateral/ltv': 1.5,
115770
+ 'collateral/currencies': 1.5,
115771
+ },
115772
+ 'post': {
115773
+ 'collateral/orders': 1.5,
115774
+ 'collateral/repay': 1.5,
115775
+ 'collateral/collaterals': 1.5,
115776
+ },
115777
+ },
115724
115778
  'account': {
115725
115779
  'get': {
115726
115780
  'detail': 1.5,
@@ -115731,6 +115785,9 @@ class gate extends _abstract_gate_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
115731
115785
  'stp_groups': 1.5,
115732
115786
  'stp_groups/{stp_id}/users': 1.5,
115733
115787
  },
115788
+ 'delete': {
115789
+ 'stp_groups/{stp_id}/users': 1.5,
115790
+ },
115734
115791
  },
115735
115792
  'rebate': {
115736
115793
  'get': {
@@ -229663,6 +229720,9 @@ class okx extends _okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
229663
229720
  * @param {string} [params.channel] the channel to subscribe to, tickers by default. Can be tickers, sprd-tickers, index-tickers, block-tickers
229664
229721
  * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
229665
229722
  */
229723
+ if (this.isEmpty(symbols)) {
229724
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' watchTickers requires a list of symbols');
229725
+ }
229666
229726
  let channel = undefined;
229667
229727
  [channel, params] = this.handleOptionAndParams(params, 'watchTickers', 'channel', 'tickers');
229668
229728
  const newTickers = await this.subscribeMultiple('public', channel, symbols, params);
@@ -259218,6 +259278,7 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
259218
259278
  '422': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.OrderNotFound, // {"response":null,"status":422,"errors":{"orderId":["Finished order id 1295772653 not found on your account"]},"notification":null,"warning":"Finished order id 1295772653 not found on your account","_token":null}
259219
259279
  },
259220
259280
  'broad': {
259281
+ 'This action is unauthorized': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.PermissionDenied,
259221
259282
  'Given amount is less than min amount': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder,
259222
259283
  'Total is less than': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder,
259223
259284
  'fee must be no less than': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder,
@@ -273373,7 +273434,7 @@ SOFTWARE.
273373
273434
 
273374
273435
  //-----------------------------------------------------------------------------
273375
273436
  // this is updated by vss.js when building
273376
- const version = '4.0.76';
273437
+ const version = '4.0.77';
273377
273438
  _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange.ccxtVersion */ .e.ccxtVersion = version;
273378
273439
  //-----------------------------------------------------------------------------
273379
273440