ccxt 4.0.78 → 4.0.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.
Files changed (50) hide show
  1. package/README.md +3 -3
  2. package/dist/ccxt.browser.js +189 -169
  3. package/dist/ccxt.browser.min.js +3 -3
  4. package/dist/cjs/ccxt.js +1 -1
  5. package/dist/cjs/src/binance.js +78 -67
  6. package/dist/cjs/src/bithumb.js +1 -1
  7. package/dist/cjs/src/bitmex.js +2 -2
  8. package/dist/cjs/src/bybit.js +4 -2
  9. package/dist/cjs/src/coinsph.js +2 -2
  10. package/dist/cjs/src/krakenfutures.js +2 -2
  11. package/dist/cjs/src/mexc.js +1 -0
  12. package/dist/cjs/src/okcoin.js +2 -2
  13. package/dist/cjs/src/okx.js +1 -1
  14. package/dist/cjs/src/phemex.js +8 -3
  15. package/dist/cjs/src/poloniex.js +54 -74
  16. package/dist/cjs/src/pro/bitget.js +18 -2
  17. package/dist/cjs/src/pro/gate.js +5 -3
  18. package/dist/cjs/src/pro/kraken.js +2 -2
  19. package/dist/cjs/src/probit.js +2 -2
  20. package/dist/cjs/src/upbit.js +1 -1
  21. package/dist/cjs/src/wavesexchange.js +4 -2
  22. package/dist/cjs/src/wazirx.js +1 -0
  23. package/js/ccxt.d.ts +1 -1
  24. package/js/ccxt.js +1 -1
  25. package/js/src/abstract/binance.d.ts +12 -1
  26. package/js/src/abstract/binancecoinm.d.ts +12 -1
  27. package/js/src/abstract/binanceus.d.ts +12 -1
  28. package/js/src/abstract/binanceusdm.d.ts +12 -1
  29. package/js/src/abstract/bybit.d.ts +1 -0
  30. package/js/src/abstract/mexc.d.ts +1 -0
  31. package/js/src/abstract/mexc3.d.ts +1 -0
  32. package/js/src/binance.js +78 -67
  33. package/js/src/bithumb.js +1 -1
  34. package/js/src/bitmex.js +2 -2
  35. package/js/src/bybit.js +4 -2
  36. package/js/src/coinsph.js +2 -2
  37. package/js/src/krakenfutures.js +2 -2
  38. package/js/src/mexc.js +1 -0
  39. package/js/src/okcoin.js +2 -2
  40. package/js/src/okx.js +1 -1
  41. package/js/src/phemex.js +8 -3
  42. package/js/src/poloniex.js +54 -74
  43. package/js/src/pro/bitget.js +19 -3
  44. package/js/src/pro/gate.js +5 -3
  45. package/js/src/pro/kraken.js +2 -2
  46. package/js/src/probit.js +2 -2
  47. package/js/src/upbit.js +1 -1
  48. package/js/src/wavesexchange.js +4 -2
  49. package/js/src/wazirx.js +1 -0
  50. package/package.json +1 -1
