ccxt 4.1.68 → 4.1.69

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
@@ -211,13 +211,13 @@ console.log(version, Object.keys(exchanges));
211
211
 
212
212
  All-in-one browser bundle (dependencies included), served from a CDN of your choice:
213
213
 
214
- * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.1.68/dist/ccxt.browser.js
215
- * unpkg: https://unpkg.com/ccxt@4.1.68/dist/ccxt.browser.js
214
+ * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.1.69/dist/ccxt.browser.js
215
+ * unpkg: https://unpkg.com/ccxt@4.1.69/dist/ccxt.browser.js
216
216
 
217
217
  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.
218
218
 
219
219
  ```HTML
220
- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.1.68/dist/ccxt.browser.js"></script>
220
+ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.1.69/dist/ccxt.browser.js"></script>
221
221
  ```
222
222
 
223
223
  Creates a global `ccxt` object:
@@ -3887,7 +3887,7 @@ class ascendex extends _abstract_ascendex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
3887
3887
  'account-category': 'cash',
3888
3888
  'account-group': undefined,
3889
3889
  'fetchClosedOrders': {
3890
- 'method': 'v2PrivateDataGetOrderHist', // 'v1PrivateAccountGroupGetAccountCategoryOrderHistCurrent'
3890
+ 'method': 'v2PrivateDataGetOrderHist', // 'v1PrivateAccountCategoryGetOrderHistCurrent'
3891
3891
  },
3892
3892
  'defaultType': 'spot',
3893
3893
  'accountsByType': {
@@ -4427,6 +4427,9 @@ class ascendex extends _abstract_ascendex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
4427
4427
  * @method
4428
4428
  * @name ascendex#fetchBalance
4429
4429
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
4430
+ * @see https://ascendex.github.io/ascendex-pro-api/#cash-account-balance
4431
+ * @see https://ascendex.github.io/ascendex-pro-api/#margin-account-balance
4432
+ * @see https://ascendex.github.io/ascendex-futures-pro-api-v2/#position
4430
4433
  * @param {object} [params] extra parameters specific to the exchange API endpoint
4431
4434
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
4432
4435
  */
@@ -4437,8 +4440,7 @@ class ascendex extends _abstract_ascendex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
4437
4440
  [marketType, query] = this.handleMarketTypeAndParams('fetchBalance', undefined, params);
4438
4441
  const isMargin = this.safeValue(params, 'margin', false);
4439
4442
  marketType = isMargin ? 'margin' : marketType;
4440
- params = this.omit(params, 'margin');
4441
- const options = this.safeValue(this.options, 'fetchBalance', {});
4443
+ query = this.omit(query, 'margin');
4442
4444
  const accountsByType = this.safeValue(this.options, 'accountsByType', {});
4443
4445
  const accountCategory = this.safeString(accountsByType, marketType, 'cash');
4444
4446
  const account = this.safeValue(this.accounts, 0, {});
@@ -4446,16 +4448,19 @@ class ascendex extends _abstract_ascendex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
4446
4448
  const request = {
4447
4449
  'account-group': accountGroup,
4448
4450
  };
4449
- const defaultMethod = this.safeString(options, 'method', 'v1PrivateAccountCategoryGetBalance');
4450
- const method = this.getSupportedMapping(marketType, {
4451
- 'spot': defaultMethod,
4452
- 'margin': defaultMethod,
4453
- 'swap': 'v2PrivateAccountGroupGetFuturesPosition',
4454
- });
4455
4451
  if ((accountCategory === 'cash') || (accountCategory === 'margin')) {
4456
4452
  request['account-category'] = accountCategory;
4457
4453
  }
4458
- const response = await this[method](this.extend(request, query));
4454
+ let response = undefined;
4455
+ if ((marketType === 'spot') || (marketType === 'margin')) {
4456
+ response = await this.v1PrivateAccountCategoryGetBalance(this.extend(request, query));
4457
+ }
4458
+ else if (marketType === 'swap') {
4459
+ response = await this.v2PrivateAccountGroupGetFuturesPosition(this.extend(request, query));
4460
+ }
4461
+ else {
4462
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.NotSupported(this.id + ' fetchBalance() is not currently supported for ' + marketType + ' markets');
4463
+ }
4459
4464
  //
4460
4465
  // cash
4461
4466
  //
@@ -5380,6 +5385,8 @@ class ascendex extends _abstract_ascendex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
5380
5385
  * @method
5381
5386
  * @name ascendex#fetchOrder
5382
5387
  * @description fetches information on an order made by the user
5388
+ * @see https://ascendex.github.io/ascendex-pro-api/#query-order
5389
+ * @see https://ascendex.github.io/ascendex-futures-pro-api-v2/#query-order-by-id
5383
5390
  * @param {string} symbol unified symbol of the market the order was made in
5384
5391
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5385
5392
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -5391,7 +5398,6 @@ class ascendex extends _abstract_ascendex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
5391
5398
  market = this.market(symbol);
5392
5399
  }
