ccxt 4.0.66 → 4.0.67

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
@@ -210,22 +210,13 @@ console.log(version, Object.keys(exchanges));
210
210
 
211
211
  All-in-one browser bundle (dependencies included), served from a CDN of your choice:
212
212
 
213
- <<<<<<< HEAD
214
- * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.0.66/dist/ccxt.browser.js
215
- * unpkg: https://unpkg.com/ccxt@4.0.66/dist/ccxt.browser.js
216
- =======
217
- * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.0.66/dist/ccxt.browser.js
218
- * unpkg: https://unpkg.com/ccxt@4.0.66/dist/ccxt.browser.js
219
- >>>>>>> e74b18a3a8a8cbcfe45ce4c1d32b9c03d4fae41c
213
+ * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.0.67/dist/ccxt.browser.js
214
+ * unpkg: https://unpkg.com/ccxt@4.0.67/dist/ccxt.browser.js
220
215
 
221
216
  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
217
 
223
218
  ```HTML
224
- <<<<<<< HEAD
225
- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.0.66/dist/ccxt.browser.js"></script>
226
- =======
227
- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.0.66/dist/ccxt.browser.js"></script>
228
- >>>>>>> e74b18a3a8a8cbcfe45ce4c1d32b9c03d4fae41c
219
+ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.0.67/dist/ccxt.browser.js"></script>
229
220
  ```
230
221
 
231
222
  Creates a global `ccxt` object:
@@ -39325,8 +39325,9 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
39325
39325
  'symbol': market['id'],
39326
39326
  };
39327
39327
  const until = this.safeInteger2(params, 'until', 'till');
39328
+ const limitIsUndefined = (limit === undefined);
39328
39329
  if (limit === undefined) {
39329
- limit = 1000;
39330
+ limit = 200;
39330
39331
  }
39331
39332
  request['limit'] = limit;
39332
39333
  const marketType = market['spot'] ? 'spot' : 'swap';
@@ -39372,6 +39373,9 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
39372
39373
  const method = this.safeString(params, 'method', defaultSpotMethod);
39373
39374
  params = this.omit(params, 'method');
39374
39375
  if (method === 'publicSpotGetMarketCandles') {
39376
+ if (limitIsUndefined) {
39377
+ request['limit'] = 1000;
39378
+ }
39375
39379
  response = await this.publicSpotGetMarketCandles(this.extend(request, params));
39376
39380
  }
39377
39381
  else if (method === 'publicSpotGetMarketHistoryCandles') {
@@ -39391,6 +39395,9 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
39391
39395
  response = await this.publicMixGetMarketHistoryIndexCandles(this.extend(request, params));
39392
39396
  }
39393
39397
  else if (swapMethod === 'publicMixGetMarketCandles') {
39398
+ if (limitIsUndefined) {
39399
+ request['limit'] = 1000;
39400
+ }
39394
39401
  response = await this.publicMixGetMarketCandles(this.extend(request, params));
39395
39402
  }
39396
39403
  else if (swapMethod === 'publicMixGetMarketHistoryCandles') {
@@ -73107,10 +73114,10 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
73107
73114
  // "change24h": "86"
73108
73115
  // }
73109
73116
  //
73117
+ const isSpot = this.safeString(ticker, 'openInterestValue') === undefined;
73110
73118
  const timestamp = this.safeInteger(ticker, 'time');
73111
73119
  const marketId = this.safeString(ticker, 'symbol');
73112
- const defaultType = this.safeString(this.options, 'defaultType', 'spot');
73113
- const type = this.safeString(market, 'type', defaultType);
73120
+ const type = isSpot ? 'spot' : 'contract';
73114
73121
  market = this.safeMarket(marketId, market, undefined, type);
73115
73122
  const symbol = this.safeSymbol(marketId, market, undefined, type);
73116
73123
  const last = this.safeString(ticker, 'lastPrice');
@@ -206676,7 +206683,8 @@ class bybit extends _bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
206676
206683
  const topic = this.safeString(message, 'topic', '');
206677
206684
  const updateType = this.safeString(message, 'type', '');
206678
206685
  const data = this.safeValue(message, 'data', {});
206679
- const isSpot = this.safeString(data, 's') !== undefined;
206686
+ const isSpot = this.safeString(data, 'openInterestValue') === undefined;
206687
+ const type = isSpot ? 'spot' : 'contract';
206680
206688
  let symbol = undefined;
206681
206689
  let parsed = undefined;
206682
206690
  if ((updateType === 'snapshot') || isSpot) {
@@ -206687,7 +206695,7 @@ class bybit extends _bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
206687
206695
  const topicParts = topic.split('.');
206688
206696
  const topicLength = topicParts.length;
206689
206697
  const marketId = this.safeString(topicParts, topicLength - 1);
206690
- const market = this.market(marketId);
206698
+ const market = this.safeMarket(marketId, undefined, undefined, type);
206691
206699
  symbol = market['symbol'];
206692
206700
  // update the info in place
206693
206701
  const ticker = this.safeValue(this.tickers, symbol, {});
@@ -272218,7 +272226,7 @@ SOFTWARE.
272218
272226
 
272219
272227
  //-----------------------------------------------------------------------------
272220
272228
  // this is updated by vss.js when building
272221
- const version = '4.0.66';
272229
+ const version = '4.0.67';
272222
272230
  _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange.ccxtVersion */ .e.ccxtVersion = version;
272223
272231
  //-----------------------------------------------------------------------------
272224
272232