@@ -15729,12 +15729,11 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
15729
15729
  'api': {
15730
15730
  // the API structure below will need 3-layer apidefs
15731
15731
  'sapi': {
15732
- // IP (api) = 1200 per minute => (rateLimit = 50)
15733
15732
  // IP (sapi) request rate limit of 12 000 per minute
15734
- // 1 IP (sapi) => cost = 0.1
15733
+ // 1 IP (sapi) => cost = 0.1 => (1000 / (50 * 0.1)) * 60 = 12000
15735
15734
  // 10 IP (sapi) => cost = 1
15736
15735
  // UID (sapi) request rate limit of 180 000 per minute
15737
- // 1 UID (sapi) => cost = 1200 / 180 000 = 0.006667
15736
+ // 1 UID (sapi) => cost = 0.006667 => (1000 / (50 * 0.006667)) * 60 = 180000
15738
15737
  'get': {
15739
15738
  'system/status': 0.1,
15740
15739
  // these endpoints require this.apiKey
@@ -15750,7 +15749,7 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
15750
15749
  'asset/transfer': 0.1,
15751
15750
  'asset/assetDetail': 0.1,
15752
15751
  'asset/tradeFee': 0.1,
15753
- 'asset/ledger-transfer/cloud-mining/queryByPage': 4,
15752
+ 'asset/ledger-transfer/cloud-mining/queryByPage': 4.0002,
15754
15753
  'asset/convert-transfer/queryByPage': 0.033335,
15755
15754
  'margin/loan': 1,
15756
15755
  'margin/repay': 1,
@@ -15779,15 +15778,16 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
15779
15778
  'margin/isolatedMarginTier': 0.1,
15780
15779
  'margin/rateLimit/order': 2,
15781
15780
  'margin/dribblet': 0.1,
15782
- 'margin/dust': 20,
15781
+ 'margin/dust': 20.001,
15783
15782
  'margin/crossMarginCollateralRatio': 10,
15784
15783
  'margin/exchange-small-liability': 0.6667,
15785
15784
  'margin/exchange-small-liability-history': 0.6667,
15786
15785
  'margin/next-hourly-interest-rate': 0.6667,
15786
+ 'margin/delist-schedule': 0.6667,
15787
15787
  'loan/vip/loanable/data': 40,
15788
15788
  'loan/vip/collateral/data': 40,
15789
- 'loan/vip/request/data': 40,
15790
- 'loan/income': 40,
15789
+ 'loan/vip/request/data': 2.6668,
15790
+ 'loan/income': 40.002,
15791
15791
  'loan/ongoing/orders': 40,
15792
15792
  'loan/ltv/adjustment/history': 40,
15793
15793
  'loan/borrow/history': 40,
@@ -15806,7 +15806,7 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
15806
15806
  'futures/loan/wallet': 1,
15807
15807
  'futures/loan/adjustCollateral/history': 1,
15808
15808
  'futures/loan/liquidationHistory': 1,
15809
- 'rebate/taxQuery': 20.001,
15809
+ 'rebate/taxQuery': 80.004,
15810
15810
  // https://binance-docs.github.io/apidocs/spot/en/#withdraw-sapi
15811
15811
  'capital/config/getall': 1,
15812
15812
  'capital/deposit/address': 1,
@@ -15815,7 +15815,7 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
15815
15815
  'capital/deposit/subHisrec': 0.1,
15816
15816
  'capital/withdraw/history': 0.1,
15817
15817
  'capital/contract/convertible-coins': 4.0002,
15818
- 'convert/tradeFlow': 20.0001,
15818
+ 'convert/tradeFlow': 20.001,
15819
15819
  'convert/exchangeInfo': 50,
15820
15820
  'convert/assetInfo': 10,
15821
15821
  'convert/orderStatus': 0.6667,
@@ -15823,7 +15823,6 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
15823
15823
  'account/apiTradingStatus': 0.1,
15824
15824
  'account/apiRestrictions/ipRestriction': 0.1,
15825
15825
  'bnbBurn': 0.1,
15826
- // 'sub-account/assets': 1, (v3 endpoint)
15827
15826
  'sub-account/futures/account': 1,
15828
15827
  'sub-account/futures/accountSummary': 0.1,
15829
15828
  'sub-account/futures/positionRisk': 1,
@@ -15837,15 +15836,16 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
15837
15836
  'sub-account/transfer/subUserHistory': 0.1,
15838
15837
  'sub-account/universalTransfer': 0.1,
15839
15838
  'sub-account/apiRestrictions/ipRestriction/thirdPartyList': 1,
15840
- 'sub-account/transaction-tatistics': 0.4,
15839
+ 'sub-account/transaction-statistics': 0.40002,
15840
+ 'sub-account/subAccountApi/ipRestriction': 20.001,
15841
15841
  'managed-subaccount/asset': 0.1,
15842
15842
  'managed-subaccount/accountSnapshot': 240,
15843
15843
  'managed-subaccount/queryTransLogForInvestor': 0.1,
15844
- 'managed-subaccount/queryTransLogForTradeParent': 0.1,
15845
- 'managed-subaccount/fetch-future-asset': 0.1,
15844
+ 'managed-subaccount/queryTransLogForTradeParent': 0.40002,
15845
+ 'managed-subaccount/fetch-future-asset': 0.40002,
15846
15846
  'managed-subaccount/marginAsset': 0.1,
15847
- 'managed-subaccount/info': 0.4,
15848
- 'managed-subaccount/deposit/address': 0.1,
15847
+ 'managed-subaccount/info': 0.40002,
15848
+ 'managed-subaccount/deposit/address': 0.006667,
15849
15849
  'managed-subaccount/query-trans-log': 0.40002,
15850
15850
  // lending endpoints
15851
15851
  'lending/daily/product/list': 0.1,
@@ -15923,6 +15923,9 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
15923
15923
  'giftcard/verify': 0.1,
15924
15924
  'giftcard/cryptography/rsa-public-key': 0.1,
15925
15925
  'giftcard/buyCode/token-limit': 0.1,
15926
+ 'algo/spot/openOrders': 0.1,
15927
+ 'algo/spot/historicalOrders': 0.1,
15928
+ 'algo/spot/subOrders': 0.1,
15926
15929
  'algo/futures/openOrders': 0.1,
15927
15930
  'algo/futures/historicalOrders': 0.1,
15928
15931
  'algo/futures/subOrders': 0.1,
@@ -15964,9 +15967,9 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
15964
15967
  'simple-earn/flexible/history/collateralRecord': 0.1,
15965
15968
  },
15966
15969
  'post': {
15967
- 'asset/dust': 1,
15970
+ 'asset/dust': 0.06667,
15968
15971
  'asset/dust-btc': 0.1,
15969
- 'asset/transfer': 0.1,
15972
+ 'asset/transfer': 6.0003,
15970
15973
  'asset/get-funding-asset': 0.1,
15971
15974
  'asset/convert-transfer': 0.033335,
15972
15975
  'account/disableFastWithdrawSwitch': 0.1,
@@ -15976,12 +15979,12 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
15976
15979
  'capital/withdraw/apply': 4.0002,
15977
15980
  'capital/contract/convertible-coins': 4.0002,
15978
15981
  'capital/deposit/credit-apply': 0.1,
15979
- 'margin/transfer': 1,
15982
+ 'margin/transfer': 4.0002,
15980
15983
  'margin/loan': 20.001,
15981
15984
  'margin/repay': 20.001,
15982
15985
  'margin/order': 0.040002,
15983
15986
  'margin/order/oco': 0.040002,
15984
- 'margin/dust': 20,
15987
+ 'margin/dust': 20.001,
15985
15988
  'margin/exchange-small-liability': 20.001,
15986
15989
  // 'margin/isolated/create': 1, discontinued
15987
15990
  'margin/isolated/transfer': 4.0002,
@@ -15998,8 +16001,6 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
15998
16001
  'sub-account/transfer/subToMaster': 0.1,
15999
16002
  'sub-account/universalTransfer': 0.1,
16000
16003
  'sub-account/options/enable': 0.1,
16001
- // v2 not supported yet
16002
- // 'sub-account/subAccountApi/ipRestriction': 20,
16003
16004
  'managed-subaccount/deposit': 0.1,
16004
16005
  'managed-subaccount/withdraw': 0.1,
16005
16006
  'userDataStream': 0.1,
@@ -16045,6 +16046,7 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
16045
16046
  'giftcard/createCode': 0.1,
16046
16047
  'giftcard/redeemCode': 0.1,
16047
16048
  'giftcard/buyCode': 0.1,
16049
+ 'algo/spot/newOrderTwap': 20.001,
16048
16050
  'algo/futures/newOrderVp': 20.001,
16049
16051
  'algo/futures/newOrderTwap': 20.001,
16050
16052
  // staking
@@ -16052,14 +16054,14 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
16052
16054
  'staking/redeem': 0.1,
16053
16055
  'staking/setAutoStaking': 0.1,
16054
16056
  'portfolio/repay': 20.001,
16055
- 'loan/vip/renew': 40,
16056
- 'loan/vip/borrow': 40,
16057
- 'loan/borrow': 40,
16058
- 'loan/repay': 40,
16059
- 'loan/adjust/ltv': 40,
16060
- 'loan/customize/margin_call': 40,
16061
- 'loan/vip/repay': 40,
16062
- 'convert/getQuote': 20.001,
16057
+ 'loan/vip/renew': 40.002,
16058
+ 'loan/vip/borrow': 40.002,
16059
+ 'loan/borrow': 40.002,
16060
+ 'loan/repay': 40.002,
16061
+ 'loan/adjust/ltv': 40.002,
16062
+ 'loan/customize/margin_call': 40.002,
16063
+ 'loan/vip/repay': 40.002,
16064
+ 'convert/getQuote': 1.3334,
16063
16065
  'convert/acceptQuote': 3.3335,
16064
16066
  'portfolio/auto-collection': 150,
16065
16067
  'portfolio/asset-collection': 6,
@@ -16084,15 +16086,17 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
16084
16086
  'delete': {
16085
16087
  // 'account/apiRestrictions/ipRestriction/ipList': 1, discontinued
16086
16088
  'margin/openOrders': 0.1,
16087
- 'margin/order': 0.0066667,
16088
- 'margin/orderList': 0.0066667,
16089
+ 'margin/order': 0.006667,
16090
+ 'margin/orderList': 0.006667,
16089
16091
  'margin/isolated/account': 2.0001,
16090
16092
  'userDataStream': 0.1,
16091
16093
  'userDataStream/isolated': 0.1,
16092
16094
  // brokerage API TODO NO MENTION OF RATELIMIT IN BROKERAGE DOCS
16093
16095
  'broker/subAccountApi': 1,
16094
16096
  'broker/subAccountApi/ipRestriction/ipList': 1,
16097
+ 'algo/spot/order': 0.1,
16095
16098
  'algo/futures/order': 0.1,
16099
+ 'sub-account/subAccountApi/ipRestriction/ipList': 20.001, // Weight(UID): 3000 => cost = 0.006667 * 3000 = 20.001
16096
16100
  },
16097
16101
  },
16098
16102
  'sapiV2': {
@@ -16100,10 +16104,13 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
16100
16104
  'sub-account/futures/account': 0.1,
16101
16105
  'sub-account/futures/positionRisk': 0.1,
16102
16106
  },
16107
+ 'post': {
16108
+ 'sub-account/subAccountApi/ipRestriction': 20.001, // Weight(UID): 3000 => cost = 0.006667 * 3000 = 20.001
16109
+ },
16103
16110
  },
16104
16111
  'sapiV3': {
16105
16112
  'get': {
16106
- 'sub-account/assets': 1,
16113
+ 'sub-account/assets': 0.40002, // Weight(UID): 60 => cost = 0.006667 * 60 = 0.40002
16107
16114
  },
16108
16115
  'post': {
16109
16116
  'asset/getUserAsset': 0.5,
@@ -16111,7 +16118,7 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
16111
16118
  },
16112
16119
  'sapiV4': {
16113
16120
  'get': {
16114
- 'sub-account/assets': 1,
16121
+ 'sub-account/assets': 0.40002, // Weight(UID): 60 => cost = 0.006667 * 60 = 0.40002
16115
16122
  },
16116
16123
  },
16117
16124
  // deprecated
@@ -16366,55 +16373,59 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
16366
16373
  },
16367
16374
  },