5393
5400
  const [type, query] = this.handleMarketTypeAndParams('fetchOrder', market, params);
5394
- const options = this.safeValue(this.options, 'fetchOrder', {});
5395
5401
  const accountsByType = this.safeValue(this.options, 'accountsByType', {});
5396
5402
  const accountCategory = this.safeString(accountsByType, type, 'cash');
5397
5403
  const account = this.safeValue(this.accounts, 0, {});
@@ -5401,21 +5407,17 @@ class ascendex extends _abstract_ascendex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
5401
5407
  'account-category': accountCategory,
5402
5408
  'orderId': id,
5403
5409
  };
5404
- const defaultMethod = this.safeString(options, 'method', 'v1PrivateAccountCategoryGetOrderStatus');
5405
- const method = this.getSupportedMapping(type, {
5406
- 'spot': defaultMethod,
5407
- 'margin': defaultMethod,
5408
- 'swap': 'v2PrivateAccountGroupGetFuturesOrderStatus',
5409
- });
5410
- if (method === 'v1PrivateAccountCategoryGetOrderStatus') {
5411
- if (accountCategory !== undefined) {
5412
- request['category'] = accountCategory;
5413
- }
5410
+ let response = undefined;
5411
+ if ((type === 'spot') || (type === 'margin')) {
5412
+ response = await this.v1PrivateAccountCategoryGetOrderStatus(this.extend(request, query));
5414
5413
  }
5415
- else {
5414
+ else if (type === 'swap') {
5416
5415
  request['account-category'] = accountCategory;
5416
+ response = await this.v2PrivateAccountGroupGetFuturesOrderStatus(this.extend(request, query));
5417
+ }
5418
+ else {
5419
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.NotSupported(this.id + ' fetchOrder() is not currently supported for ' + type + ' markets');
5417
5420
  }
5418
- const response = await this[method](this.extend(request, query));
5419
5421
  //
5420
5422
  // AccountCategoryGetOrderStatus
5421
5423
  //
@@ -5491,6 +5493,8 @@ class ascendex extends _abstract_ascendex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
5491
5493
  * @method
5492
5494
  * @name ascendex#fetchOpenOrders
5493
5495
  * @description fetch all unfilled currently open orders
5496
+ * @see https://ascendex.github.io/ascendex-pro-api/#list-open-orders
5497
+ * @see https://ascendex.github.io/ascendex-futures-pro-api-v2/#list-open-orders
5494
5498
  * @param {string} symbol unified market symbol
5495
5499
  * @param {int} [since] the earliest time in ms to fetch open orders for
5496
5500
  * @param {int} [limit] the maximum number of open orders structures to retrieve
@@ -5513,22 +5517,17 @@ class ascendex extends _abstract_ascendex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
5513
5517
  'account-group': accountGroup,
5514
5518
  'account-category': accountCategory,
5515
5519
  };
5516
- const options = this.safeValue(this.options, 'fetchOpenOrders', {});
5517
- const defaultMethod = this.safeString(options, 'method', 'v1PrivateAccountCategoryGetOrderOpen');
5518
- const method = this.getSupportedMapping(type, {
5519
- 'spot': defaultMethod,
5520
- 'margin': defaultMethod,
5521
- 'swap': 'v2PrivateAccountGroupGetFuturesOrderOpen',
5522
- });
5523
- if (method === 'v1PrivateAccountCategoryGetOrderOpen') {
5524
- if (accountCategory !== undefined) {
5525
- request['category'] = accountCategory;
5526
- }
5520
+ let response = undefined;
5521
+ if ((type === 'spot') || (type === 'margin')) {
5522
+ response = await this.v1PrivateAccountCategoryGetOrderOpen(this.extend(request, query));
5527
5523
  }
5528
- else {
5524
+ else if (type === 'swap') {
5529
5525
  request['account-category'] = accountCategory;
5526
+ response = await this.v2PrivateAccountGroupGetFuturesOrderOpen(this.extend(request, query));
5527
+ }
5528
+ else {
5529
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.NotSupported(this.id + ' fetchOpenOrders() is not currently supported for ' + type + ' markets');
5530
5530
  }
5531
- const response = await this[method](this.extend(request, query));
5532
5531
  //
5533
5532
  // AccountCategoryGetOrderOpen
5534
5533
  //
@@ -5614,6 +5613,7 @@ class ascendex extends _abstract_ascendex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
5614
5613
  * @name ascendex#fetchClosedOrders
5615
5614
  * @description fetches information on multiple closed orders made by the user
5616
5615
  * @see https://ascendex.github.io/ascendex-pro-api/#list-history-orders-v2
5616
+ * @see https://ascendex.github.io/ascendex-futures-pro-api-v2/#list-current-history-orders
5617
5617
  * @param {string} symbol unified market symbol of the market orders were made in
5618
5618
  * @param {int} [since] the earliest time in ms to fetch orders for
5619
5619
  * @param {int} [limit] the maximum number of orde structures to retrieve
@@ -5626,16 +5626,15 @@ class ascendex extends _abstract_ascendex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
5626
5626
  const account = this.safeValue(this.accounts, 0, {});
5627
5627
  const accountGroup = this.safeValue(account, 'id');
5628
5628
  const request = {
5629
- 'account-group': accountGroup,
5630
- // 'category': accountCategory,
5631
- // 'symbol': market['id'],
5632
- // 'orderType': 'market', // optional, string
5633
- // 'side': 'buy', // or 'sell', optional, case insensitive.
5634
- // 'status': 'Filled', // "Filled", "Canceled", or "Rejected"
5635
- // 'startTime': exchange.milliseconds (),
5636
- // 'endTime': exchange.milliseconds (),
5637
- // 'page': 1,
5638
- // 'pageSize': 100,
5629
+ // 'category': accountCategory,
5630
+ // 'symbol': market['id'],
5631
+ // 'orderType': 'market', // optional, string
5632
+ // 'side': 'buy', // or 'sell', optional, case insensitive.
5633
+ // 'status': 'Filled', // "Filled", "Canceled", or "Rejected"
5634
+ // 'startTime': exchange.milliseconds (),
5635
+ // 'endTime': exchange.milliseconds (),
5636
+ // 'page': 1,
5637
+ // 'pageSize': 100,
5639
5638
  };
5640
5639
  let market = undefined;
5641
5640
  if (symbol !== undefined) {
@@ -5650,28 +5649,42 @@ class ascendex extends _abstract_ascendex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
5650
5649
  'margin': defaultMethod,
5651
5650
  'swap': 'v2PrivateAccountGroupGetFuturesOrderHistCurrent',
5652
5651
  });
5652
+ if (since !== undefined) {
5653
+ request['startTime'] = since;
5654
+ }
5655
+ const until = this.safeString(params, 'until');
5656
+ if (until !== undefined) {
5657
+ request['endTime'] = until;
5658
+ }
5653
5659
  const accountsByType = this.safeValue(this.options, 'accountsByType', {});
5654
5660
  const accountCategory = this.safeString(accountsByType, type, 'cash'); // margin, futures
5655
- if (method === 'v2PrivateDataGetOrderHist') {
5661
+ let response = undefined;
5662
+ if (method === 'v1PrivateAccountCategoryGetOrderHistCurrent') {
5663
+ request['account-group'] = accountGroup;
5664
+ request['account-category'] = accountCategory;
5665
+ if (limit !== undefined) {
5666
+ request['limit'] = limit;
5667
+ }
5668
+ response = await this.v1PrivateAccountCategoryGetOrderHistCurrent(this.extend(request, query));
5669
+ }
5670
+ else if (method === 'v2PrivateDataGetOrderHist') {
5656
5671
  request['account'] = accountCategory;
5657
5672
  if (limit !== undefined) {
5658
5673
  request['limit'] = limit;
5659
5674
  }
5675
+ response = await this.v2PrivateDataGetOrderHist(this.extend(request, query));
5660
5676
  }
5661
- else {
5677
+ else if (method === 'v2PrivateAccountGroupGetFuturesOrderHistCurrent') {
5678
+ request['account-group'] = accountGroup;
5662
5679
  request['account-category'] = accountCategory;
5663
5680
  if (limit !== undefined) {
5664
5681
  request['pageSize'] = limit;
5665
5682
  }
5683
+ response = await this.v2PrivateAccountGroupGetFuturesOrderHistCurrent(this.extend(request, query));
5666
5684
  }
5667
- if (since !== undefined) {
5668
- request['startTime'] = since;
5669
- }
5670
- const until = this.safeString(params, 'until');
5671
- if (until !== undefined) {
5672
- request['endTime'] = until;
5685
+ else {
5686
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.NotSupported(this.id + ' fetchClosedOrders() is not currently supported for ' + type + ' markets');
5673
5687
  }
5674
- const response = await this[method](this.extend(request, query));
5675
5688
  //
5676
5689
  // accountCategoryGetOrderHistCurrent
5677
5690
  //
@@ -5775,6 +5788,8 @@ class ascendex extends _abstract_ascendex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
5775
5788
  * @method
5776
5789
  * @name ascendex#cancelOrder
5777
5790
  * @description cancels an open order
5791
+ * @see https://ascendex.github.io/ascendex-pro-api/#cancel-order
5792
+ * @see https://ascendex.github.io/ascendex-futures-pro-api-v2/#cancel-order
5778
5793
  * @param {string} id order id
5779
5794
  * @param {string} symbol unified symbol of the market the order was made in
5780
5795
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -5787,7 +5802,6 @@ class ascendex extends _abstract_ascendex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
5787
5802
  await this.loadAccounts();
5788
5803
  const market = this.market(symbol);
5789
5804
  const [type, query] = this.handleMarketTypeAndParams('cancelOrder', market, params);
5790
- const options = this.safeValue(this.options, 'cancelOrder', {});
5791
5805
  const accountsByType = this.safeValue(this.options, 'accountsByType', {});
5792
5806
  const accountCategory = this.safeString(accountsByType, type, 'cash');
5793
5807
  const account = this.safeValue(this.accounts, 0, {});
@@ -5799,20 +5813,6 @@ class ascendex extends _abstract_ascendex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
5799
5813
  'time': this.milliseconds(),
5800
5814
  'id': 'foobar',
5801
5815
  };
5802
- const defaultMethod = this.safeString(options, 'method', 'v1PrivateAccountCategoryDeleteOrder');
5803
- const method = this.getSupportedMapping(type, {
5804
- 'spot': defaultMethod,
5805
- 'margin': defaultMethod,
5806
- 'swap': 'v2PrivateAccountGroupDeleteFuturesOrder',
5807
- });
5808
- if (method === 'v1PrivateAccountCategoryDeleteOrder') {
5809
- if (accountCategory !== undefined) {
5810
- request['category'] = accountCategory;
5811
- }
5812
- }
5813
- else {
5814
- request['account-category'] = accountCategory;
5815
- }
5816
5816
  const clientOrderId = this.safeString2(params, 'clientOrderId', 'id');
5817
5817
  if (clientOrderId === undefined) {
5818
5818
  request['orderId'] = id;
@@ -5821,7 +5821,17 @@ class ascendex extends _abstract_ascendex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
5821
5821
  request['id'] = clientOrderId;
5822
5822
  params = this.omit(params, ['clientOrderId', 'id']);
5823
5823
  }
5824
- const response = await this[method](this.extend(request, query));
5824
+ let response = undefined;
5825
+ if ((type === 'spot') || (type === 'margin')) {
5826
+ response = await this.v1PrivateAccountCategoryDeleteOrder(this.extend(request, query));
5827
+ }
5828
+ else if (type === 'swap') {
5829
+ request['account-category'] = accountCategory;
5830
+ response = await this.v2PrivateAccountGroupDeleteFuturesOrder(this.extend(request, query));
5831
+ }
5832
+ else {
5833
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.NotSupported(this.id + ' cancelOrder() is not currently supported for ' + type + ' markets');
5834
+ }
5825
5835
  //
5826
5836
  // AccountCategoryDeleteOrder
5827
5837
  //
@@ -5894,6 +5904,8 @@ class ascendex extends _abstract_ascendex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
5894
5904
  * @method
5895
5905
  * @name ascendex#cancelAllOrders
5896
5906
  * @description cancel all open orders
5907
+ * @see https://ascendex.github.io/ascendex-pro-api/#cancel-all-orders
5908
+ * @see https://ascendex.github.io/ascendex-futures-pro-api-v2/#cancel-all-open-orders
5897
5909
  * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
5898
5910
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5899
5911
  * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -5905,7 +5917,6 @@ class ascendex extends _abstract_ascendex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
5905
5917
  market = this.market(symbol);
5906
5918
  }
5907
5919
  const [type, query] = this.handleMarketTypeAndParams('cancelAllOrders', market, params);
5908
- const options = this.safeValue(this.options, 'cancelAllOrders', {});
5909
5920
  const accountsByType = this.safeValue(this.options, 'accountsByType', {});
5910
5921
  const accountCategory = this.safeString(accountsByType, type, 'cash');
5911
5922
  const account = this.safeValue(this.accounts, 0, {});
@@ -5918,21 +5929,17 @@ class ascendex extends _abstract_ascendex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
5918
5929
  if (symbol !== undefined) {
5919
5930
  request['symbol'] = market['id'];
5920
5931
  }
5921
- const defaultMethod = this.safeString(options, 'method', 'v1PrivateAccountCategoryDeleteOrderAll');
5922
- const method = this.getSupportedMapping(type, {
5923
- 'spot': defaultMethod,
5924
- 'margin': defaultMethod,
5925
- 'swap': 'v2PrivateAccountGroupDeleteFuturesOrderAll',
5926
- });
5927
- if (method === 'v1PrivateAccountCategoryDeleteOrderAll') {
5928
- if (accountCategory !== undefined) {
5929
- request['category'] = accountCategory;
5930
- }
5932
+ let response = undefined;
5933
+ if ((type === 'spot') || (type === 'margin')) {
5934
+ response = await this.v1PrivateAccountCategoryDeleteOrderAll(this.extend(request, query));
5931
5935
  }
5932
- else {
5936
+ else if (type === 'swap') {
5933
5937
  request['account-category'] = accountCategory;
5938
+ response = await this.v2PrivateAccountGroupDeleteFuturesOrderAll(this.extend(request, query));
5939
+ }
5940
+ else {
5941
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.NotSupported(this.id + ' cancelAllOrders() is not currently supported for ' + type + ' markets');
5934
5942
  }
5935
- const response = await this[method](this.extend(request, query));
5936
5943
  //
5937
5944
  // AccountCategoryDeleteOrderAll
5938
5945
  //
@@ -193866,6 +193873,7 @@ class phemex extends _abstract_phemex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
193866
193873
  },
193867
193874
  'v1': {
193868
193875
  'get': {
193876
+ 'md/fullbook': 5,
193869
193877
  'md/orderbook': 5,
193870
193878
  'md/trade': 5,
193871
193879
  'md/ticker/24hr': 5,
@@ -193919,6 +193927,11 @@ class phemex extends _abstract_phemex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
193919
193927
  'phemex-user/users/children': 5,
193920
193928
  'phemex-user/wallets/v2/depositAddress': 5,
193921
193929
  'phemex-user/wallets/tradeAccountDetail': 5,
193930
+ 'phemex-deposit/wallets/api/depositAddress': 5,
193931
+ 'phemex-deposit/wallets/api/depositHist': 5,
193932
+ 'phemex-deposit/wallets/api/chainCfg': 5,
193933
+ 'phemex-withdraw/wallets/api/withdrawHist': 5,
193934
+ 'phemex-withdraw/wallets/api/asset/info': 5,
193922
193935
  'phemex-user/order/closedPositionList': 5,
193923
193936
  'exchange/margins/transfer': 5,
193924
193937
  'exchange/wallets/confirm/withdraw': 5,
@@ -193957,6 +193970,9 @@ class phemex extends _abstract_phemex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
193957
193970
  'assets/futures/sub-accounts/transfer': 5,
193958
193971
  'assets/universal-transfer': 5,
193959
193972
  'assets/convert': 5,
193973
+ // withdraw
193974
+ 'phemex-withdraw/wallets/api/createWithdraw': 5,
193975
+ 'phemex-withdraw/wallets/api/cancelWithdraw': 5, // ?id=<id>
193960
193976
  },
193961
193977
  'put': {
193962
193978
  // spot
@@ -194713,7 +194729,12 @@ class phemex extends _abstract_phemex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
194713
194729
  response = await this.v2GetMdV2Orderbook(this.extend(request, params));
194714
194730
  }
194715
194731
  else {
194716
- response = await this.v1GetMdOrderbook(this.extend(request, params));
194732
+ if ((limit !== undefined) && (limit <= 30)) {
194733
+ response = await this.v1GetMdOrderbook(this.extend(request, params));
194734
+ }
194735
+ else {
194736
+ response = await this.v1GetMdFullbook(this.extend(request, params));
194737
+ }
194717
194738
  }
194718
194739
  //
194719
194740
  // {
@@ -231972,9 +231993,11 @@ class htx extends _htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
231972
231993
  // which means whenever there is an order book change at that level, it pushes an update;
231973
231994
  // 150-levels/400-level incremental MBP feed is based on the gap
231974
231995
  // between two snapshots at 100ms interval.
231975
- limit = (limit === undefined) ? 20 : limit;
231996
+ if (limit === undefined) {
231997
+ limit = market['spot'] ? 150 : 20;
231998
+ }
231976
231999
  if (!this.inArray(limit, allowedLimits)) {
231977
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ExchangeError(this.id + ' watchOrderBook swap market accepts limits of 20 and 150 only');
232000
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ExchangeError(this.id + ' watchOrderBook market accepts limits of 20 and 150 only');
231978
232001
  }
231979
232002
  let messageHash = undefined;
231980
232003
  if (market['spot']) {
@@ -287962,7 +287985,7 @@ SOFTWARE.
287962
287985
 
287963
287986
  //-----------------------------------------------------------------------------
287964
287987
  // this is updated by vss.js when building
287965
- const version = '4.1.68';
287988
+ const version = '4.1.69';
287966
287989
  _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e.ccxtVersion = version;
287967
287990
  //-----------------------------------------------------------------------------
287968
287991