ccxt 4.0.95 → 4.0.96

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.95/dist/ccxt.browser.js
219
- * unpkg: https://unpkg.com/ccxt@4.0.95/dist/ccxt.browser.js
218
+ * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.0.96/dist/ccxt.browser.js
219
+ * unpkg: https://unpkg.com/ccxt@4.0.96/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.95/dist/ccxt.browser.js"></script>
224
+ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.0.96/dist/ccxt.browser.js"></script>
225
225
  ```
226
226
 
227
227
  Creates a global `ccxt` object:
@@ -55880,14 +55880,24 @@ class bitso extends _abstract_bitso_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
55880
55880
  const timestamp = this.parse8601(this.safeString(trade, 'created_at'));
55881
55881
  const marketId = this.safeString(trade, 'book');
55882
55882
  const symbol = this.safeSymbol(marketId, market, '_');
55883
- const side = this.safeString2(trade, 'side', 'maker_side');
55883
+ let side = this.safeString(trade, 'side');
55884
55884
  const makerSide = this.safeString(trade, 'maker_side');
55885
55885
  let takerOrMaker = undefined;
55886
- if (side === makerSide) {
55887
- takerOrMaker = 'maker';
55886
+ if (side !== undefined) {
55887
+ if (side === makerSide) {
55888
+ takerOrMaker = 'maker';
55889
+ }
55890
+ else {
55891
+ takerOrMaker = 'taker';
55892
+ }
55888
55893
  }
55889
55894
  else {
55890
- takerOrMaker = 'taker';
55895
+ if (makerSide === 'buy') {
55896
+ side = 'sell';
55897
+ }
55898
+ else {
55899
+ side = 'buy';
55900
+ }
55891
55901
  }
55892
55902
  let amount = this.safeString2(trade, 'amount', 'major');
55893
55903
  if (amount !== undefined) {
@@ -70349,6 +70359,21 @@ class btctradeua extends _abstract_btctradeua_js__WEBPACK_IMPORTED_MODULE_0__/*
70349
70359
  return timestamp - 10800000;
70350
70360
  }
70351
70361
  parseTrade(trade, market = undefined) {
70362
+ //
70363
+ // fetchTrades
70364
+ //
70365
+ // {
70366
+ // "amnt_base": "2220.1204701750",
70367
+ // "order_id": 247644861,
70368
+ // "unixtime": 1694340398,
70369
+ // "price": "1019739.3229211044",
70370
+ // "amnt_trade": "0.0021771451",
70371
+ // "user": "Vasily1989",
70372
+ // "type": "sell",
70373
+ // "pub_date": "Sept. 10, 2023, 1:06 p.m.",
70374
+ // "id": 7498807
70375
+ // }
70376
+ //
70352
70377
  const timestamp = this.parseExchangeSpecificDatetime(this.safeString(trade, 'pub_date'));
70353
70378
  const id = this.safeString(trade, 'id');
70354
70379
  const type = 'limit';
@@ -70389,6 +70414,21 @@ class btctradeua extends _abstract_btctradeua_js__WEBPACK_IMPORTED_MODULE_0__/*
70389
70414
  'symbol': market['id'],
70390
70415
  };
70391
70416
  const response = await this.publicGetDealsSymbol(this.extend(request, params));
70417
+ //
70418
+ // [
70419
+ // {
70420
+ // "amnt_base": "2220.1204701750",
70421
+ // "order_id": 247644861,
70422
+ // "unixtime": 1694340398,
70423
+ // "price": "1019739.3229211044",
70424
+ // "amnt_trade": "0.0021771451",
70425
+ // "user": "Vasily1989",
70426
+ // "type": "sell",
70427
+ // "pub_date": "Sept. 10, 2023, 1:06 p.m.",
70428
+ // "id": 7498807
70429
+ // },
70430
+ // ]
70431
+ //
70392
70432
  // they report each trade twice (once for both of the two sides of the fill)
70393
70433
  // deduplicate trades for that reason
70394
70434
  const trades = [];
@@ -110806,7 +110846,7 @@ class digifinex extends _abstract_digifinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["
110806
110846
  request['symbol'] = market['id'];
110807
110847
  }
110808
110848
  if (limit !== undefined) {
110809
- request['limit'] = limit;
110849
+ request['limit'] = market['swap'] ? Math.min(limit, 100) : limit;
110810
110850
  }
110811
110851
  const response = await this[method](this.extend(request, params));
110812
110852
  //
@@ -124884,7 +124924,7 @@ class hitbtc extends _abstract_hitbtc_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
124884
124924
  request['symbols'] = market['id'];
124885
124925
  }
124886
124926
  if (limit !== undefined) {
124887
- request['limit'] = limit;
124927
+ request['limit'] = Math.min(limit, 1000);
124888
124928
  }
124889
124929
  if (since !== undefined) {
124890
124930
  request['from'] = since;
@@ -155569,10 +155609,10 @@ class latoken extends _abstract_latoken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
155569
155609
  'currency': market['baseId'],
155570
155610
  'quote': market['quoteId'],
155571
155611
  // 'from': since.toString (), // milliseconds
155572
- // 'limit': limit, // default 100, max 1000
155612
+ // 'limit': limit, // default 100, limit 100
155573
155613
  };
155574
155614
  if (limit !== undefined) {
155575
- request['limit'] = limit; // default 100, max 1000
155615
+ request['limit'] = Math.min(limit, 100); // default 100, limit 100
155576
155616
  }
155577
155617
  const response = await this.publicGetTradeHistoryCurrencyQuote(this.extend(request, params));
155578
155618
  //
@@ -240635,7 +240675,7 @@ class probit extends _abstract_probit_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
240635
240675
  request['start_time'] = this.iso8601(since);
240636
240676
  }
240637
240677
  if (limit !== undefined) {
240638
- request['limit'] = limit;
240678
+ request['limit'] = Math.min(limit, 10000);
240639
240679
  }
240640
240680
  const response = await this.publicGetTrade(this.extend(request, params));
240641
240681
  //
@@ -260696,7 +260736,7 @@ class wazirx extends _abstract_wazirx_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
260696
260736
  'symbol': market['id'],
260697
260737
  };
260698
260738
  if (limit !== undefined) {
260699
- request['limit'] = limit; // Default 500; max 1000.
260739
+ request['limit'] = Math.min(limit, 1000); // Default 500; max 1000.
260700
260740
  }
260701
260741
  const method = this.safeString(this.options, 'fetchTradesMethod', 'publicGetTrades');
260702
260742
  const response = await this[method](this.extend(request, params));
@@ -275593,7 +275633,7 @@ SOFTWARE.
275593
275633
 
275594
275634
  //-----------------------------------------------------------------------------
275595
275635
  // this is updated by vss.js when building
275596
- const version = '4.0.95';
275636
+ const version = '4.0.96';
275597
275637
  _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange.ccxtVersion */ .e.ccxtVersion = version;
275598
275638
  //-----------------------------------------------------------------------------
275599
275639