ccxt 4.5.13 → 4.5.14

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/js/src/pro/htx.js CHANGED
@@ -408,22 +408,24 @@ export default class htx extends htxRest {
408
408
  await this.loadMarkets();
409
409
  const market = this.market(symbol);
410
410
  symbol = market['symbol'];
411
- const allowedLimits = [20, 150];
411
+ const allowedLimits = [5, 20, 150, 400];
412
412
  // 2) 5-level/20-level incremental MBP is a tick by tick feed,
413
413
  // which means whenever there is an order book change at that level, it pushes an update;
414
414
  // 150-levels/400-level incremental MBP feed is based on the gap
415
415
  // between two snapshots at 100ms interval.
416
416
  const options = this.safeDict(this.options, 'watchOrderBook', {});
417
- const depth = this.safeInteger(options, 'depth', 150);
418
- if (!this.inArray(depth, allowedLimits)) {
419
- throw new ExchangeError(this.id + ' watchOrderBook market accepts limits of 20 and 150 only');
417
+ if (limit === undefined) {
418
+ limit = this.safeInteger(options, 'depth', 150);
419
+ }
420
+ if (!this.inArray(limit, allowedLimits)) {
421
+ throw new ExchangeError(this.id + ' watchOrderBook market accepts limits of 5, 20, 150 or 400 only');
420
422
  }
421
423
  let messageHash = undefined;
422
424
  if (market['spot']) {
423
- messageHash = 'market.' + market['id'] + '.mbp.' + this.numberToString(depth);
425
+ messageHash = 'market.' + market['id'] + '.mbp.' + this.numberToString(limit);
424
426
  }
425
427
  else {
426
- messageHash = 'market.' + market['id'] + '.depth.size_' + this.numberToString(depth) + '.high_freq';
428
+ messageHash = 'market.' + market['id'] + '.depth.size_' + this.numberToString(limit) + '.high_freq';
427
429
  }
428
430
  const url = this.getUrlByMarketType(market['type'], market['linear'], false, true);
429
431
  let method = this.handleOrderBookSubscription;
package/js/src/toobit.js CHANGED
@@ -18,7 +18,7 @@ export default class toobit extends Exchange {
18
18
  'version': 'v1',
19
19
  'rateLimit': 20,
20
20
  'certified': false,
21
- 'pro': false,
21
+ 'pro': true,
22
22
  'has': {
23
23
  'CORS': undefined,
24
24
  'spot': true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.5.13",
3
+ "version": "4.5.14",
4
4
  "description": "A cryptocurrency trading API with more than 100 exchanges in JavaScript / TypeScript / Python / C# / PHP / Go",
5
5
  "unpkg": "dist/ccxt.browser.min.js",
6
6
  "type": "module",