ccxt 4.1.55 → 4.1.57
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/.git-templates/hooks/pre-push +2 -2
- package/CONTRIBUTING.md +1 -1
- package/README.md +6 -6
- package/build.sh +30 -8
- package/dist/ccxt.browser.js +5592 -4907
- package/dist/ccxt.browser.min.js +13 -13
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +17 -13
- package/dist/cjs/src/alpaca.js +6 -6
- package/dist/cjs/src/ascendex.js +35 -29
- package/dist/cjs/src/base/Exchange.js +39 -26
- package/dist/cjs/src/base/Precise.js +1 -3
- package/dist/cjs/src/bigone.js +24 -20
- package/dist/cjs/src/binance.js +97 -76
- package/dist/cjs/src/bingx.js +63 -44
- package/dist/cjs/src/bit2c.js +18 -15
- package/dist/cjs/src/bitbank.js +17 -15
- package/dist/cjs/src/bitbns.js +28 -18
- package/dist/cjs/src/bitfinex.js +23 -21
- package/dist/cjs/src/bitfinex2.js +32 -28
- package/dist/cjs/src/bitflyer.js +28 -20
- package/dist/cjs/src/bitforex.js +25 -18
- package/dist/cjs/src/bitget.js +184 -147
- package/dist/cjs/src/bithumb.js +23 -16
- package/dist/cjs/src/bitmart.js +129 -94
- package/dist/cjs/src/bitmex.js +104 -64
- package/dist/cjs/src/bitopro.js +38 -26
- package/dist/cjs/src/bitpanda.js +24 -23
- package/dist/cjs/src/bitrue.js +33 -24
- package/dist/cjs/src/bitso.js +24 -23
- package/dist/cjs/src/bitstamp.js +24 -23
- package/dist/cjs/src/bittrex.js +30 -29
- package/dist/cjs/src/bitvavo.js +38 -30
- package/dist/cjs/src/bl3p.js +11 -10
- package/dist/cjs/src/blockchaincom.js +20 -20
- package/dist/cjs/src/btcalpha.js +18 -17
- package/dist/cjs/src/btcbox.js +13 -12
- package/dist/cjs/src/btcmarkets.js +20 -19
- package/dist/cjs/src/btcturk.js +14 -13
- package/dist/cjs/src/bybit.js +84 -54
- package/dist/cjs/src/cex.js +16 -14
- package/dist/cjs/src/coinbase.js +29 -27
- package/dist/cjs/src/coinbasepro.js +27 -25
- package/dist/cjs/src/coincheck.js +15 -14
- package/dist/cjs/src/coinex.js +101 -78
- package/dist/cjs/src/coinlist.js +28 -27
- package/dist/cjs/src/coinmate.js +20 -17
- package/dist/cjs/src/coinone.js +21 -16
- package/dist/cjs/src/coinsph.js +37 -28
- package/dist/cjs/src/coinspot.js +12 -11
- package/dist/cjs/src/cryptocom.js +40 -202
- package/dist/cjs/src/currencycom.js +32 -25
- package/dist/cjs/src/delta.js +34 -28
- package/dist/cjs/src/deribit.js +39 -36
- package/dist/cjs/src/digifinex.js +64 -44
- package/dist/cjs/src/exmo.js +29 -27
- package/dist/cjs/src/gate.js +67 -53
- package/dist/cjs/src/gemini.js +23 -20
- package/dist/cjs/src/hitbtc.js +65 -56
- package/dist/cjs/src/hollaex.js +30 -27
- package/dist/cjs/src/htx.js +135 -143
- package/dist/cjs/src/huobijp.js +22 -20
- package/dist/cjs/src/idex.js +22 -21
- package/dist/cjs/src/independentreserve.js +15 -14
- package/dist/cjs/src/indodax.js +30 -26
- package/dist/cjs/src/kraken.js +29 -27
- package/dist/cjs/src/krakenfutures.js +29 -22
- package/dist/cjs/src/kucoin.js +48 -43
- package/dist/cjs/src/kucoinfutures.js +33 -28
- package/dist/cjs/src/kuna.js +25 -24
- package/dist/cjs/src/latoken.js +24 -22
- package/dist/cjs/src/lbank.js +45 -30
- package/dist/cjs/src/luno.js +22 -19
- package/dist/cjs/src/lykke.js +19 -17
- package/dist/cjs/src/mercado.js +30 -19
- package/dist/cjs/src/mexc.js +60 -49
- package/dist/cjs/src/ndax.js +23 -22
- package/dist/cjs/src/novadax.js +23 -22
- package/dist/cjs/src/oceanex.js +22 -19
- package/dist/cjs/src/okcoin.js +29 -23
- package/dist/cjs/src/okx.js +92 -84
- package/dist/cjs/src/p2b.js +80 -83
- package/dist/cjs/src/paymium.js +10 -10
- package/dist/cjs/src/phemex.js +63 -40
- package/dist/cjs/src/poloniex.js +22 -22
- package/dist/cjs/src/poloniexfutures.js +23 -19
- package/dist/cjs/src/pro/alpaca.js +5 -5
- package/dist/cjs/src/pro/ascendex.js +4 -4
- package/dist/cjs/src/pro/binance.js +16 -16
- package/dist/cjs/src/pro/bingx.js +1 -1
- package/dist/cjs/src/pro/bitfinex.js +4 -4
- package/dist/cjs/src/pro/bitfinex2.js +6 -6
- package/dist/cjs/src/pro/bitget.js +7 -7
- package/dist/cjs/src/pro/bitmart.js +7 -5
- package/dist/cjs/src/pro/bitmex.js +6 -6
- package/dist/cjs/src/pro/bitopro.js +4 -4
- package/dist/cjs/src/pro/bitpanda.js +6 -6
- package/dist/cjs/src/pro/bitrue.js +2 -2
- package/dist/cjs/src/pro/bitstamp.js +6 -4
- package/dist/cjs/src/pro/bittrex.js +6 -6
- package/dist/cjs/src/pro/bitvavo.js +11 -7
- package/dist/cjs/src/pro/blockchaincom.js +8 -8
- package/dist/cjs/src/pro/bybit.js +7 -7
- package/dist/cjs/src/pro/cex.js +13 -9
- package/dist/cjs/src/pro/coinbase.js +5 -5
- package/dist/cjs/src/pro/coinbasepro.js +11 -10
- package/dist/cjs/src/pro/coinex.js +7 -9
- package/dist/cjs/src/pro/cryptocom.js +9 -9
- package/dist/cjs/src/pro/currencycom.js +4 -4
- package/dist/cjs/src/pro/deribit.js +6 -6
- package/dist/cjs/src/pro/exmo.js +12 -14
- package/dist/cjs/src/pro/gate.js +7 -7
- package/dist/cjs/src/pro/gemini.js +3 -3
- package/dist/cjs/src/pro/hitbtc.js +263 -4
- package/dist/cjs/src/pro/hollaex.js +5 -5
- package/dist/cjs/src/pro/htx.js +6 -6
- package/dist/cjs/src/pro/huobijp.js +3 -3
- package/dist/cjs/src/pro/idex.js +4 -4
- package/dist/cjs/src/pro/independentreserve.js +2 -2
- package/dist/cjs/src/pro/kraken.js +10 -10
- package/dist/cjs/src/pro/krakenfutures.js +41 -17
- package/dist/cjs/src/pro/kucoin.js +7 -7
- package/dist/cjs/src/pro/kucoinfutures.js +8 -6
- package/dist/cjs/src/pro/luno.js +2 -2
- package/dist/cjs/src/pro/mexc.js +6 -6
- package/dist/cjs/src/pro/ndax.js +3 -3
- package/dist/cjs/src/pro/okcoin.js +5 -5
- package/dist/cjs/src/pro/okx.js +12 -12
- package/dist/cjs/src/pro/phemex.js +6 -6
- package/dist/cjs/src/pro/poloniex.js +7 -7
- package/dist/cjs/src/pro/poloniexfutures.js +5 -5
- package/dist/cjs/src/pro/probit.js +6 -6
- package/dist/cjs/src/pro/upbit.js +3 -3
- package/dist/cjs/src/pro/wazirx.js +8 -8
- package/dist/cjs/src/pro/whitebit.js +12 -8
- package/dist/cjs/src/pro/woo.js +1 -1
- package/dist/cjs/src/probit.js +28 -23
- package/dist/cjs/src/tidex.js +16 -15
- package/dist/cjs/src/timex.js +19 -18
- package/dist/cjs/src/tokocrypto.js +27 -22
- package/dist/cjs/src/upbit.js +19 -19
- package/dist/cjs/src/wavesexchange.js +22 -19
- package/dist/cjs/src/wazirx.js +24 -17
- package/dist/cjs/src/whitebit.js +33 -27
- package/dist/cjs/src/woo.js +44 -34
- package/dist/cjs/src/yobit.js +25 -20
- package/dist/cjs/src/zaif.js +9 -9
- package/dist/cjs/src/zonda.js +18 -17
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bitbank.d.ts +1 -0
- package/js/src/abstract/bybit.d.ts +1 -0
- package/js/src/abstract/cryptocom.d.ts +0 -20
- package/js/src/abstract/htx.d.ts +3 -0
- package/js/src/abstract/huobi.d.ts +3 -0
- package/js/src/abstract/huobipro.d.ts +3 -0
- package/js/src/abstract/okex.d.ts +3 -1
- package/js/src/abstract/okex5.d.ts +3 -1
- package/js/src/abstract/okx.d.ts +3 -1
- package/js/src/ace.js +18 -14
- package/js/src/alpaca.js +6 -6
- package/js/src/ascendex.js +35 -29
- package/js/src/base/Exchange.d.ts +37 -34
- package/js/src/base/Exchange.js +39 -26
- package/js/src/base/Precise.d.ts +4 -4
- package/js/src/base/Precise.js +1 -3
- package/js/src/base/functions/type.d.ts +25 -25
- package/js/src/base/types.d.ts +21 -14
- package/js/src/bigone.js +25 -21
- package/js/src/binance.d.ts +2 -2
- package/js/src/binance.js +97 -76
- package/js/src/bingx.js +63 -44
- package/js/src/bit2c.js +19 -16
- package/js/src/bitbank.js +17 -15
- package/js/src/bitbns.js +28 -18
- package/js/src/bitfinex.js +23 -21
- package/js/src/bitfinex2.js +32 -28
- package/js/src/bitflyer.js +28 -20
- package/js/src/bitforex.js +26 -19
- package/js/src/bitget.d.ts +25 -3
- package/js/src/bitget.js +184 -147
- package/js/src/bithumb.js +23 -16
- package/js/src/bitmart.d.ts +1 -1
- package/js/src/bitmart.js +129 -94
- package/js/src/bitmex.d.ts +2 -2
- package/js/src/bitmex.js +104 -64
- package/js/src/bitopro.js +38 -26
- package/js/src/bitpanda.js +24 -23
- package/js/src/bitrue.js +33 -24
- package/js/src/bitso.js +24 -23
- package/js/src/bitstamp.d.ts +2 -2
- package/js/src/bitstamp.js +24 -23
- package/js/src/bittrex.js +30 -29
- package/js/src/bitvavo.js +38 -30
- package/js/src/bl3p.js +11 -10
- package/js/src/blockchaincom.js +20 -20
- package/js/src/btcalpha.js +18 -17
- package/js/src/btcbox.js +13 -12
- package/js/src/btcmarkets.js +20 -19
- package/js/src/btcturk.js +14 -13
- package/js/src/bybit.d.ts +1 -1
- package/js/src/bybit.js +84 -54
- package/js/src/cex.js +16 -14
- package/js/src/coinbase.js +29 -27
- package/js/src/coinbasepro.js +27 -25
- package/js/src/coincheck.js +15 -14
- package/js/src/coinex.d.ts +1 -1
- package/js/src/coinex.js +101 -78
- package/js/src/coinlist.js +28 -27
- package/js/src/coinmate.js +21 -18
- package/js/src/coinone.js +21 -16
- package/js/src/coinsph.js +37 -28
- package/js/src/coinspot.js +12 -11
- package/js/src/cryptocom.d.ts +0 -23
- package/js/src/cryptocom.js +40 -202
- package/js/src/currencycom.js +32 -25
- package/js/src/delta.js +35 -29
- package/js/src/deribit.js +39 -36
- package/js/src/digifinex.d.ts +2 -2
- package/js/src/digifinex.js +65 -45
- package/js/src/exmo.js +29 -27
- package/js/src/gate.d.ts +1 -1
- package/js/src/gate.js +67 -53
- package/js/src/gemini.js +23 -20
- package/js/src/hitbtc.d.ts +1 -0
- package/js/src/hitbtc.js +65 -56
- package/js/src/hollaex.js +30 -27
- package/js/src/htx.d.ts +11 -3
- package/js/src/htx.js +135 -143
- package/js/src/huobijp.js +23 -21
- package/js/src/idex.js +22 -21
- package/js/src/independentreserve.js +15 -14
- package/js/src/indodax.js +30 -26
- package/js/src/kraken.js +29 -27
- package/js/src/krakenfutures.js +29 -22
- package/js/src/kucoin.d.ts +1 -1
- package/js/src/kucoin.js +48 -43
- package/js/src/kucoinfutures.js +33 -28
- package/js/src/kuna.js +25 -24
- package/js/src/latoken.js +25 -23
- package/js/src/lbank.js +46 -31
- package/js/src/luno.js +22 -19
- package/js/src/lykke.js +19 -17
- package/js/src/mercado.js +30 -19
- package/js/src/mexc.d.ts +1 -1
- package/js/src/mexc.js +60 -49
- package/js/src/ndax.js +23 -22
- package/js/src/novadax.js +23 -22
- package/js/src/oceanex.js +22 -19
- package/js/src/okcoin.js +29 -23
- package/js/src/okx.d.ts +2 -2
- package/js/src/okx.js +92 -84
- package/js/src/p2b.d.ts +8 -7
- package/js/src/p2b.js +80 -82
- package/js/src/paymium.js +10 -10
- package/js/src/phemex.js +63 -40
- package/js/src/poloniex.js +22 -22
- package/js/src/poloniexfutures.js +23 -19
- package/js/src/pro/alpaca.js +5 -5
- package/js/src/pro/ascendex.js +4 -4
- package/js/src/pro/binance.js +16 -16
- package/js/src/pro/bingx.js +1 -1
- package/js/src/pro/bitfinex.js +4 -4
- package/js/src/pro/bitfinex2.d.ts +1 -1
- package/js/src/pro/bitfinex2.js +6 -6
- package/js/src/pro/bitget.js +7 -7
- package/js/src/pro/bitmart.js +7 -5
- package/js/src/pro/bitmex.js +6 -6
- package/js/src/pro/bitopro.js +4 -4
- package/js/src/pro/bitpanda.js +6 -6
- package/js/src/pro/bitrue.js +2 -2
- package/js/src/pro/bitstamp.js +7 -5
- package/js/src/pro/bittrex.js +6 -6
- package/js/src/pro/bitvavo.js +12 -8
- package/js/src/pro/blockchaincom.js +8 -8
- package/js/src/pro/bybit.js +7 -7
- package/js/src/pro/cex.js +14 -10
- package/js/src/pro/coinbase.js +5 -5
- package/js/src/pro/coinbasepro.js +12 -11
- package/js/src/pro/coinex.js +7 -9
- package/js/src/pro/cryptocom.js +9 -9
- package/js/src/pro/currencycom.js +4 -4
- package/js/src/pro/deribit.js +6 -6
- package/js/src/pro/exmo.js +12 -14
- package/js/src/pro/gate.js +7 -7
- package/js/src/pro/gemini.js +3 -3
- package/js/src/pro/hitbtc.d.ts +8 -1
- package/js/src/pro/hitbtc.js +264 -5
- package/js/src/pro/hollaex.js +5 -5
- package/js/src/pro/htx.js +6 -6
- package/js/src/pro/huobijp.js +3 -3
- package/js/src/pro/idex.js +4 -4
- package/js/src/pro/independentreserve.js +2 -2
- package/js/src/pro/kraken.js +10 -10
- package/js/src/pro/krakenfutures.d.ts +1 -0
- package/js/src/pro/krakenfutures.js +42 -18
- package/js/src/pro/kucoin.js +7 -7
- package/js/src/pro/kucoinfutures.js +8 -6
- package/js/src/pro/luno.js +2 -2
- package/js/src/pro/mexc.js +6 -6
- package/js/src/pro/ndax.js +3 -3
- package/js/src/pro/okcoin.js +5 -5
- package/js/src/pro/okx.js +12 -12
- package/js/src/pro/phemex.js +6 -6
- package/js/src/pro/poloniex.js +7 -7
- package/js/src/pro/poloniexfutures.js +5 -5
- package/js/src/pro/probit.js +6 -6
- package/js/src/pro/upbit.js +3 -3
- package/js/src/pro/wazirx.js +8 -8
- package/js/src/pro/whitebit.js +13 -9
- package/js/src/pro/woo.js +1 -1
- package/js/src/probit.js +29 -24
- package/js/src/tidex.js +16 -15
- package/js/src/timex.js +19 -18
- package/js/src/tokocrypto.js +28 -23
- package/js/src/upbit.js +19 -19
- package/js/src/wavesexchange.js +23 -20
- package/js/src/wazirx.js +25 -18
- package/js/src/whitebit.js +33 -27
- package/js/src/woo.js +45 -35
- package/js/src/yobit.js +25 -20
- package/js/src/zaif.js +9 -9
- package/js/src/zonda.js +18 -17
- package/package.json +2 -2
- package/js/src/bitstamp1.d.ts +0 -28
- package/js/src/bitstamp1.js +0 -430
- package/js/src/lbank2.d.ts +0 -90
- package/js/src/lbank2.js +0 -2779
package/js/src/mercado.js
CHANGED
|
@@ -38,15 +38,16 @@ export default class mercado extends Exchange {
|
|
|
38
38
|
'createStopMarketOrder': false,
|
|
39
39
|
'createStopOrder': false,
|
|
40
40
|
'fetchBalance': true,
|
|
41
|
-
'fetchBorrowRate': false,
|
|
42
41
|
'fetchBorrowRateHistory': false,
|
|
43
|
-
'
|
|
44
|
-
'
|
|
42
|
+
'fetchCrossBorrowRate': false,
|
|
43
|
+
'fetchCrossBorrowRates': false,
|
|
45
44
|
'fetchFundingHistory': false,
|
|
46
45
|
'fetchFundingRate': false,
|
|
47
46
|
'fetchFundingRateHistory': false,
|
|
48
47
|
'fetchFundingRates': false,
|
|
49
48
|
'fetchIndexOHLCV': false,
|
|
49
|
+
'fetchIsolatedBorrowRate': false,
|
|
50
|
+
'fetchIsolatedBorrowRates': false,
|
|
50
51
|
'fetchLeverage': false,
|
|
51
52
|
'fetchLeverageTiers': false,
|
|
52
53
|
'fetchMarginMode': false,
|
|
@@ -253,7 +254,7 @@ export default class mercado extends Exchange {
|
|
|
253
254
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
254
255
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
255
256
|
* @param {object} [params] extra parameters specific to the mercado api endpoint
|
|
256
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
257
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
257
258
|
*/
|
|
258
259
|
await this.loadMarkets();
|
|
259
260
|
const market = this.market(symbol);
|
|
@@ -309,7 +310,7 @@ export default class mercado extends Exchange {
|
|
|
309
310
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
310
311
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
311
312
|
* @param {object} [params] extra parameters specific to the mercado api endpoint
|
|
312
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
313
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
313
314
|
*/
|
|
314
315
|
await this.loadMarkets();
|
|
315
316
|
const market = this.market(symbol);
|
|
@@ -375,7 +376,7 @@ export default class mercado extends Exchange {
|
|
|
375
376
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
376
377
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
377
378
|
* @param {object} [params] extra parameters specific to the mercado api endpoint
|
|
378
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
379
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
379
380
|
*/
|
|
380
381
|
await this.loadMarkets();
|
|
381
382
|
const market = this.market(symbol);
|
|
@@ -418,7 +419,7 @@ export default class mercado extends Exchange {
|
|
|
418
419
|
* @name mercado#fetchBalance
|
|
419
420
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
420
421
|
* @param {object} [params] extra parameters specific to the mercado api endpoint
|
|
421
|
-
* @returns {object} a [balance structure]{@link https://
|
|
422
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
422
423
|
*/
|
|
423
424
|
await this.loadMarkets();
|
|
424
425
|
const response = await this.privatePostGetAccountInfo(params);
|
|
@@ -435,7 +436,7 @@ export default class mercado extends Exchange {
|
|
|
435
436
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
436
437
|
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
437
438
|
* @param {object} [params] extra parameters specific to the mercado api endpoint
|
|
438
|
-
* @returns {object} an [order structure]{@link https://
|
|
439
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
439
440
|
*/
|
|
440
441
|
await this.loadMarkets();
|
|
441
442
|
const market = this.market(symbol);
|
|
@@ -475,9 +476,11 @@ export default class mercado extends Exchange {
|
|
|
475
476
|
* @param {string} id order id
|
|
476
477
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
477
478
|
* @param {object} [params] extra parameters specific to the mercado api endpoint
|
|
478
|
-
* @returns {object} An [order structure]{@link https://
|
|
479
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
479
480
|
*/
|
|
480
|
-
|
|
481
|
+
if (symbol === undefined) {
|
|
482
|
+
throw new ArgumentsRequired(this.id + ' cancelOrder() requires a symbol argument');
|
|
483
|
+
}
|
|
481
484
|
await this.loadMarkets();
|
|
482
485
|
const market = this.market(symbol);
|
|
483
486
|
const request = {
|
|
@@ -599,9 +602,11 @@ export default class mercado extends Exchange {
|
|
|
599
602
|
* @description fetches information on an order made by the user
|
|
600
603
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
601
604
|
* @param {object} [params] extra parameters specific to the mercado api endpoint
|
|
602
|
-
* @returns {object} An [order structure]{@link https://
|
|
605
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
603
606
|
*/
|
|
604
|
-
|
|
607
|
+
if (symbol === undefined) {
|
|
608
|
+
throw new ArgumentsRequired(this.id + ' fetchOrder() requires a symbol argument');
|
|
609
|
+
}
|
|
605
610
|
await this.loadMarkets();
|
|
606
611
|
const market = this.market(symbol);
|
|
607
612
|
const request = {
|
|
@@ -623,7 +628,7 @@ export default class mercado extends Exchange {
|
|
|
623
628
|
* @param {string} address the address to withdraw to
|
|
624
629
|
* @param {string} tag
|
|
625
630
|
* @param {object} [params] extra parameters specific to the mercado api endpoint
|
|
626
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
631
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
627
632
|
*/
|
|
628
633
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
629
634
|
this.checkAddress(address);
|
|
@@ -770,9 +775,11 @@ export default class mercado extends Exchange {
|
|
|
770
775
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
771
776
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
772
777
|
* @param {object} [params] extra parameters specific to the mercado api endpoint
|
|
773
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
778
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
774
779
|
*/
|
|
775
|
-
|
|
780
|
+
if (symbol === undefined) {
|
|
781
|
+
throw new ArgumentsRequired(this.id + ' fetchOrders() requires a symbol argument');
|
|
782
|
+
}
|
|
776
783
|
await this.loadMarkets();
|
|
777
784
|
const market = this.market(symbol);
|
|
778
785
|
const request = {
|
|
@@ -792,9 +799,11 @@ export default class mercado extends Exchange {
|
|
|
792
799
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
793
800
|
* @param {int} [limit] the maximum number of open order structures to retrieve
|
|
794
801
|
* @param {object} [params] extra parameters specific to the mercado api endpoint
|
|
795
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
802
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
796
803
|
*/
|
|
797
|
-
|
|
804
|
+
if (symbol === undefined) {
|
|
805
|
+
throw new ArgumentsRequired(this.id + ' fetchOpenOrders() requires a symbol argument');
|
|
806
|
+
}
|
|
798
807
|
await this.loadMarkets();
|
|
799
808
|
const market = this.market(symbol);
|
|
800
809
|
const request = {
|
|
@@ -815,9 +824,11 @@ export default class mercado extends Exchange {
|
|
|
815
824
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
816
825
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
817
826
|
* @param {object} [params] extra parameters specific to the mercado api endpoint
|
|
818
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
827
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
819
828
|
*/
|
|
820
|
-
|
|
829
|
+
if (symbol === undefined) {
|
|
830
|
+
throw new ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol argument');
|
|
831
|
+
}
|
|
821
832
|
await this.loadMarkets();
|
|
822
833
|
const market = this.market(symbol);
|
|
823
834
|
const request = {
|
package/js/src/mexc.d.ts
CHANGED
|
@@ -54,7 +54,7 @@ export default class mexc extends Exchange {
|
|
|
54
54
|
fetchAccounts(params?: {}): Promise<any[]>;
|
|
55
55
|
fetchTradingFees(params?: {}): Promise<{}>;
|
|
56
56
|
customParseBalance(response: any, marketType: any): Balances;
|
|
57
|
-
parseBalanceHelper(entry: any): import("./base/types.js").
|
|
57
|
+
parseBalanceHelper(entry: any): import("./base/types.js").Account;
|
|
58
58
|
fetchBalance(params?: {}): Promise<Balances>;
|
|
59
59
|
fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
60
60
|
fetchOrderTrades(id: string, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
package/js/src/mexc.js
CHANGED
|
@@ -46,13 +46,12 @@ export default class mexc extends Exchange {
|
|
|
46
46
|
'fetchAccounts': true,
|
|
47
47
|
'fetchBalance': true,
|
|
48
48
|
'fetchBidsAsks': true,
|
|
49
|
-
'fetchBorrowRate': undefined,
|
|
50
49
|
'fetchBorrowRateHistory': undefined,
|
|
51
|
-
'fetchBorrowRates': undefined,
|
|
52
|
-
'fetchBorrowRatesPerSymbol': undefined,
|
|
53
50
|
'fetchCanceledOrders': true,
|
|
54
51
|
'fetchClosedOrder': undefined,
|
|
55
52
|
'fetchClosedOrders': true,
|
|
53
|
+
'fetchCrossBorrowRate': false,
|
|
54
|
+
'fetchCrossBorrowRates': false,
|
|
56
55
|
'fetchCurrencies': true,
|
|
57
56
|
'fetchDeposit': undefined,
|
|
58
57
|
'fetchDepositAddress': true,
|
|
@@ -66,6 +65,8 @@ export default class mexc extends Exchange {
|
|
|
66
65
|
'fetchFundingRateHistory': true,
|
|
67
66
|
'fetchFundingRates': undefined,
|
|
68
67
|
'fetchIndexOHLCV': true,
|
|
68
|
+
'fetchIsolatedBorrowRate': false,
|
|
69
|
+
'fetchIsolatedBorrowRates': false,
|
|
69
70
|
'fetchL2OrderBook': true,
|
|
70
71
|
'fetchLedger': undefined,
|
|
71
72
|
'fetchLedgerEntry': undefined,
|
|
@@ -824,7 +825,7 @@ export default class mexc extends Exchange {
|
|
|
824
825
|
* @name mexc3#fetchStatus
|
|
825
826
|
* @description the latest known information on the availability of the exchange API
|
|
826
827
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
827
|
-
* @returns {object} a [status structure]{@link https://
|
|
828
|
+
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
828
829
|
*/
|
|
829
830
|
const [marketType, query] = this.handleMarketTypeAndParams('fetchStatus', undefined, params);
|
|
830
831
|
let response = undefined;
|
|
@@ -1292,7 +1293,7 @@ export default class mexc extends Exchange {
|
|
|
1292
1293
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1293
1294
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
1294
1295
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
1295
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
1296
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
1296
1297
|
*/
|
|
1297
1298
|
await this.loadMarkets();
|
|
1298
1299
|
const market = this.market(symbol);
|
|
@@ -1370,7 +1371,7 @@ export default class mexc extends Exchange {
|
|
|
1370
1371
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
1371
1372
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
1372
1373
|
* @param {int} [params.until] *spot only* *since must be defined* the latest time in ms to fetch entries for
|
|
1373
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
1374
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
1374
1375
|
*/
|
|
1375
1376
|
await this.loadMarkets();
|
|
1376
1377
|
const market = this.market(symbol);
|
|
@@ -1743,7 +1744,7 @@ export default class mexc extends Exchange {
|
|
|
1743
1744
|
* @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
|
|
1744
1745
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1745
1746
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
1746
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
1747
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1747
1748
|
*/
|
|
1748
1749
|
await this.loadMarkets();
|
|
1749
1750
|
const request = {};
|
|
@@ -1831,7 +1832,7 @@ export default class mexc extends Exchange {
|
|
|
1831
1832
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1832
1833
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1833
1834
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
1834
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
1835
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1835
1836
|
*/
|
|
1836
1837
|
await this.loadMarkets();
|
|
1837
1838
|
const market = this.market(symbol);
|
|
@@ -2021,7 +2022,7 @@ export default class mexc extends Exchange {
|
|
|
2021
2022
|
* @description fetches the bid and ask price and volume for multiple markets
|
|
2022
2023
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
|
|
2023
2024
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
2024
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
2025
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
2025
2026
|
*/
|
|
2026
2027
|
await this.loadMarkets();
|
|
2027
2028
|
let market = undefined;
|
|
@@ -2068,7 +2069,7 @@ export default class mexc extends Exchange {
|
|
|
2068
2069
|
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
2069
2070
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
2070
2071
|
* @param {string} [params.marginMode] only 'isolated' is supported for spot-margin trading
|
|
2071
|
-
* @returns {object} an [order structure]{@link https://
|
|
2072
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2072
2073
|
*/
|
|
2073
2074
|
await this.loadMarkets();
|
|
2074
2075
|
const market = this.market(symbol);
|
|
@@ -2279,7 +2280,7 @@ export default class mexc extends Exchange {
|
|
|
2279
2280
|
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#batch-orders
|
|
2280
2281
|
* @param {array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
|
|
2281
2282
|
* @param {object} [params] extra parameters specific to api endpoint
|
|
2282
|
-
* @returns {object} an [order structure]{@link https://
|
|
2283
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2283
2284
|
*/
|
|
2284
2285
|
await this.loadMarkets();
|
|
2285
2286
|
const ordersRequests = [];
|
|
@@ -2343,9 +2344,11 @@ export default class mexc extends Exchange {
|
|
|
2343
2344
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
2344
2345
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
2345
2346
|
* @param {string} [params.marginMode] only 'isolated' is supported, for spot-margin trading
|
|
2346
|
-
* @returns {object} An [order structure]{@link https://
|
|
2347
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2347
2348
|
*/
|
|
2348
|
-
|
|
2349
|
+
if (symbol === undefined) {
|
|
2350
|
+
throw new ArgumentsRequired(this.id + ' fetchOrder() requires a symbol argument');
|
|
2351
|
+
}
|
|
2349
2352
|
await this.loadMarkets();
|
|
2350
2353
|
const market = this.market(symbol);
|
|
2351
2354
|
const request = {
|
|
@@ -2464,7 +2467,7 @@ export default class mexc extends Exchange {
|
|
|
2464
2467
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
2465
2468
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
2466
2469
|
* @param {string} [params.marginMode] only 'isolated' is supported, for spot-margin trading
|
|
2467
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
2470
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2468
2471
|
*/
|
|
2469
2472
|
await this.loadMarkets();
|
|
2470
2473
|
const request = {};
|
|
@@ -2694,7 +2697,7 @@ export default class mexc extends Exchange {
|
|
|
2694
2697
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
2695
2698
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
2696
2699
|
* @param {string} [params.marginMode] only 'isolated' is supported, for spot-margin trading
|
|
2697
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
2700
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2698
2701
|
*/
|
|
2699
2702
|
await this.loadMarkets();
|
|
2700
2703
|
const request = {};
|
|
@@ -2782,7 +2785,7 @@ export default class mexc extends Exchange {
|
|
|
2782
2785
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
2783
2786
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
2784
2787
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
2785
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
2788
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2786
2789
|
*/
|
|
2787
2790
|
return await this.fetchOrdersByState(3, symbol, since, limit, params);
|
|
2788
2791
|
}
|
|
@@ -2795,7 +2798,7 @@ export default class mexc extends Exchange {
|
|
|
2795
2798
|
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
|
|
2796
2799
|
* @param {int} [limit] max number of orders to return, default is undefined
|
|
2797
2800
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
2798
|
-
* @returns {object} a list of [order structures]{@link https://
|
|
2801
|
+
* @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2799
2802
|
*/
|
|
2800
2803
|
return await this.fetchOrdersByState(4, symbol, since, limit, params);
|
|
2801
2804
|
}
|
|
@@ -2824,7 +2827,7 @@ export default class mexc extends Exchange {
|
|
|
2824
2827
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
2825
2828
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
2826
2829
|
* @param {string} [params.marginMode] only 'isolated' is supported for spot-margin trading
|
|
2827
|
-
* @returns {object} An [order structure]{@link https://
|
|
2830
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2828
2831
|
*/
|
|
2829
2832
|
await this.loadMarkets();
|
|
2830
2833
|
const request = {};
|
|
@@ -2930,7 +2933,7 @@ export default class mexc extends Exchange {
|
|
|
2930
2933
|
* @param {string[]} ids order ids
|
|
2931
2934
|
* @param {string} symbol unified market symbol, default is undefined
|
|
2932
2935
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
2933
|
-
* @returns {object} an list of [order structures]{@link https://
|
|
2936
|
+
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2934
2937
|
*/
|
|
2935
2938
|
await this.loadMarkets();
|
|
2936
2939
|
const market = (symbol !== undefined) ? this.market(symbol) : undefined;
|
|
@@ -2965,7 +2968,7 @@ export default class mexc extends Exchange {
|
|
|
2965
2968
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
2966
2969
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
2967
2970
|
* @param {string} [params.marginMode] only 'isolated' is supported for spot-margin trading
|
|
2968
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
2971
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2969
2972
|
*/
|
|
2970
2973
|
await this.loadMarkets();
|
|
2971
2974
|
const market = (symbol !== undefined) ? this.market(symbol) : undefined;
|
|
@@ -3358,7 +3361,7 @@ export default class mexc extends Exchange {
|
|
|
3358
3361
|
* @name mexc3#fetchAccounts
|
|
3359
3362
|
* @description fetch all the accounts associated with a profile
|
|
3360
3363
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
3361
|
-
* @returns {object} a dictionary of [account structures]{@link https://
|
|
3364
|
+
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
|
|
3362
3365
|
*/
|
|
3363
3366
|
// TODO: is the below endpoints suitable for fetchAccounts?
|
|
3364
3367
|
const [marketType, query] = this.handleMarketTypeAndParams('fetchAccounts', undefined, params);
|
|
@@ -3385,7 +3388,7 @@ export default class mexc extends Exchange {
|
|
|
3385
3388
|
* @name mexc3#fetchTradingFees
|
|
3386
3389
|
* @description fetch the trading fees for multiple markets
|
|
3387
3390
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
3388
|
-
* @returns {object} a dictionary of [fee structures]{@link https://
|
|
3391
|
+
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
3389
3392
|
*/
|
|
3390
3393
|
await this.loadMarkets();
|
|
3391
3394
|
const response = await this.fetchAccountHelper('spot', params);
|
|
@@ -3540,7 +3543,7 @@ export default class mexc extends Exchange {
|
|
|
3540
3543
|
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#isolated-account
|
|
3541
3544
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
3542
3545
|
* @param {string} [params.symbols] // required for margin, market id's separated by commas
|
|
3543
|
-
* @returns {object} a [balance structure]{@link https://
|
|
3546
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
3544
3547
|
*/
|
|
3545
3548
|
await this.loadMarkets();
|
|
3546
3549
|
let marketType = undefined;
|
|
@@ -3668,9 +3671,11 @@ export default class mexc extends Exchange {
|
|
|
3668
3671
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
3669
3672
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
3670
3673
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
3671
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
3674
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
3672
3675
|
*/
|
|
3673
|
-
|
|
3676
|
+
if (symbol === undefined) {
|
|
3677
|
+
throw new ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol argument');
|
|
3678
|
+
}
|
|
3674
3679
|
await this.loadMarkets();
|
|
3675
3680
|
const market = this.market(symbol);
|
|
3676
3681
|
const [marketType, query] = this.handleMarketTypeAndParams('fetchMyTrades', market, params);
|
|
@@ -3757,7 +3762,7 @@ export default class mexc extends Exchange {
|
|
|
3757
3762
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
3758
3763
|
* @param {int} [limit] the maximum number of trades to retrieve
|
|
3759
3764
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
3760
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
3765
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
3761
3766
|
*/
|
|
3762
3767
|
await this.loadMarkets();
|
|
3763
3768
|
const request = {};
|
|
@@ -3853,7 +3858,7 @@ export default class mexc extends Exchange {
|
|
|
3853
3858
|
* @param {string} symbol unified market symbol
|
|
3854
3859
|
* @param {float} amount the amount of margin to remove
|
|
3855
3860
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
3856
|
-
* @returns {object} a [margin structure]{@link https://
|
|
3861
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
|
|
3857
3862
|
*/
|
|
3858
3863
|
return await this.modifyMarginHelper(symbol, amount, 'SUB', params);
|
|
3859
3864
|
}
|
|
@@ -3865,7 +3870,7 @@ export default class mexc extends Exchange {
|
|
|
3865
3870
|
* @param {string} symbol unified market symbol
|
|
3866
3871
|
* @param {float} amount amount of margin to add
|
|
3867
3872
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
3868
|
-
* @returns {object} a [margin structure]{@link https://
|
|
3873
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
|
|
3869
3874
|
*/
|
|
3870
3875
|
return await this.modifyMarginHelper(symbol, amount, 'ADD', params);
|
|
3871
3876
|
}
|
|
@@ -3911,7 +3916,7 @@ export default class mexc extends Exchange {
|
|
|
3911
3916
|
* @param {int} [since] the earliest time in ms to fetch funding history for
|
|
3912
3917
|
* @param {int} [limit] the maximum number of funding history structures to retrieve
|
|
3913
3918
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
3914
|
-
* @returns {object} a [funding history structure]{@link https://
|
|
3919
|
+
* @returns {object} a [funding history structure]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
|
|
3915
3920
|
*/
|
|
3916
3921
|
await this.loadMarkets();
|
|
3917
3922
|
let market = undefined;
|
|
@@ -4024,7 +4029,7 @@ export default class mexc extends Exchange {
|
|
|
4024
4029
|
* @description fetch the current funding rate
|
|
4025
4030
|
* @param {string} symbol unified market symbol
|
|
4026
4031
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
4027
|
-
* @returns {object} a [funding rate structure]{@link https://
|
|
4032
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
4028
4033
|
*/
|
|
4029
4034
|
await this.loadMarkets();
|
|
4030
4035
|
const market = this.market(symbol);
|
|
@@ -4059,9 +4064,11 @@ export default class mexc extends Exchange {
|
|
|
4059
4064
|
* @param {int} [since] not used by mexc, but filtered internally by ccxt
|
|
4060
4065
|
* @param {int} [limit] mexc limit is page_size default 20, maximum is 100
|
|
4061
4066
|
* @param {object} [params] extra parameters specific to the mexc api endpoint
|
|
4062
|
-
* @returns {object[]} a list of [funding rate structures]{@link https://
|
|
4067
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
4063
4068
|
*/
|
|
4064
|
-
|
|
4069
|
+
if (symbol === undefined) {
|
|
4070
|
+
throw new ArgumentsRequired(this.id + ' fetchFundingRateHistory() requires a symbol argument');
|
|
4071
|
+
}
|
|
4065
4072
|
await this.loadMarkets();
|
|
4066
4073
|
const market = this.market(symbol);
|
|
4067
4074
|
const request = {
|
|
@@ -4123,7 +4130,7 @@ export default class mexc extends Exchange {
|
|
|
4123
4130
|
* @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
|
|
4124
4131
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
4125
4132
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
4126
|
-
* @returns {object} a dictionary of [leverage tiers structures]{@link https://
|
|
4133
|
+
* @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}, indexed by market symbols
|
|
4127
4134
|
*/
|
|
4128
4135
|
await this.loadMarkets();
|
|
4129
4136
|
symbols = this.marketSymbols(symbols, 'swap', true, true);
|
|
@@ -4237,7 +4244,7 @@ export default class mexc extends Exchange {
|
|
|
4237
4244
|
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
|
|
4238
4245
|
* @param {string} code unified currency code of the currency for the deposit address
|
|
4239
4246
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
4240
|
-
* @returns {object} a dictionary of [address structures]{@link https://
|
|
4247
|
+
* @returns {object} a dictionary of [address structures]{@link https://docs.ccxt.com/#/?id=address-structure} indexed by the network
|
|
4241
4248
|
*/
|
|
4242
4249
|
await this.loadMarkets();
|
|
4243
4250
|
const currency = this.currency(code);
|
|
@@ -4278,7 +4285,7 @@ export default class mexc extends Exchange {
|
|
|
4278
4285
|
* @param {string} code unified currency code of the currency for the deposit address
|
|
4279
4286
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
4280
4287
|
* @param {string} [params.network] the blockchain network name
|
|
4281
|
-
* @returns {object} an [address structure]{@link https://
|
|
4288
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
4282
4289
|
*/
|
|
4283
4290
|
await this.loadMarkets();
|
|
4284
4291
|
const currency = this.currency(code);
|
|
@@ -4317,7 +4324,7 @@ export default class mexc extends Exchange {
|
|
|
4317
4324
|
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
|
|
4318
4325
|
* @param {string} code unified currency code
|
|
4319
4326
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
4320
|
-
* @returns {object} an [address structure]{@link https://
|
|
4327
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
4321
4328
|
*/
|
|
4322
4329
|
const rawNetwork = this.safeStringUpper(params, 'network');
|
|
4323
4330
|
params = this.omit(params, 'network');
|
|
@@ -4347,7 +4354,7 @@ export default class mexc extends Exchange {
|
|
|
4347
4354
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
4348
4355
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
4349
4356
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
4350
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
4357
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
4351
4358
|
*/
|
|
4352
4359
|
await this.loadMarkets();
|
|
4353
4360
|
const request = {
|
|
@@ -4407,7 +4414,7 @@ export default class mexc extends Exchange {
|
|
|
4407
4414
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
4408
4415
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
4409
4416
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
4410
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
4417
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
4411
4418
|
*/
|
|
4412
4419
|
await this.loadMarkets();
|
|
4413
4420
|
const request = {
|
|
@@ -4581,7 +4588,7 @@ export default class mexc extends Exchange {
|
|
|
4581
4588
|
* @description fetch data on a single open contract trade position
|
|
4582
4589
|
* @param {string} symbol unified market symbol of the market the position is held in, default is undefined
|
|
4583
4590
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
4584
|
-
* @returns {object} a [position structure]{@link https://
|
|
4591
|
+
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
4585
4592
|
*/
|
|
4586
4593
|
await this.loadMarkets();
|
|
4587
4594
|
const market = this.market(symbol);
|
|
@@ -4598,7 +4605,7 @@ export default class mexc extends Exchange {
|
|
|
4598
4605
|
* @description fetch all open positions
|
|
4599
4606
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
4600
4607
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
4601
|
-
* @returns {object[]} a list of [position structure]{@link https://
|
|
4608
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
4602
4609
|
*/
|
|
4603
4610
|
await this.loadMarkets();
|
|
4604
4611
|
const response = await this.contractPrivateGetPositionOpenPositions(params);
|
|
@@ -4740,7 +4747,7 @@ export default class mexc extends Exchange {
|
|
|
4740
4747
|
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
4741
4748
|
* @param {int} [limit] the maximum number of transfers structures to retrieve
|
|
4742
4749
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
4743
|
-
* @returns {object[]} a list of [transfer structures]{@link https://
|
|
4750
|
+
* @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
4744
4751
|
*/
|
|
4745
4752
|
const [marketType, query] = this.handleMarketTypeAndParams('fetchTransfers', undefined, params);
|
|
4746
4753
|
await this.loadMarkets();
|
|
@@ -4830,7 +4837,7 @@ export default class mexc extends Exchange {
|
|
|
4830
4837
|
* @param {string} toAccount account to transfer to
|
|
4831
4838
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
4832
4839
|
* @param {string} [params.symbol] market symbol required for margin account transfers eg:BTCUSDT
|
|
4833
|
-
* @returns {object} a [transfer structure]{@link https://
|
|
4840
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
4834
4841
|
*/
|
|
4835
4842
|
await this.loadMarkets();
|
|
4836
4843
|
const currency = this.currency(code);
|
|
@@ -4962,7 +4969,7 @@ export default class mexc extends Exchange {
|
|
|
4962
4969
|
* @param {string} address the address to withdraw to
|
|
4963
4970
|
* @param {string} tag
|
|
4964
4971
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
4965
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
4972
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
4966
4973
|
*/
|
|
4967
4974
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
4968
4975
|
const networks = this.safeValue(this.options, 'networks', {});
|
|
@@ -5029,9 +5036,11 @@ export default class mexc extends Exchange {
|
|
|
5029
5036
|
* @param {float} amount the amount to borrow
|
|
5030
5037
|
* @param {string} symbol unified market symbol
|
|
5031
5038
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
5032
|
-
* @returns {object} a [margin loan structure]{@link https://
|
|
5039
|
+
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
5033
5040
|
*/
|
|
5034
|
-
|
|
5041
|
+
if (symbol === undefined) {
|
|
5042
|
+
throw new ArgumentsRequired(this.id + ' borrowMargin() requires a symbol argument');
|
|
5043
|
+
}
|
|
5035
5044
|
await this.loadMarkets();
|
|
5036
5045
|
const market = this.market(symbol);
|
|
5037
5046
|
const currency = this.currency(code);
|
|
@@ -5063,9 +5072,11 @@ export default class mexc extends Exchange {
|
|
|
5063
5072
|
* @param {string} symbol unified market symbol
|
|
5064
5073
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
5065
5074
|
* @param {string} [params.borrowId] transaction id '762407666453712896'
|
|
5066
|
-
* @returns {object} a [margin loan structure]{@link https://
|
|
5075
|
+
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
5067
5076
|
*/
|
|
5068
|
-
|
|
5077
|
+
if (symbol === undefined) {
|
|
5078
|
+
throw new ArgumentsRequired(this.id + ' repayMargin() requires a symbol argument');
|
|
5079
|
+
}
|
|
5069
5080
|
await this.loadMarkets();
|
|
5070
5081
|
const id = this.safeString2(params, 'id', 'borrowId');
|
|
5071
5082
|
if (id === undefined) {
|
|
@@ -5099,7 +5110,7 @@ export default class mexc extends Exchange {
|
|
|
5099
5110
|
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
|
|
5100
5111
|
* @param {string[]|undefined} codes returns fees for all currencies if undefined
|
|
5101
5112
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
5102
|
-
* @returns {object[]} a list of [fee structures]{@link https://
|
|
5113
|
+
* @returns {object[]} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
5103
5114
|
*/
|
|
5104
5115
|
await this.loadMarkets();
|
|
5105
5116
|
const response = await this.spotPrivateGetCapitalConfigGetall(params);
|
|
@@ -5197,7 +5208,7 @@ export default class mexc extends Exchange {
|
|
|
5197
5208
|
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
|
|
5198
5209
|
* @param {string[]|undefined} codes returns fees for all currencies if undefined
|
|
5199
5210
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
5200
|
-
* @returns {object[]} a list of [fee structures]{@link https://
|
|
5211
|
+
* @returns {object[]} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
5201
5212
|
*/
|
|
5202
5213
|
await this.loadMarkets();
|
|
5203
5214
|
const response = await this.spotPrivateGetCapitalConfigGetall(params);
|