16368
16375
  'public': {
16376
+ // IP (api) request rate limit of 6000 per minute
16377
+ // 1 IP (api) => cost = 0.2 => (1000 / (50 * 0.2)) * 60 = 6000
16369
16378
  'get': {
16370
- 'ping': 1,
16371
- 'time': 1,
16372
- 'depth': { 'cost': 1, 'byLimit': [[100, 1], [500, 5], [1000, 10], [5000, 50]] },
16373
- 'trades': 1,
16374
- 'aggTrades': 1,
16375
- 'historicalTrades': 5,
16376
- 'klines': 1,
16377
- 'ticker/24hr': { 'cost': 1, 'noSymbol': 40 },
16378
- 'ticker/price': { 'cost': 1, 'noSymbol': 2 },
16379
- 'ticker/bookTicker': { 'cost': 1, 'noSymbol': 2 },
16380
- 'exchangeInfo': 10,
16379
+ 'ping': 0.2,
16380
+ 'time': 0.2,
16381
+ 'depth': { 'cost': 0.4, 'byLimit': [[100, 0.4], [500, 2], [1000, 4], [5000, 20]] },
16382
+ 'trades': 0.4,
16383
+ 'aggTrades': 0.4,
16384
+ 'historicalTrades': 2,
16385
+ 'klines': 0.4,
16386
+ 'uiKlines': 0.4,
16387
+ 'ticker/24hr': { 'cost': 0.4, 'noSymbol': 16 },
16388
+ 'ticker/price': { 'cost': 0.4, 'noSymbol': 0.8 },
16389
+ 'ticker/bookTicker': { 'cost': 0.4, 'noSymbol': 0.8 },
16390
+ 'exchangeInfo': 4,
16391
+ 'avgPrice': 0.4,
16381
16392
  },
16382
16393
  'put': {
16383
- 'userDataStream': 1,
16394
+ 'userDataStream': 0.4,
16384
16395
  },
16385
16396
  'post': {
16386
- 'userDataStream': 1,
16397
+ 'userDataStream': 0.4,
16387
16398
  },
16388
16399
  'delete': {
16389
- 'userDataStream': 1,
16400
+ 'userDataStream': 0.4,
16390
16401
  },
16391
16402
  },
