ccxt 4.1.79 → 4.1.80

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
@@ -209,13 +209,13 @@ console.log(version, Object.keys(exchanges));
209
209
 
210
210
  All-in-one browser bundle (dependencies included), served from a CDN of your choice:
211
211
 
212
- * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.1.79/dist/ccxt.browser.js
213
- * unpkg: https://unpkg.com/ccxt@4.1.79/dist/ccxt.browser.js
212
+ * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.1.80/dist/ccxt.browser.js
213
+ * unpkg: https://unpkg.com/ccxt@4.1.80/dist/ccxt.browser.js
214
214
 
215
215
  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.
216
216
 
217
217
  ```HTML
218
- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.1.79/dist/ccxt.browser.js"></script>
218
+ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.1.80/dist/ccxt.browser.js"></script>
219
219
  ```
220
220
 
221
221
  Creates a global `ccxt` object:
@@ -28133,35 +28133,6 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
28133
28133
  else {
28134
28134
  response = await this.swapV2PublicGetQuoteTicker(this.extend(request, params));
28135
28135
  }
28136
- //
28137
- // {
28138
- // "code": 0,
28139
- // "msg": "",
28140
- // "data": {
28141
- // "symbol": "BTC-USDT",
28142
- // "priceChange": "52.5",
28143
- // "priceChangePercent": "0.31",
28144
- // "lastPrice": "16880.5",
28145
- // "lastQty": "2.2238",
28146
- // "highPrice": "16897.5",
28147
- // "lowPrice": "16726.0",
28148
- // "volume": "245870.1692",
28149
- // "quoteVolume": "4151395117.73",
28150
- // "openPrice": "16832.0",
28151
- // "openTime": 1672026667803,
28152
- // "closeTime": 1672026648425,
28153
- // added some time ago:
28154
- // "firstId": 12345,
28155
- // "lastId": 12349,
28156
- // "count": 5,
28157
- // added 2023-11-10:
28158
- // "bidPrice": 16726.0,
28159
- // "bidQty": 0.05,
28160
- // "askPrice": 16726.0,
28161
- // "askQty": 0.05,
28162
- // }
28163
- // }
28164
- //
28165
28136
  const data = this.safeValue(response, 'data');
28166
28137
  const ticker = this.safeValue(data, 0, data);
28167
28138
  return this.parseTicker(ticker, market);
@@ -28192,37 +28163,6 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
28192
28163
  else {
28193
28164
  response = await this.swapV2PublicGetQuoteTicker(params);
28194
28165
  }
28195
- //
28196
- // {
28197
- // "code": 0,
28198
- // "msg": "",
28199
- // "data": [
28200
- // {
28201
- // "symbol": "BTC-USDT",
28202
- // "priceChange": "52.5",
28203
- // "priceChangePercent": "0.31",
28204
- // "lastPrice": "16880.5",
28205
- // "lastQty": "2.2238",
28206
- // "highPrice": "16897.5",
28207
- // "lowPrice": "16726.0",
28208
- // "volume": "245870.1692",
28209
- // "quoteVolume": "4151395117.73",
28210
- // "openPrice": "16832.0",
28211
- // "openTime": 1672026667803,
28212
- // "closeTime": 1672026648425,
28213
- // added some time ago:
28214
- // "firstId": 12345,
28215
- // "lastId": 12349,
28216
- // "count": 5,
28217
- // added 2023-11-10:
28218
- // "bidPrice": 16726.0,
28219
- // "bidQty": 0.05,
28220
- // "askPrice": 16726.0,
28221
- // "askQty": 0.05,
28222
- // },
28223
- // ]
28224
- // }
28225
- //
28226
28166
  const tickers = this.safeValue(response, 'data');
28227
28167
  return this.parseTickers(tickers, symbols);
28228
28168
  }
@@ -28239,10 +28179,6 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
28239
28179
  // "quoteVolume": "30288466.44",
28240
28180
  // "openTime": "1693081020762",
28241
28181
  // "closeTime": "1693167420762",
28242
- // added some time ago:
28243
- // "firstId": 12345,
28244
- // "lastId": 12349,
28245
- // "count": 5,
28246
28182
  // added 2023-11-10:
28247
28183
  // "bidPrice": 16726.0,
28248
28184
  // "bidQty": 0.05,
@@ -28256,7 +28192,7 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
28256
28192
  // "priceChange": "52.5",
28257
28193
  // "priceChangePercent": "0.31%", // they started to add the percent sign in value
28258
28194
  // "lastPrice": "16880.5",
