ccxt 4.1.47 → 4.1.49

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 (114) hide show
  1. package/README.md +124 -124
  2. package/dist/ccxt.browser.js +670 -460
  3. package/dist/ccxt.browser.min.js +3 -3
  4. package/dist/cjs/ccxt.js +6 -1
  5. package/dist/cjs/src/abstract/htx.js +9 -0
  6. package/dist/cjs/src/binance.js +2 -0
  7. package/dist/cjs/src/bitmart.js +183 -62
  8. package/dist/cjs/src/coinex.js +67 -18
  9. package/dist/cjs/src/htx.js +8505 -0
  10. package/dist/cjs/src/huobi.js +5 -8503
  11. package/dist/cjs/src/kraken.js +0 -4
  12. package/dist/cjs/src/mexc.js +21 -21
  13. package/dist/cjs/src/pro/htx.js +2356 -0
  14. package/dist/cjs/src/pro/huobi.js +5 -2345
  15. package/dist/cjs/src/timex.js +1 -1
  16. package/js/ccxt.d.ts +8 -2
  17. package/js/ccxt.js +6 -2
  18. package/js/src/abstract/binance.d.ts +2 -0
  19. package/js/src/abstract/binancecoinm.d.ts +2 -0
  20. package/js/src/abstract/binanceus.d.ts +2 -0
  21. package/js/src/abstract/binanceusdm.d.ts +2 -0
  22. package/js/src/abstract/htx.d.ts +544 -0
  23. package/js/src/abstract/htx.js +11 -0
  24. package/js/src/abstract/huobi.d.ts +4 -4
  25. package/js/src/abstract/huobi.js +3 -3
  26. package/js/src/ace.d.ts +2 -2
  27. package/js/src/ascendex.d.ts +2 -2
  28. package/js/src/base/Exchange.d.ts +2 -2
  29. package/js/src/base/types.d.ts +0 -1
  30. package/js/src/bigone.d.ts +2 -2
  31. package/js/src/binance.d.ts +3 -56
  32. package/js/src/binance.js +2 -0
  33. package/js/src/bingx.d.ts +3 -55
  34. package/js/src/bitbns.d.ts +2 -2
  35. package/js/src/bitfinex.d.ts +2 -2
  36. package/js/src/bitfinex2.d.ts +2 -2
  37. package/js/src/bitget.d.ts +3 -53
  38. package/js/src/bithumb.d.ts +2 -2
  39. package/js/src/bitmart.d.ts +4 -2
  40. package/js/src/bitmart.js +183 -62
  41. package/js/src/bitmex.d.ts +2 -2
  42. package/js/src/bitopro.d.ts +2 -2
  43. package/js/src/bitpanda.d.ts +2 -2
  44. package/js/src/bitrue.d.ts +2 -2
  45. package/js/src/bitstamp.d.ts +2 -2
  46. package/js/src/bittrex.d.ts +2 -2
  47. package/js/src/bitvavo.d.ts +2 -2
  48. package/js/src/blockchaincom.d.ts +2 -2
  49. package/js/src/btcalpha.d.ts +2 -2
  50. package/js/src/btcturk.d.ts +2 -2
  51. package/js/src/bybit.d.ts +2 -2
  52. package/js/src/cex.d.ts +2 -2
  53. package/js/src/coinbase.d.ts +2 -2
  54. package/js/src/coinbasepro.d.ts +2 -2
  55. package/js/src/coinex.d.ts +2 -2
  56. package/js/src/coinex.js +67 -18
  57. package/js/src/coinfalcon.d.ts +2 -2
  58. package/js/src/coinlist.d.ts +2 -2
  59. package/js/src/coinone.d.ts +2 -2
  60. package/js/src/coinsph.d.ts +2 -2
  61. package/js/src/coinspot.d.ts +2 -2
  62. package/js/src/cryptocom.d.ts +2 -2
  63. package/js/src/currencycom.d.ts +2 -2
  64. package/js/src/delta.d.ts +2 -2
  65. package/js/src/deribit.d.ts +2 -2
  66. package/js/src/digifinex.d.ts +2 -2
  67. package/js/src/exmo.d.ts +2 -2
  68. package/js/src/gate.d.ts +2 -2
  69. package/js/src/gemini.d.ts +3 -51
  70. package/js/src/hitbtc.d.ts +2 -2
  71. package/js/src/hollaex.d.ts +2 -2
  72. package/js/src/htx.d.ts +257 -0
  73. package/js/src/htx.js +8506 -0
  74. package/js/src/huobi.d.ts +2 -255
  75. package/js/src/huobi.js +5 -8503
  76. package/js/src/huobijp.d.ts +2 -2
  77. package/js/src/idex.d.ts +2 -2
  78. package/js/src/indodax.d.ts +2 -2
  79. package/js/src/kraken.d.ts +2 -2
  80. package/js/src/kraken.js +0 -4
  81. package/js/src/krakenfutures.d.ts +2 -2
  82. package/js/src/kucoin.d.ts +2 -2
  83. package/js/src/kuna.d.ts +2 -2
  84. package/js/src/latoken.d.ts +2 -2
  85. package/js/src/lbank.d.ts +2 -2
  86. package/js/src/lbank2.d.ts +2 -2
  87. package/js/src/luno.d.ts +2 -2
  88. package/js/src/lykke.d.ts +2 -2
  89. package/js/src/mexc.d.ts +2 -2
  90. package/js/src/mexc.js +21 -21
  91. package/js/src/novadax.d.ts +2 -2
  92. package/js/src/oceanex.d.ts +2 -2
  93. package/js/src/okcoin.d.ts +3 -3
  94. package/js/src/okx.d.ts +3 -3
  95. package/js/src/phemex.d.ts +2 -2
  96. package/js/src/poloniex.d.ts +2 -2
  97. package/js/src/poloniexfutures.d.ts +2 -2
  98. package/js/src/pro/htx.d.ts +45 -0
  99. package/js/src/pro/htx.js +2357 -0
  100. package/js/src/pro/huobi.d.ts +2 -43
  101. package/js/src/pro/huobi.js +5 -2345
  102. package/js/src/probit.d.ts +2 -2
  103. package/js/src/tidex.d.ts +2 -2
  104. package/js/src/timex.d.ts +3 -53
  105. package/js/src/timex.js +1 -1
  106. package/js/src/tokocrypto.d.ts +2 -2
  107. package/js/src/upbit.d.ts +2 -2
  108. package/js/src/wavesexchange.d.ts +2 -2
  109. package/js/src/wazirx.d.ts +2 -2
  110. package/js/src/whitebit.d.ts +2 -2
  111. package/js/src/yobit.d.ts +2 -2
  112. package/js/src/zonda.d.ts +2 -2
  113. package/package.json +1 -1
  114. package/skip-tests.json +4 -4