16392
16403
  'private': {
16393
16404
  'get': {
16394
- 'allOrderList': 10,
16395
- 'openOrderList': 3,
16396
- 'orderList': 2,
16397
- 'order': 2,
16398
- 'openOrders': { 'cost': 3, 'noSymbol': 40 },
16399
- 'allOrders': 10,
16400
- 'account': 10,
16401
- 'myTrades': 10,
16402
- 'rateLimit/order': 20,
16403
- 'myPreventedMatches': 1,
16404
- 'myAllocations': 10,
16405
+ 'allOrderList': 4,
16406
+ 'openOrderList': 1.2,
16407
+ 'orderList': 0.8,
16408
+ 'order': 0.8,
16409
+ 'openOrders': { 'cost': 1.2, 'noSymbol': 16 },
16410
+ 'allOrders': 4,
16411
+ 'account': 4,
16412
+ 'myTrades': 4,
16413
+ 'rateLimit/order': 8,
16414
+ 'myPreventedMatches': 4,
16415
+ 'myAllocations': 4,
16405
16416
  },
16406
16417
  'post': {
16407
- 'order/oco': 1,
16408
- 'sor/order': 1,
16409
- 'sor/order/test': 1,
16410
- 'order': 1,
16411
- 'order/cancelReplace': 1,
16412
- 'order/test': 1,
16418
+ 'order/oco': 0.2,
16419
+ 'sor/order': 0.2,
16420
+ 'sor/order/test': 0.2,
16421
+ 'order': 0.2,
16422
+ 'order/cancelReplace': 0.2,
16423
+ 'order/test': 0.2,
16413
16424
  },
16414
16425
  'delete': {
16415
- 'openOrders': 1,
16416
- 'orderList': 1,
16417
- 'order': 1,
16426
+ 'openOrders': 0.2,
16427
+ 'orderList': 0.2,
16428
+ 'order': 0.2,
16418
16429
  },
16419
16430
  },
16420
16431
  'papi': {
@@ -42794,7 +42805,7 @@ class bithumb extends _abstract_bithumb_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
42794
42805
  await this.loadMarkets();
42795
42806
  const market = this.market(symbol);
42796
42807
  const request = {
42797
- 'currency': market['base'],
42808
+ 'currency': market['base'] + '_' + market['quote'],
42798
42809
  };
42799
42810
  if (limit !== undefined) {
42800
42811
  request['count'] = limit; // default 20, max 100
@@ -47837,8 +47848,8 @@ class bitmex extends _abstract_bitmex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
47837
47848
  'change': undefined,
47838
47849
  'percentage': undefined,
47839
47850
  'average': undefined,
47840
- 'baseVolume': this.convertFromRawQuantity(symbol, this.safeString(ticker, 'homeNotional24h')),
47841
- 'quoteVolume': this.convertFromRawQuantity(symbol, this.safeString(ticker, 'foreignNotional24h')),
47851
+ 'baseVolume': this.safeString(ticker, 'homeNotional24h'),
47852
+ 'quoteVolume': this.safeString(ticker, 'foreignNotional24h'),
47842
47853
  'info': ticker,
47843
47854
  }, market);
47844
47855
  }
@@ -71525,6 +71536,7 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
71525
71536
  'v5/spot-lever-token/info': 2.5,
71526
71537
  'v5/spot-lever-token/reference': 2.5,
71527
71538
  // spot margin trade
71539
+ 'v5/spot-margin-trade/data': 2.5,
71528
71540
  'v5/spot-cross-margin-trade/data': 2.5,
71529
71541
  'v5/spot-cross-margin-trade/pledge-token': 2.5,
71530
71542
  'v5/spot-cross-margin-trade/borrow-token': 2.5,
@@ -73804,7 +73816,8 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
73804
73816
  if (symbols !== undefined) {
73805
73817
  symbols = this.marketSymbols(symbols);
73806
73818
  market = this.market(symbols[0]);
73807
- if (symbols.length === 1) {
73819
+ const symbolsLength = symbols.length;
73820
+ if (symbolsLength === 1) {
73808
73821
  request['symbol'] = market['id'];
73809
73822
  }
73810
73823
  }
@@ -75188,7 +75201,7 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
75188
75201
  const cost = this.safeNumber(params, 'cost');
75189
75202
  params = this.omit(params, 'cost');
75190
75203
  if (price === undefined && cost === undefined) {
75191
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder(this.id + " createOrder() requires the price argument with market buy orders to calculate total order cost (amount to spend), where cost = amount * price. Supply a price argument to createOrder() call if you want the cost to be calculated for you from price and amount, or, alternatively, add .options['createMarketBuyOrderRequiresPrice'] = false to supply the cost in the amount argument (the exchange-specific behaviour)");
75204
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder(this.id + ' createOrder() requires the price argument with market buy orders to calculate total order cost (amount to spend), where cost = amount * price. Supply a price argument to createOrder() call if you want the cost to be calculated for you from price and amount, or, alternatively, add .options["createMarketBuyOrderRequiresPrice"] = false to supply the cost in the amount argument (the exchange-specific behaviour)');
75192
75205
  }
75193
75206
  else {
75194
75207
  const amountString = this.numberToString(amount);
@@ -97578,9 +97591,9 @@ class coinsph extends _abstract_coinsph_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
97578
97591
  if (i !== 0) {
97579
97592
  encodedArrayParams += '&';
97580
97593
  }
97581
- const array = query[key];
97594
+ const innerArray = query[key];
97582
97595
  query = this.omit(query, key);
97583
- const encodedArrayParam = this.parseArrayParam(array, key);
97596
+ const encodedArrayParam = this.parseArrayParam(innerArray, key);
97584
97597
  encodedArrayParams += encodedArrayParam;
97585
97598
  }
97586
97599
  }