28259
- // "lastQty": "2.2238",
28195
+ // "lastQty": "2.2238", // only present in swap!
28260
28196
  // "highPrice": "16897.5",
28261
28197
  // "lowPrice": "16726.0",
28262
28198
  // "volume": "245870.1692",
@@ -28264,10 +28200,6 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
28264
28200
  // "openPrice": "16832.0",
28265
28201
  // "openTime": 1672026667803,
28266
28202
  // "closeTime": 1672026648425,
28267
- // added some time ago:
28268
- // "firstId": 12345,
28269
- // "lastId": 12349,
28270
- // "count": 5,
28271
28203
  // added 2023-11-10:
28272
28204
  // "bidPrice": 16726.0,
28273
28205
  // "bidQty": 0.05,
@@ -28277,7 +28209,10 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
28277
28209
  //
28278
28210
  const marketId = this.safeString(ticker, 'symbol');
28279
28211
  const change = this.safeString(ticker, 'priceChange');
28280
- const type = (change === undefined) ? 'spot' : 'swap';
28212
+ const lastQty = this.safeString(ticker, 'lastQty');
28213
+ // in spot markets, lastQty is not present
28214
+ // it's (bad, but) the only way we can check the tickers origin
28215
+ const type = (lastQty === undefined) ? 'spot' : 'swap';
28281
28216
  const symbol = this.safeSymbol(marketId, market, undefined, type);
28282
28217
  const open = this.safeString(ticker, 'openPrice');
28283
28218
  const high = this.safeString(ticker, 'highPrice');
@@ -29884,7 +29819,8 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
29884
29819
  }