@@ -978,7 +978,6 @@ class kraken extends kraken$1 {
978
978
  /**
979
979
  * @method
980
980
  * @name kraken#fetchLedger
981
- * @see https://docs.kraken.com/rest/#tag/Account-Data/operation/getLedgers
982
981
  * @description fetch the history of changes, actions done by the user or operations that altered balance of the user
983
982
  * @see https://docs.kraken.com/rest/#tag/Account-Data/operation/getLedgers
984
983
  * @param {string} code unified currency code, default is undefined
@@ -1954,7 +1953,6 @@ class kraken extends kraken$1 {
1954
1953
  /**
1955
1954
  * @method
1956
1955
  * @name kraken#fetchOpenOrders
1957
- * @see https://docs.kraken.com/rest/#tag/Account-Data/operation/getOpenOrders
1958
1956
  * @description fetch all unfilled currently open orders
1959
1957
  * @see https://docs.kraken.com/rest/#tag/Account-Data/operation/getOpenOrders
1960
1958
  * @param {string} symbol unified market symbol
@@ -1987,7 +1985,6 @@ class kraken extends kraken$1 {
1987
1985
  /**
1988
1986
  * @method
1989
1987
  * @name kraken#fetchClosedOrders
1990
- * @see https://docs.kraken.com/rest/#tag/Account-Data/operation/getClosedOrders
1991
1988
  * @description fetches information on multiple closed orders made by the user
1992
1989
  * @see https://docs.kraken.com/rest/#tag/Account-Data/operation/getClosedOrders
1993
1990
  * @param {string} symbol unified market symbol of the market orders were made in
@@ -2188,7 +2185,6 @@ class kraken extends kraken$1 {
2188
2185
  /**
2189
2186
  * @method
2190
2187
  * @name kraken#fetchDeposits
2191
- * @see https://docs.kraken.com/rest/#tag/Funding/operation/getStatusRecentDeposits
2192
2188
  * @description fetch all deposits made to an account
2193
2189
  * @see https://docs.kraken.com/rest/#tag/Funding/operation/getStatusRecentDeposits
2194
2190
  * @param {string} code unified currency code
@@ -130,8 +130,8 @@ class mexc extends mexc$1 {
130
130
  },
131
131
  'www': 'https://www.mexc.com/',
132
132
  'doc': [
133
- 'https://mxcdevelop.github.io/apidocs/spot_v3_en/',
134
- 'https://mxcdevelop.github.io/APIDoc/', // v1 & v2 : soon to be deprecated
133
+ 'https://mexcdevelop.github.io/apidocs/spot_v3_en/',
134
+ 'https://mexcdevelop.github.io/APIDoc/', // v1 & v2 : soon to be deprecated
135
135
  ],
136
136
  'fees': [
137
137
  'https://www.mexc.com/fee',
@@ -883,7 +883,7 @@ class mexc extends mexc$1 {
883
883
  * @method
884
884
  * @name mexc3#fetchCurrencies
885
885
  * @description fetches all available currencies on an exchange
886
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
886
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
887
887
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
888
888
  * @returns {object} an associative dictionary of currencies
889
889
  */
@@ -1283,8 +1283,8 @@ class mexc extends mexc$1 {
1283
1283
  /**
1284
1284
  * @method
1285
1285
  * @name mexc3#fetchOrderBook
1286
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#order-book
1287
- * @see https://mxcdevelop.github.io/apidocs/contract_v1_en/#get-the-contract-s-depth-information
1286
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#order-book
1287
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-contract-s-depth-information
1288
1288
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
1289
1289
  * @param {string} symbol unified symbol of the market to fetch the order book for
1290
1290
  * @param {int} [limit] the maximum amount of order book entries to return
@@ -3531,9 +3531,9 @@ class mexc extends mexc$1 {
3531
3531
  * @method
3532
3532
  * @name mexc3#fetchBalance
3533
3533
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
3534
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#account-information
3535
- * @see https://mxcdevelop.github.io/apidocs/contract_v1_en/#get-all-informations-of-user-39-s-asset
3536
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#isolated-account
3534
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#account-information
3535
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-all-informations-of-user-39-s-asset
3536
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#isolated-account
3537
3537
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
3538
3538
  * @param {string} [params.symbols] // required for margin, market id's separated by commas
3539
3539
  * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
@@ -4230,7 +4230,7 @@ class mexc extends mexc$1 {
4230
4230
  * @method
4231
4231
  * @name mexc3#fetchDepositAddressesByNetwork
4232
4232
  * @description fetch a dictionary of addresses for a currency, indexed by network
4233
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
4233
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
4234
4234
  * @param {string} code unified currency code of the currency for the deposit address
4235
4235
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
4236
4236
  * @returns {object} a dictionary of [address structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure} indexed by the network
@@ -4269,7 +4269,7 @@ class mexc extends mexc$1 {
4269
4269
  /**
4270
4270
  * @method
4271
4271
  * @name mexc3#createDepositAddress
4272
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#generate-deposit-address-supporting-network
4272
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#generate-deposit-address-supporting-network
4273
4273
  * @description create a currency deposit address
4274
4274
  * @param {string} code unified currency code of the currency for the deposit address
4275
4275
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
@@ -4310,7 +4310,7 @@ class mexc extends mexc$1 {
4310
4310
  * @method
4311
4311
  * @name mexc3#fetchDepositAddress
4312
4312
  * @description fetch the deposit address for a currency associated with this account
4313
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
4313
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
4314
4314
  * @param {string} code unified currency code
4315
4315
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
4316
4316
  * @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
@@ -4338,7 +4338,7 @@ class mexc extends mexc$1 {
4338
4338
  * @method
4339
4339
  * @name mexc3#fetchDeposits
4340
4340
  * @description fetch all deposits made to an account
4341
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#deposit-history-supporting-network
4341
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-history-supporting-network
4342
4342
  * @param {string} code unified currency code
4343
4343
  * @param {int} [since] the earliest time in ms to fetch deposits for
4344
4344
  * @param {int} [limit] the maximum number of deposits structures to retrieve
@@ -4398,7 +4398,7 @@ class mexc extends mexc$1 {
4398
4398
  * @method
4399
4399
  * @name mexc3#fetchWithdrawals
4400
4400
  * @description fetch all withdrawals made from an account
4401
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#withdraw-history-supporting-network
4401
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#withdraw-history-supporting-network
4402
4402
  * @param {string} code unified currency code
4403
4403
  * @param {int} [since] the earliest time in ms to fetch withdrawals for
4404
4404
  * @param {int} [limit] the maximum number of withdrawals structures to retrieve
@@ -4817,7 +4817,7 @@ class mexc extends mexc$1 {
4817
4817
  * @method
4818
4818
  * @name mexc3#transfer
4819
4819
  * @description transfer currency internally between wallets on the same account
4820
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#user-universal-transfer
4820
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#user-universal-transfer
4821
4821
  * @param {string} code unified currency code
4822
4822
  * @param {float} amount amount to transfer
4823
4823
  * @param {string} fromAccount account to transfer from
@@ -4950,7 +4950,7 @@ class mexc extends mexc$1 {
4950
4950
  * @method
4951
4951
  * @name mexc3#withdraw
4952
4952
  * @description make a withdrawal
4953
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#withdraw
4953
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#withdraw
4954
4954
  * @param {string} code unified currency code
4955
4955
  * @param {float} amount the amount to withdraw
4956
4956
  * @param {string} address the address to withdraw to
@@ -4960,7 +4960,7 @@ class mexc extends mexc$1 {
4960
4960
  */
4961
4961
  [tag, params] = this.handleWithdrawTagAndParams(tag, params);
4962
4962
  const networks = this.safeValue(this.options, 'networks', {});
4963
- let network = this.safeStringUpper2(params, 'network', 'chain'); // this line allows the user to specify either ERC20 or ETH
4963
+ let network = this.safeString2(params, 'network', 'chain'); // this line allows the user to specify either ERC20 or ETH
4964
4964
  network = this.safeString(networks, network, network); // handle ETH > ERC-20 alias
4965
4965
  this.checkAddress(address);
4966
4966
  await this.loadMarkets();
@@ -4975,7 +4975,7 @@ class mexc extends mexc$1 {
4975
4975
  }
4976
4976
  if (network !== undefined) {
4977
4977
  request['network'] = network;
4978
- params = this.omit(params, 'network');
4978
+ params = this.omit(params, ['network', 'chain']);
4979
4979
  }
4980
4980
  const response = await this.spotPrivatePostCapitalWithdrawApply(this.extend(request, params));
4981
4981
  //
@@ -5018,7 +5018,7 @@ class mexc extends mexc$1 {
5018
5018
  * @method
5019
5019
  * @name mexc3#borrowMargin
5020
5020
  * @description create a loan to borrow margin
5021
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#loan
5021
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#loan
5022
5022
  * @param {string} code unified currency code of the currency to borrow
5023
5023
  * @param {float} amount the amount to borrow
5024
5024
  * @param {string} symbol unified market symbol
@@ -5051,7 +5051,7 @@ class mexc extends mexc$1 {
5051
5051
  * @method
5052
5052
  * @name mexc3#repayMargin
5053
5053
  * @description repay borrowed margin and interest
5054
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#repayment
5054
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#repayment
5055
5055
  * @param {string} code unified currency code of the currency to repay
5056
5056
  * @param {float} amount the amount to repay
5057
5057
  * @param {string} symbol unified market symbol
@@ -5090,7 +5090,7 @@ class mexc extends mexc$1 {
5090
5090
  * @method
5091
5091
  * @name mexc3#fetchTransactionFees
5092
5092
  * @description fetch deposit and withdrawal fees
5093
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
5093
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
5094
5094
  * @param {string[]|undefined} codes returns fees for all currencies if undefined
5095
5095
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
5096
5096
  * @returns {object[]} a list of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
@@ -5188,7 +5188,7 @@ class mexc extends mexc$1 {
5188
5188
  * @method
5189
5189
  * @name mexc3#fetchDepositWithdrawFees
5190
5190
  * @description fetch deposit and withdrawal fees
5191
- * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
5191
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
5192
5192
  * @param {string[]|undefined} codes returns fees for all currencies if undefined
5193
5193
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
5194
5194
  * @returns {object[]} a list of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}