@@ -145941,7 +145954,7 @@ class krakenfutures extends _abstract_krakenfutures_js__WEBPACK_IMPORTED_MODULE_
145941
145954
  let statusId = undefined;
145942
145955
  let price = undefined;
145943
145956
  let trades = [];
145944
- if (orderEvents.length > 0) {
145957
+ if (orderEvents.length) {
145945
145958
  const executions = [];
145946
145959
  for (let i = 0; i < orderEvents.length; i++) {
145947
145960
  const item = orderEvents[i];
@@ -145989,7 +146002,7 @@ class krakenfutures extends _abstract_krakenfutures_js__WEBPACK_IMPORTED_MODULE_
145989
146002
  let remaining = this.safeString(details, 'unfilledSize');
145990
146003
  let average = undefined;
145991
146004
  let filled2 = '0.0';
145992
- if (trades.length > 0) {
146005
+ if (trades.length) {
145993
146006
  let vwapSum = '0.0';
145994
146007
  for (let i = 0; i < trades.length; i++) {
145995
146008
  const trade = trades[i];
@@ -163028,6 +163041,7 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
163028
163041
  'rebate/detail': 1,
163029
163042
  'rebate/detail/kickback': 1,
163030
163043
  'rebate/referCode': 1,
163044
+ 'rebate/affiliate/commission': 1,
163031
163045
  'mxDeduct/enable': 1,
163032
163046
  'userDataStream': 1,
163033
163047
  },
@@ -175151,7 +175165,7 @@ class okcoin extends _abstract_okcoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
175151
175165
  }
175152
175166
  }
175153
175167
  else if (notional === undefined) {
175154
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder(this.id + " createOrder() requires the price argument with market buy orders to calculate total order cost (amount to spend), where cost = amount * price. Supply a price argument to createOrder() call if you want the cost to be calculated for you from price and amount, or, alternatively, add .options['createMarketBuyOrderRequiresPrice'] = false and supply the total cost value in the 'amount' argument or in the 'notional' extra parameter (the exchange-specific behaviour)");
175168
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder(this.id + ' createOrder() requires the price argument with market buy orders to calculate total order cost (amount to spend), where cost = amount * price. Supply a price argument to createOrder() call if you want the cost to be calculated for you from price and amount, or, alternatively, add .options["createMarketBuyOrderRequiresPrice"] = false and supply the total cost value in the "amount" argument or in the "notional" extra parameter (the exchange-specific behaviour)');
175155
175169
  }
175156
175170
  }
175157
175171
  else {
@@ -176628,7 +176642,7 @@ class okcoin extends _abstract_okcoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
176628
176642
  let currency = undefined;
176629
176643
  if (type === 'spot') {
176630
176644
  if (code === undefined) {
176631
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ArgumentsRequired(this.id + " fetchLedger() requires a currency code argument for '" + type + "' markets");
176645
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ArgumentsRequired(this.id + ' fetchLedger() requires a currency code argument for "' + type + '" markets');
176632
176646
  }
176633
176647
  argument = 'Currency';
176634
176648
  currency = this.currency(code);
@@ -181366,7 +181380,7 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
181366
181380
  const targetNetwork = this.safeValue(currency['networks'], this.networkIdToCode(network), {});
181367
181381
  fee = this.safeString(targetNetwork, 'fee');
181368
181382
  if (fee === undefined) {
181369
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ArgumentsRequired(this.id + " withdraw() requires a 'fee' string parameter, network transaction fee must be ≥ 0. Withdrawals to OKCoin or OKX are fee-free, please set '0'. Withdrawing to external digital asset address requires network transaction fee.");
181383
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ArgumentsRequired(this.id + ' withdraw() requires a "fee" string parameter, network transaction fee must be ≥ 0. Withdrawals to OKCoin or OKX are fee-free, please set "0". Withdrawing to external digital asset address requires network transaction fee.');
181370
181384
  }
181371
181385
  }
181372
181386
  request['fee'] = this.numberToString(fee); // withdrawals to OKCoin or OKX are fee-free, please set 0
@@ -186020,8 +186034,13 @@ class phemex extends _abstract_phemex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
186020
186034
  id = this.safeString2(trade, 'execId', 'execID');
186021
186035
  orderId = this.safeString(trade, 'orderID');
186022
186036
  if (market['settle'] === 'USDT') {
186023
- const sideId = this.safeString(trade, 'side');
186024
- side = (sideId === '1') ? 'buy' : 'sell';
186037
+ const sideId = this.safeStringLower(trade, 'side');
186038
+ if ((sideId === 'buy') || (sideId === 'sell')) {
186039
+ side = sideId;
186040
+ }
186041
+ else if (sideId !== undefined) {
186042
+ side = (sideId === '1') ? 'buy' : 'sell';
186043
+ }
186025
186044
  const ordType = this.safeString(trade, 'ordType');
186026
186045
  if (ordType === '1') {
186027
186046
  type = 'market';
@@ -186029,7 +186048,7 @@ class phemex extends _abstract_phemex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
186029
186048
  else if (ordType === '2') {
186030
186049
  type = 'limit';
186031
186050
  }
186032
- priceString = this.safeString(trade, 'priceRp');
186051
+ priceString = this.safeString(trade, 'execPriceRp');
186033
186052
  amountString = this.safeString(trade, 'execQtyRq');
186034
186053
  costString = this.safeString(trade, 'execValueRv');
186035
186054
  feeCostString = this.safeString(trade, 'execFeeRv');
@@ -190017,25 +190036,21 @@ class poloniex extends _abstract_poloniex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
190017
190036
  return this.parseOrders(response, market, since, limit, extension);
190018
190037
  }
190019
190038
  async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
190020
- //
190021
- // @method
190022
- // @name poloniex#createOrder
190023
- // @description create a trade order
190024
- // @see https://docs.poloniex.com/#authenticated-endpoints-orders-create-order
190025
- // @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-create-order // trigger orders
190026
- // @param {string} symbol unified symbol of the market to create an order in
190027
- // @param {string} type 'market' or 'limit'
190028
- // @param {string} side 'buy' or 'sell'
190029
- // @param {float} amount how much of currency you want to trade in units of base currency
190030
- // @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
190031
- // @param {object} [params] extra parameters specific to the poloniex api endpoint
190032
- // <<<<<<< HEAD
190033
- // @param {float} [params.triggerPrice] *spot only* The price at which a trigger order is triggered at
190034
- // @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
190035
- // =======
190036
- // @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
190037
- // >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
190038
- //
190039
+ /**
190040
+ * @method
190041
+ * @name poloniex#createOrder
190042
+ * @description create a trade order
190043
+ * @see https://docs.poloniex.com/#authenticated-endpoints-orders-create-order
190044
+ * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-create-order // trigger orders
190045
+ * @param {string} symbol unified symbol of the market to create an order in
190046
+ * @param {string} type 'market' or 'limit'
190047
+ * @param {string} side 'buy' or 'sell'
190048
+ * @param {float} amount how much of currency you want to trade in units of base currency
190049
+ * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
190050
+ * @param {object} [params] extra parameters specific to the poloniex api endpoint
190051
+ * @param {float} [params.triggerPrice] *spot only* The price at which a trigger order is triggered at
190052
+ * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
190053
+ */
190039
190054
  await this.loadMarkets();
190040
190055
  const market = this.market(symbol);
190041
190056
  if (!market['spot']) {
@@ -190104,26 +190119,22 @@ class poloniex extends _abstract_poloniex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
190104
190119
  return [request, params];
190105
190120
  }
190106
190121
  async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
190107
- //
190108
- // @method
190109
- // @name poloniex#editOrder
190110
- // @description edit a trade order
190111
- // @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-replace-order
190112
- // @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-replace-order
190113
- // @param {string} id order id
190114
- // @param {string} symbol unified symbol of the market to create an order in
190115
- // @param {string} type 'market' or 'limit'
190116
- // @param {string} side 'buy' or 'sell'
190117
- // @param {float} [amount] how much of the currency you want to trade in units of the base currency
190118
- // @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
190119
- // @param {object} [params] extra parameters specific to the poloniex api endpoint
190120
- // <<<<<<< HEAD
190121
- // @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
190122
- // @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
190123
- // =======
190124
- // @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
190125
- // >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
190126
- //
190122
+ /**
190123
+ * @method
190124
+ * @name poloniex#editOrder
190125
+ * @description edit a trade order
190126
+ * @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-replace-order
190127
+ * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-replace-order
190128
+ * @param {string} id order id
190129
+ * @param {string} symbol unified symbol of the market to create an order in
190130
+ * @param {string} type 'market' or 'limit'
190131
+ * @param {string} side 'buy' or 'sell'
190132
+ * @param {float} [amount] how much of the currency you want to trade in units of the base currency
190133
+ * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
190134
+ * @param {object} [params] extra parameters specific to the poloniex api endpoint
190135
+ * @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
190136
+ * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
190137
+ */
190127
190138
  await this.loadMarkets();
190128
190139
  const market = this.market(symbol);
190129
190140
  if (!market['spot']) {
@@ -190163,12 +190174,8 @@ class poloniex extends _abstract_poloniex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
190163
190174
  // @param {string} id order id
190164
190175
  // @param {string} symbol unified symbol of the market the order was made in
190165
190176
  // @param {object} [params] extra parameters specific to the poloniex api endpoint
190166
- // <<<<<<< HEAD
190167
190177
  // @param {boolean} [params.trigger] true if canceling a trigger order
190168
190178
  // @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
190169
- // =======
190170
- // @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
190171
- // >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
190172
190179
  //
190173
190180
  await this.loadMarkets();
190174
190181
  const request = {};
@@ -190198,21 +190205,17 @@ class poloniex extends _abstract_poloniex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
190198
190205
  return this.parseOrder(response);
190199
190206
  }
190200
190207
  async cancelAllOrders(symbol = undefined, params = {}) {
190201
- //
190202
- // @method
190203
- // @name poloniex#cancelAllOrders
190204
- // @description cancel all open orders
190205
- // @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-all-orders
190206
- // @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-all-orders // trigger orders
190207
- // @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
190208
- // @param {object} [params] extra parameters specific to the poloniex api endpoint
190209
- // <<<<<<< HEAD
190210
- // @param {boolean} [params.trigger] true if canceling trigger orders
190211
- // @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
190212
- // =======
190213
- // @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
190214
- // >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
190215
- //
190208
+ /**
190209
+ * @method
190210
+ * @name poloniex#cancelAllOrders
190211
+ * @description cancel all open orders
190212
+ * @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-all-orders
190213
+ * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-all-orders // trigger orders
190214
+ * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
190215
+ * @param {object} [params] extra parameters specific to the poloniex api endpoint
190216
+ * @param {boolean} [params.trigger] true if canceling trigger orders
190217
+ * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
190218
+ */
190216
190219
  await this.loadMarkets();
190217
190220
  const request = {
190218
190221
  // 'accountTypes': 'SPOT',
@@ -190254,22 +190257,18 @@ class poloniex extends _abstract_poloniex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
190254
190257
  return this.parseOrders(response, market);
190255
190258
  }
190256
190259
  async fetchOrder(id, symbol = undefined, params = {}) {
190257
- //
190258
- // @method
190259
- // @name poloniex#fetchOrder
190260
- // @description fetch an order by it's id
190261
- // @see https://docs.poloniex.com/#authenticated-endpoints-orders-order-details
190262
- // @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-open-orders // trigger orders
190263
- // @param {string} id order id
190264
- // @param {string} symbol unified market symbol, default is undefined
190265
- // @param {object} [params] extra parameters specific to the poloniex api endpoint
190266
- // <<<<<<< HEAD
190267
- // @param {boolean} [params.trigger] true if fetching a trigger order
190268
- // @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
190269
- // =======
190270
- // @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
190271
- // >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
190272
- //
190260
+ /**
190261
+ * @method
190262
+ * @name poloniex#fetchOrder
190263
+ * @description fetch an order by it's id
190264
+ * @see https://docs.poloniex.com/#authenticated-endpoints-orders-order-details
190265
+ * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-open-orders // trigger orders
190266
+ * @param {string} id order id
190267
+ * @param {string} symbol unified market symbol, default is undefined
190268
+ * @param {object} [params] extra parameters specific to the poloniex api endpoint
190269
+ * @param {boolean} [params.trigger] true if fetching a trigger order
190270
+ * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
190271
+ */
190273
190272
  await this.loadMarkets();
190274
190273
  id = id.toString();
190275
190274
  const request = {
@@ -199159,9 +199158,18 @@ class bitget extends _bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
199159
199158
  'ws': {
199160
199159
  'exact': {
199161
199160
  '30001': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest,
199161
+ '30002': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.AuthenticationError,
199162
+ '30003': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest,
199163
+ '30004': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.AuthenticationError,
199164
+ '30005': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.AuthenticationError,
199165
+ '30006': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.RateLimitExceeded,
199166
+ '30007': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.RateLimitExceeded,
199167
+ '30011': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.AuthenticationError,
199168
+ '30012': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.AuthenticationError,
199169
+ '30013': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.AuthenticationError,
199170
+ '30014': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest,
199162
199171
  '30015': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.AuthenticationError,
199163
- '30016': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest,
199164
- '30011': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.AuthenticationError, // { event: 'error', code: 30011, msg: 'Invalid ACCESS_KEY' }
199172
+ '30016': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest, // { event: 'error', code: 30016, msg: 'Param error' }
199165
199173
  },
199166
199174
  },
199167
199175
  },
@@ -200251,6 +200259,9 @@ class bitget extends _bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
200251
200259
  const code = this.safeString(message, 'code');
200252
200260
  const feedback = this.id + ' ' + this.json(message);
200253
200261
  this.throwExactlyMatchedException(this.exceptions['ws']['exact'], code, feedback);
200262
+ const msg = this.safeString(message, 'msg', '');
200263
+ this.throwBroadlyMatchedException(this.exceptions['ws']['broad'], msg, feedback);
200264
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ExchangeError(feedback);
200254
200265
  }
200255
200266
  return false;
200256
200267
  }
@@ -200262,6 +200273,10 @@ class bitget extends _bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
200262
200273
  delete client.subscriptions[messageHash];
200263
200274
  }
200264
200275
  }
200276
+ else {
200277
+ // Note: if error happens on a subscribe event, user will have to close exchange to resubscribe. Issue #19041
200278
+ client.reject(e);
200279
+ }
200265
200280
  return true;
200266
200281
  }
200267
200282
  }
