ccxt 4.1.78 → 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.78/dist/ccxt.browser.js
213
- * unpkg: https://unpkg.com/ccxt@4.1.78/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.78/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,
@@ -28254,9 +28190,9 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
28254
28190
  // {
28255
28191
  // "symbol": "BTC-USDT",
28256
28192
  // "priceChange": "52.5",
28257
- // "priceChangePercent": "0.31",
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');
@@ -28285,8 +28220,10 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
28285
28220
  const close = this.safeString(ticker, 'lastPrice');
28286
28221
  const quoteVolume = this.safeString(ticker, 'quoteVolume');
28287
28222
  const baseVolume = this.safeString(ticker, 'volume');
28288
- let percentage = this.safeString(ticker, 'priceChangePercent', ''); // priceChangePercent: '5.66%',
28289
- percentage = percentage.replace('%', '');
28223
+ let percentage = this.safeString(ticker, 'priceChangePercent');
28224
+ if (percentage !== undefined) {
28225
+ percentage = percentage.replace('%', '');
28226
+ }
28290
28227
  const ts = this.safeInteger(ticker, 'closeTime');
28291
28228
  const datetime = this.iso8601(ts);
28292
28229
  const bid = this.safeString(ticker, 'bidPrice');
@@ -29882,7 +29819,8 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
29882
29819
  }