29885
29820
  parseTransactionStatus(status) {
29886
29821
  const statuses = {
29887
- '0': 'ok',
29822
+ '0': 'pending',
29823
+ '1': 'ok',
29888
29824
  '10': 'pending',
29889
29825
  '20': 'rejected',
29890
29826
  '30': 'ok',
@@ -44208,6 +44144,7 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
44208
44144
  * @param {string} symbol unified symbol of the market the order was made in
44209
44145
  * @param {object} [params] extra parameters specific to the exchange API endpoint
44210
44146
  * @param {string} [params.marginMode] 'isolated' or 'cross' for spot margin trading
44147
+ * @param {string} [params.planType] *swap only* either profit_plan, loss_plan, normal_plan, pos_profit, pos_loss, moving_plan or track_plan
44211
44148
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
44212
44149
  */
44213
44150
  if (symbol === undefined) {
@@ -44604,6 +44541,7 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
44604
44541
  * @param {int} [since] the earliest time in ms to fetch open orders for
44605
44542
  * @param {int} [limit] the maximum number of open order structures to retrieve
44606
44543
  * @param {object} [params] extra parameters specific to the exchange API endpoint
44544
+ * @param {string} [params.isPlan] *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
44607
44545
  * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
44608
44546
  */
44609
44547
  await this.loadMarkets();
@@ -44848,6 +44786,7 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
44848
44786
  * @param {int} [limit] the max number of closed orders to return
44849
44787
  * @param {object} [params] extra parameters specific to the exchange API endpoint
44850
44788
  * @param {int} [params.until] the latest time in ms to fetch entries for
44789
+ * @param {string} [params.isPlan] *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
44851
44790
  * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
44852
44791
  */
44853
44792
  await this.loadMarkets();
@@ -44890,6 +44829,7 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
44890
44829
  * @param {int} [limit] the max number of canceled orders to return
44891
44830
  * @param {object} [params] extra parameters specific to the exchange API endpoint
44892
44831
  * @param {int} [params.until] the latest time in ms to fetch entries for
44832
+ * @param {string} [params.isPlan] *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
44893
44833
  * @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
44894
44834
  */
44895
44835
  if (symbol === undefined) {
@@ -108138,7 +108078,19 @@ class currencycom extends _abstract_currencycom_js__WEBPACK_IMPORTED_MODULE_0__/
108138
108078
  if (limit !== undefined) {
108139
108079
  request['limit'] = limit;
108140
108080
  }
108141
- const response = await this[method](this.extend(request, params));
108081
+ let response = undefined;
108082
+ if (method === 'privateGetV2Deposits') {
108083
+ response = await this.privateGetV2Deposits(this.extend(request, params));
108084
+ }
108085
+ else if (method === 'privateGetV2Withdrawals') {
108086
+ response = await this.privateGetV2Withdrawals(this.extend(request, params));
108087
+ }
108088
+ else if (method === 'privateGetV2Transactions') {
108089
+ response = await this.privateGetV2Transactions(this.extend(request, params));
108090
+ }
108091
+ else {
108092
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.NotSupported(this.id + ' fetchTransactionsByMethod() not support this method');
108093
+ }
108142
108094
  //
108143
108095
  // [
108144
108096
  // {
@@ -172729,9 +172681,9 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
172729
172681
  'get': {
172730
172682
  'ping': 1,
172731
172683
  'time': 1,
172732
- 'exchangeInfo': 1,
172684
+ 'exchangeInfo': 10,
172733
172685
  'depth': 1,
172734
- 'trades': 1,
172686
+ 'trades': 5,
172735
172687
  'historicalTrades': 1,
172736
172688
  'aggTrades': 1,
172737
172689
  'klines': 1,
@@ -172744,17 +172696,18 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
172744
172696
  },
172745
172697
  'private': {
172746
172698
  'get': {
172747
- 'order': 1,
172748
- 'openOrders': 1,
172749
- 'allOrders': 1,
172699
+ 'order': 2,
172700
+ 'openOrders': 3,
172701
+ 'allOrders': 10,
172750
172702
  'account': 10,
172751
- 'myTrades': 1,
172703
+ 'myTrades': 10,
172752
172704
  'sub-account/list': 1,
172753
172705
  'sub-account/apiKey': 1,
172754
- 'capital/config/getall': 1,
172706
+ 'capital/config/getall': 10,
172755
172707
  'capital/deposit/hisrec': 1,
172756
172708
  'capital/withdraw/history': 1,
172757
- 'capital/deposit/address': 1,
172709
+ 'capital/withdraw/address': 10,
172710
+ 'capital/deposit/address': 10,
172758
172711
  'capital/transfer': 1,
172759
172712
  'capital/transfer/tranId': 1,
172760
172713
  'capital/transfer/internal': 1,
@@ -172798,7 +172751,7 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
172798
172751
  'capital/transfer/internal': 1,
172799
172752
  'capital/deposit/address': 1,
172800
172753
  'capital/sub-account/universalTransfer': 1,
172801
- 'capital/convert': 1,
172754
+ 'capital/convert': 10,
172802
172755
  'mxDeduct/enable': 1,
172803
172756
  'userDataStream': 1,
172804
172757
  },
@@ -254267,14 +254220,22 @@ class probit extends _abstract_probit_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
254267
254220
  }
254268
254221
  const precision = this.parsePrecision(this.safeString(network, 'precision'));
254269
254222
  const withdrawFee = this.safeValue(network, 'withdrawal_fee', []);
254270
- const networkfee = this.safeValue(withdrawFee, 0, {});
254223
+ let networkFee = this.safeValue(withdrawFee, 0, {});
254224
+ for (let k = 0; k < withdrawFee.length; k++) {
254225
+ const withdrawPlatform = withdrawFee[k];
254226
+ const feeCurrencyId = this.safeString(withdrawPlatform, 'currency_id');
254227
+ if (feeCurrencyId === id) {
254228
+ networkFee = withdrawPlatform;
254229
+ break;
254230
+ }
254231
+ }
254271
254232
  networkList[networkCode] = {
254272
254233
  'id': networkId,
254273
254234
  'network': networkCode,
254274
254235
  'active': currentActive,
254275
254236
  'deposit': currentDeposit,
254276
254237
  'withdraw': currentWithdraw,
254277
- 'fee': this.safeNumber(networkfee, 'amount'),
254238
+ 'fee': this.safeNumber(networkFee, 'amount'),
254278
254239
  'precision': this.parseNumber(precision),
254279
254240
  'limits': {
254280
254241
  'withdraw': {
@@ -276642,6 +276603,11 @@ class woo extends _abstract_woo_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
276642
276603
  },
276643
276604
  },
276644
276605
  'v3': {
276606
+ 'public': {
276607
+ 'get': {
276608
+ 'insuranceFund': 3,
276609
+ },
276610
+ },
276645
276611
  'private': {
276646
276612
  'get': {
276647
276613
  'algo/order/{oid}': 1,
@@ -288596,7 +288562,7 @@ SOFTWARE.
288596
288562
 
288597
288563
  //-----------------------------------------------------------------------------
288598
288564
  // this is updated by vss.js when building
288599
- const version = '4.1.79';
288565
+ const version = '4.1.80';
288600
288566
  _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e.ccxtVersion = version;
288601
288567
  //-----------------------------------------------------------------------------
288602
288568