@@ -216214,15 +216229,17 @@ class gate extends _gate_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
216214
216229
  const subscription = this.safeString(ohlcv, 'n', '');
216215
216230
  const parts = subscription.split('_');
216216
216231
  const timeframe = this.safeString(parts, 0);
216232
+ const timeframeId = this.findTimeframe(timeframe);
216217
216233
  const prefix = timeframe + '_';
216218
216234
  const marketId = subscription.replace(prefix, '');
216219
216235
  const symbol = this.safeSymbol(marketId, undefined, '_', marketType);
216220
216236
  const parsed = this.parseOHLCV(ohlcv);
216221
- let stored = this.safeValue(this.ohlcvs, symbol);
216237
+ this.ohlcvs[symbol] = this.safeValue(this.ohlcvs, symbol, {});
216238
+ let stored = this.safeValue(this.ohlcvs[symbol], timeframe);
216222
216239
  if (stored === undefined) {
216223
216240
  const limit = this.safeInteger(this.options, 'OHLCVLimit', 1000);
216224
216241
  stored = new _base_ws_Cache_js__WEBPACK_IMPORTED_MODULE_2__/* .ArrayCacheByTimestamp */ .Py(limit);
216225
- this.ohlcvs[symbol] = stored;
216242
+ this.ohlcvs[symbol][timeframeId] = stored;
216226
216243
  }