29883
29820
  parseTransactionStatus(status) {
29884
29821
  const statuses = {
29885
- '0': 'ok',
29822
+ '0': 'pending',
29823
+ '1': 'ok',
29886
29824
  '10': 'pending',
29887
29825
  '20': 'rejected',
29888
29826
  '30': 'ok',
@@ -44206,6 +44144,7 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
44206
44144
  * @param {string} symbol unified symbol of the market the order was made in
44207
44145
  * @param {object} [params] extra parameters specific to the exchange API endpoint
44208
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
44209
44148
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
44210
44149
  */
44211
44150
  if (symbol === undefined) {
@@ -44602,6 +44541,7 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
44602
44541
  * @param {int} [since] the earliest time in ms to fetch open orders for
44603
44542
  * @param {int} [limit] the maximum number of open order structures to retrieve
44604
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'
44605
44545
  * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
44606
44546
  */
44607
44547
  await this.loadMarkets();
@@ -44846,6 +44786,7 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
44846
44786
  * @param {int} [limit] the max number of closed orders to return
44847
44787
  * @param {object} [params] extra parameters specific to the exchange API endpoint
44848
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'
44849
44790
  * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
44850
44791
  */
44851
44792
  await this.loadMarkets();
@@ -44888,6 +44829,7 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
44888
44829
  * @param {int} [limit] the max number of canceled orders to return
44889
44830
  * @param {object} [params] extra parameters specific to the exchange API endpoint
44890
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'
44891
44833
  * @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
44892
44834
  */
44893
44835
  if (symbol === undefined) {
@@ -85727,6 +85669,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
85727
85669
  'brokerage/product_book',
85728
85670
  'brokerage/best_bid_ask',
85729
85671
  'brokerage/convert/trade/{trade_id}',
85672
+ 'brokerage/time',
85730
85673
  ],
85731
85674
  'post': [
85732
85675
  'brokerage/orders',
@@ -103810,6 +103753,9 @@ class cryptocom extends _abstract_cryptocom_js__WEBPACK_IMPORTED_MODULE_0__/* ["
103810
103753
  'private/get-currency-networks': 10 / 3,
103811
103754
  'private/get-deposit-history': 10 / 3,
103812
103755
  'private/get-deposit-address': 10 / 3,
103756
+ 'private/export/create-export-request': 10 / 3,
103757
+ 'private/export/get-export-requests': 10 / 3,
103758
+ 'private/export/download-export-output': 10 / 3,
103813
103759
  'private/get-account-summary': 10 / 3,
103814
103760
  'private/create-order': 2 / 3,
103815
103761
  'private/cancel-order': 2 / 3,
@@ -103828,6 +103774,7 @@ class cryptocom extends _abstract_cryptocom_js__WEBPACK_IMPORTED_MODULE_0__/* ["
103828
103774
  'private/otc/accept-quote': 100,
103829
103775
  'private/otc/get-quote-history': 10 / 3,
103830
103776
  'private/otc/get-trade-history': 10 / 3,
103777
+ 'private/otc/create-order': 10 / 3,
103831
103778
  },
103832
103779
  },
103833
103780
  },
@@ -108131,7 +108078,19 @@ class currencycom extends _abstract_currencycom_js__WEBPACK_IMPORTED_MODULE_0__/
108131
108078
  if (limit !== undefined) {
108132
108079
  request['limit'] = limit;
108133
108080
  }
108134
- 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
+ }
108135
108094
  //
108136
108095
  // [
108137
108096
  // {
@@ -172722,9 +172681,9 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
172722
172681
  'get': {
172723
172682
  'ping': 1,
172724
172683
  'time': 1,
172725
- 'exchangeInfo': 1,
172684
+ 'exchangeInfo': 10,
172726
172685
  'depth': 1,
172727
- 'trades': 1,
172686
+ 'trades': 5,
172728
172687
  'historicalTrades': 1,
172729
172688
  'aggTrades': 1,
172730
172689
  'klines': 1,
@@ -172737,17 +172696,18 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
172737
172696
  },
172738
172697
  'private': {
172739
172698
  'get': {
172740
- 'order': 1,
172741
- 'openOrders': 1,
172742
- 'allOrders': 1,
172699
+ 'order': 2,
172700
+ 'openOrders': 3,
172701
+ 'allOrders': 10,
172743
172702
  'account': 10,
172744
- 'myTrades': 1,
172703
+ 'myTrades': 10,
172745
172704
  'sub-account/list': 1,
172746
172705
  'sub-account/apiKey': 1,
172747
- 'capital/config/getall': 1,
172706
+ 'capital/config/getall': 10,
172748
172707
  'capital/deposit/hisrec': 1,
172749
172708
  'capital/withdraw/history': 1,
172750
- 'capital/deposit/address': 1,
172709
+ 'capital/withdraw/address': 10,
172710
+ 'capital/deposit/address': 10,
172751
172711
  'capital/transfer': 1,
172752
172712
  'capital/transfer/tranId': 1,
172753
172713
  'capital/transfer/internal': 1,
@@ -172791,7 +172751,7 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
172791
172751
  'capital/transfer/internal': 1,
172792
172752
  'capital/deposit/address': 1,
172793
172753
  'capital/sub-account/universalTransfer': 1,
172794
- 'capital/convert': 1,
172754
+ 'capital/convert': 10,
172795
172755
  'mxDeduct/enable': 1,
172796
172756
  'userDataStream': 1,
172797
172757
  },
@@ -254260,14 +254220,22 @@ class probit extends _abstract_probit_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
254260
254220
  }
254261
254221
  const precision = this.parsePrecision(this.safeString(network, 'precision'));
254262
254222
  const withdrawFee = this.safeValue(network, 'withdrawal_fee', []);
254263
- 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
+ }
254264
254232
  networkList[networkCode] = {
254265
254233
  'id': networkId,
254266
254234
  'network': networkCode,
254267
254235
  'active': currentActive,
254268
254236
  'deposit': currentDeposit,
254269
254237
  'withdraw': currentWithdraw,
254270
- 'fee': this.safeNumber(networkfee, 'amount'),
254238
+ 'fee': this.safeNumber(networkFee, 'amount'),
254271
254239
  'precision': this.parseNumber(precision),
254272
254240
  'limits': {
254273
254241
  'withdraw': {
@@ -276635,6 +276603,11 @@ class woo extends _abstract_woo_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
276635
276603
  },
276636
276604
  },
276637
276605
  'v3': {
276606
+ 'public': {
276607
+ 'get': {
276608
+ 'insuranceFund': 3,
276609
+ },
276610
+ },
276638
276611
  'private': {
276639
276612
  'get': {
276640
276613
  'algo/order/{oid}': 1,
@@ -288589,7 +288562,7 @@ SOFTWARE.
288589
288562
 
288590
288563
  //-----------------------------------------------------------------------------
288591
288564
  // this is updated by vss.js when building
288592
- const version = '4.1.78';
288565
+ const version = '4.1.80';
288593
288566
  _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e.ccxtVersion = version;
288594
288567
  //-----------------------------------------------------------------------------
288595
288568