ccxt 4.1.48 → 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.
- package/README.md +5 -5
- package/dist/ccxt.browser.js +126 -77
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/coinex.js +67 -18
- package/dist/cjs/src/mexc.js +21 -21
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/huobi.js +3 -3
- package/js/src/coinex.js +67 -18
- package/js/src/mexc.js +21 -21
- package/package.json +1 -1
package/js/src/mexc.js
CHANGED
|
@@ -133,8 +133,8 @@ export default class mexc extends Exchange {
|
|
|
133
133
|
},
|
|
134
134
|
'www': 'https://www.mexc.com/',
|
|
135
135
|
'doc': [
|
|
136
|
-
'https://
|
|
137
|
-
'https://
|
|
136
|
+
'https://mexcdevelop.github.io/apidocs/spot_v3_en/',
|
|
137
|
+
'https://mexcdevelop.github.io/APIDoc/', // v1 & v2 : soon to be deprecated
|
|
138
138
|
],
|
|
139
139
|
'fees': [
|
|
140
140
|
'https://www.mexc.com/fee',
|
|
@@ -886,7 +886,7 @@ export default class mexc extends Exchange {
|
|
|
886
886
|
* @method
|
|
887
887
|
* @name mexc3#fetchCurrencies
|
|
888
888
|
* @description fetches all available currencies on an exchange
|
|
889
|
-
* @see https://
|
|
889
|
+
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
|
|
890
890
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
891
891
|
* @returns {object} an associative dictionary of currencies
|
|
892
892
|
*/
|
|
@@ -1286,8 +1286,8 @@ export default class mexc extends Exchange {
|
|
|
1286
1286
|
/**
|
|
1287
1287
|
* @method
|
|
1288
1288
|
* @name mexc3#fetchOrderBook
|
|
1289
|
-
* @see https://
|
|
1290
|
-
* @see https://
|
|
1289
|
+
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#order-book
|
|
1290
|
+
* @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-contract-s-depth-information
|
|
1291
1291
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
1292
1292
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1293
1293
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
@@ -3535,9 +3535,9 @@ export default class mexc extends Exchange {
|
|
|
3535
3535
|
* @method
|
|
3536
3536
|
* @name mexc3#fetchBalance
|
|
3537
3537
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
3538
|
-
* @see https://
|
|
3539
|
-
* @see https://
|
|
3540
|
-
* @see https://
|
|
3538
|
+
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#account-information
|
|
3539
|
+
* @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-all-informations-of-user-39-s-asset
|
|
3540
|
+
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#isolated-account
|
|
3541
3541
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
3542
3542
|
* @param {string} [params.symbols] // required for margin, market id's separated by commas
|
|
3543
3543
|
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
@@ -4234,7 +4234,7 @@ export default class mexc extends Exchange {
|
|
|
4234
4234
|
* @method
|
|
4235
4235
|
* @name mexc3#fetchDepositAddressesByNetwork
|
|
4236
4236
|
* @description fetch a dictionary of addresses for a currency, indexed by network
|
|
4237
|
-
* @see https://
|
|
4237
|
+
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
|
|
4238
4238
|
* @param {string} code unified currency code of the currency for the deposit address
|
|
4239
4239
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
4240
4240
|
* @returns {object} a dictionary of [address structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure} indexed by the network
|
|
@@ -4273,7 +4273,7 @@ export default class mexc extends Exchange {
|
|
|
4273
4273
|
/**
|
|
4274
4274
|
* @method
|
|
4275
4275
|
* @name mexc3#createDepositAddress
|
|
4276
|
-
* @see https://
|
|
4276
|
+
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#generate-deposit-address-supporting-network
|
|
4277
4277
|
* @description create a currency deposit address
|
|
4278
4278
|
* @param {string} code unified currency code of the currency for the deposit address
|
|
4279
4279
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
@@ -4314,7 +4314,7 @@ export default class mexc extends Exchange {
|
|
|
4314
4314
|
* @method
|
|
4315
4315
|
* @name mexc3#fetchDepositAddress
|
|
4316
4316
|
* @description fetch the deposit address for a currency associated with this account
|
|
4317
|
-
* @see https://
|
|
4317
|
+
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
|
|
4318
4318
|
* @param {string} code unified currency code
|
|
4319
4319
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
4320
4320
|
* @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
|
|
@@ -4342,7 +4342,7 @@ export default class mexc extends Exchange {
|
|
|
4342
4342
|
* @method
|
|
4343
4343
|
* @name mexc3#fetchDeposits
|
|
4344
4344
|
* @description fetch all deposits made to an account
|
|
4345
|
-
* @see https://
|
|
4345
|
+
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-history-supporting-network
|
|
4346
4346
|
* @param {string} code unified currency code
|
|
4347
4347
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
4348
4348
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
@@ -4402,7 +4402,7 @@ export default class mexc extends Exchange {
|
|
|
4402
4402
|
* @method
|
|
4403
4403
|
* @name mexc3#fetchWithdrawals
|
|
4404
4404
|
* @description fetch all withdrawals made from an account
|
|
4405
|
-
* @see https://
|
|
4405
|
+
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#withdraw-history-supporting-network
|
|
4406
4406
|
* @param {string} code unified currency code
|
|
4407
4407
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
4408
4408
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
@@ -4821,7 +4821,7 @@ export default class mexc extends Exchange {
|
|
|
4821
4821
|
* @method
|
|
4822
4822
|
* @name mexc3#transfer
|
|
4823
4823
|
* @description transfer currency internally between wallets on the same account
|
|
4824
|
-
* @see https://
|
|
4824
|
+
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#user-universal-transfer
|
|
4825
4825
|
* @param {string} code unified currency code
|
|
4826
4826
|
* @param {float} amount amount to transfer
|
|
4827
4827
|
* @param {string} fromAccount account to transfer from
|
|
@@ -4954,7 +4954,7 @@ export default class mexc extends Exchange {
|
|
|
4954
4954
|
* @method
|
|
4955
4955
|
* @name mexc3#withdraw
|
|
4956
4956
|
* @description make a withdrawal
|
|
4957
|
-
* @see https://
|
|
4957
|
+
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#withdraw
|
|
4958
4958
|
* @param {string} code unified currency code
|
|
4959
4959
|
* @param {float} amount the amount to withdraw
|
|
4960
4960
|
* @param {string} address the address to withdraw to
|
|
@@ -4964,7 +4964,7 @@ export default class mexc extends Exchange {
|
|
|
4964
4964
|
*/
|
|
4965
4965
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
4966
4966
|
const networks = this.safeValue(this.options, 'networks', {});
|
|
4967
|
-
let network = this.
|
|
4967
|
+
let network = this.safeString2(params, 'network', 'chain'); // this line allows the user to specify either ERC20 or ETH
|
|
4968
4968
|
network = this.safeString(networks, network, network); // handle ETH > ERC-20 alias
|
|
4969
4969
|
this.checkAddress(address);
|
|
4970
4970
|
await this.loadMarkets();
|
|
@@ -4979,7 +4979,7 @@ export default class mexc extends Exchange {
|
|
|
4979
4979
|
}
|
|
4980
4980
|
if (network !== undefined) {
|
|
4981
4981
|
request['network'] = network;
|
|
4982
|
-
params = this.omit(params, 'network');
|
|
4982
|
+
params = this.omit(params, ['network', 'chain']);
|
|
4983
4983
|
}
|
|
4984
4984
|
const response = await this.spotPrivatePostCapitalWithdrawApply(this.extend(request, params));
|
|
4985
4985
|
//
|
|
@@ -5022,7 +5022,7 @@ export default class mexc extends Exchange {
|
|
|
5022
5022
|
* @method
|
|
5023
5023
|
* @name mexc3#borrowMargin
|
|
5024
5024
|
* @description create a loan to borrow margin
|
|
5025
|
-
* @see https://
|
|
5025
|
+
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#loan
|
|
5026
5026
|
* @param {string} code unified currency code of the currency to borrow
|
|
5027
5027
|
* @param {float} amount the amount to borrow
|
|
5028
5028
|
* @param {string} symbol unified market symbol
|
|
@@ -5055,7 +5055,7 @@ export default class mexc extends Exchange {
|
|
|
5055
5055
|
* @method
|
|
5056
5056
|
* @name mexc3#repayMargin
|
|
5057
5057
|
* @description repay borrowed margin and interest
|
|
5058
|
-
* @see https://
|
|
5058
|
+
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#repayment
|
|
5059
5059
|
* @param {string} code unified currency code of the currency to repay
|
|
5060
5060
|
* @param {float} amount the amount to repay
|
|
5061
5061
|
* @param {string} symbol unified market symbol
|
|
@@ -5094,7 +5094,7 @@ export default class mexc extends Exchange {
|
|
|
5094
5094
|
* @method
|
|
5095
5095
|
* @name mexc3#fetchTransactionFees
|
|
5096
5096
|
* @description fetch deposit and withdrawal fees
|
|
5097
|
-
* @see https://
|
|
5097
|
+
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
|
|
5098
5098
|
* @param {string[]|undefined} codes returns fees for all currencies if undefined
|
|
5099
5099
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
5100
5100
|
* @returns {object[]} a list of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
@@ -5192,7 +5192,7 @@ export default class mexc extends Exchange {
|
|
|
5192
5192
|
* @method
|
|
5193
5193
|
* @name mexc3#fetchDepositWithdrawFees
|
|
5194
5194
|
* @description fetch deposit and withdrawal fees
|
|
5195
|
-
* @see https://
|
|
5195
|
+
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
|
|
5196
5196
|
* @param {string[]|undefined} codes returns fees for all currencies if undefined
|
|
5197
5197
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
5198
5198
|
* @returns {object[]} a list of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
package/package.json
CHANGED