216227
216244
  stored.append(parsed);
216228
216245
  marketIds[symbol] = timeframe;
@@ -216233,7 +216250,7 @@ class gate extends _gate_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
216233
216250
  const timeframe = marketIds[symbol];
216234
216251
  const interval = this.findTimeframe(timeframe);
216235
216252
  const hash = 'candles' + ':' + interval + ':' + symbol;
216236
- const stored = this.safeValue(this.ohlcvs, symbol);
216253
+ const stored = this.safeValue(this.ohlcvs[symbol], interval);
216237
216254
  client.resolve(stored, hash);
216238
216255
  }
216239
216256
  }
@@ -223094,8 +223111,8 @@ class kraken extends _kraken_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
223094
223111
  }
223095
223112
  }
223096
223113
  formatNumber(n, length) {
223097
- const string = this.numberToString(n);
223098
- const parts = string.split('.');
223114
+ const stringNumber = this.numberToString(n);
223115
+ const parts = stringNumber.split('.');
223099
223116
  const integer = this.safeString(parts, 0);
223100
223117
  const decimals = this.safeString(parts, 1, '');
223101
223118
  const paddedDecimals = decimals.padEnd(length, '0');
@@ -238947,7 +238964,7 @@ class probit extends _abstract_probit_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
238947
238964
  }
238948
238965
  }
238949
238966
  else if (cost === undefined) {
238950
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder(this.id + " createOrder() requires the price argument for market buy orders to calculate total order cost (amount to spend), where cost = amount * price. Supply a price argument to createOrder() call if you want the cost to be calculated for you from price and amount, or, alternatively, add .options['createMarketBuyOrderRequiresPrice'] = false and supply the total cost value in the 'amount' argument or in the 'cost' extra parameter (the exchange-specific behaviour)");
238967
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder(this.id + ' createOrder() requires the price argument for market buy orders to calculate total order cost (amount to spend), where cost = amount * price. Supply a price argument to createOrder() call if you want the cost to be calculated for you from price and amount, or, alternatively, add .options["createMarketBuyOrderRequiresPrice"] = false and supply the total cost value in the "amount" argument or in the "cost" extra parameter (the exchange-specific behaviour)');
238951
238968
  }
238952
238969
  }
238953
238970
  else {
@@ -239417,7 +239434,7 @@ class probit extends _abstract_probit_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
239417
239434
  const networkCode = this.networkIdToCode(networkId, currency['code']);
239418
239435
  const withdrawalFees = this.safeValue(network, 'withdrawal_fee', {});
239419
239436
  const withdrawFee = this.safeNumber(withdrawalFees[0], 'amount');
239420
- if (withdrawalFees.length > 0) {
239437
+ if (withdrawalFees.length) {
239421
239438
  const withdrawResult = {
239422
239439
  'fee': withdrawFee,
239423
239440
  'percentage': (withdrawFee !== undefined) ? false : undefined,
@@ -254693,7 +254710,7 @@ class upbit extends _abstract_upbit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
254693
254710
  if (side === 'buy') {
254694
254711
  if (this.options['createMarketBuyOrderRequiresPrice']) {
254695
254712
  if (price === undefined) {
254696
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder(this.id + " createOrder() requires the price argument with market buy orders to calculate total order cost (amount to spend), where cost = amount * price. Supply a price argument to createOrder() call if you want the cost to be calculated for you from price and amount, or, alternatively, add .options['createMarketBuyOrderRequiresPrice'] = false to supply the cost in the amount argument (the exchange-specific behaviour)");
254713
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder(this.id + ' createOrder() requires the price argument with market buy orders to calculate total order cost (amount to spend), where cost = amount * price. Supply a price argument to createOrder() call if you want the cost to be calculated for you from price and amount, or, alternatively, add .options["createMarketBuyOrderRequiresPrice"] = false to supply the cost in the amount argument (the exchange-specific behaviour)');
254697
254714
  }
254698
254715
  else {
254699
254716
  amount = amount * price;
@@ -257811,7 +257828,8 @@ class wavesexchange extends _abstract_wavesexchange_js__WEBPACK_IMPORTED_MODULE_
257811
257828
  const entry = depositWithdrawFees[code];
257812
257829
  const networks = this.safeValue(entry, 'networks');
257813
257830
  const networkKeys = Object.keys(networks);
257814
- if (networkKeys.length === 1) {
257831
+ const networkKeysLength = networkKeys.length;
257832
+ if (networkKeysLength === 1) {
257815
257833
  const network = this.safeValue(networks, networkKeys[0]);
257816
257834
  depositWithdrawFees[code]['withdraw'] = this.safeValue(network, 'withdraw');
257817
257835
  depositWithdrawFees[code]['deposit'] = this.safeValue(network, 'deposit');
@@ -257953,7 +257971,8 @@ class wavesexchange extends _abstract_wavesexchange_js__WEBPACK_IMPORTED_MODULE_
257953
257971
  let isErc20 = true;
257954
257972
  const noPrefix = this.remove0xPrefix(address);
257955
257973
  const lower = noPrefix.toLowerCase();
257956
- for (let i = 0; i < lower.length; i++) {
257974
+ const stringLength = lower.length * 1;
257975
+ for (let i = 0; i < stringLength; i++) {
257957
257976
  const character = lower[i];
257958
257977
  if (!(character in set)) {
257959
257978
  isErc20 = false;
@@ -258912,6 +258931,7 @@ class wazirx extends _abstract_wazirx_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
258912
258931
  const stopPrice = this.safeString(params, 'stopPrice');
258913
258932
  if (stopPrice !== undefined) {
258914
258933
  request['type'] = 'stop_limit';
258934
+ request['stopPrice'] = this.priceToPrecision(symbol, stopPrice);
258915
258935
  }
258916
258936
  const response = await this.privatePostOrder(this.extend(request, params));
258917
258937
  // {
@@ -273444,7 +273464,7 @@ SOFTWARE.
273444
273464
 
273445
273465
  //-----------------------------------------------------------------------------
273446
273466
  // this is updated by vss.js when building
273447
- const version = '4.0.78';
273467
+ const version = '4.0.80';
273448
273468
  _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange.ccxtVersion */ .e.ccxtVersion = version;
273449
273469
  //-----------------------------------------------------------------------------
273450
273470