ccxt 4.0.74 → 4.0.76
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 +4 -4
- package/dist/ccxt.browser.js +2635 -2383
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +11 -11
- package/dist/cjs/src/alpaca.js +7 -7
- package/dist/cjs/src/ascendex.js +25 -25
- package/dist/cjs/src/base/Exchange.js +4 -4
- package/dist/cjs/src/bigone.js +19 -19
- package/dist/cjs/src/binance.js +56 -56
- package/dist/cjs/src/bingx.js +85 -40
- package/dist/cjs/src/bit2c.js +12 -12
- package/dist/cjs/src/bitbank.js +13 -13
- package/dist/cjs/src/bitbns.js +14 -14
- package/dist/cjs/src/bitfinex.js +21 -21
- package/dist/cjs/src/bitfinex2.js +29 -29
- package/dist/cjs/src/bitflyer.js +17 -17
- package/dist/cjs/src/bitforex.js +11 -11
- package/dist/cjs/src/bitget.js +39 -39
- package/dist/cjs/src/bithumb.js +11 -11
- package/dist/cjs/src/bitmart.js +44 -31
- package/dist/cjs/src/bitmex.js +24 -24
- package/dist/cjs/src/bitopro.js +21 -21
- package/dist/cjs/src/bitpanda.js +21 -21
- package/dist/cjs/src/bitrue.js +18 -18
- package/dist/cjs/src/bitso.js +21 -21
- package/dist/cjs/src/bitstamp.js +21 -21
- package/dist/cjs/src/bitstamp1.js +8 -8
- package/dist/cjs/src/bittrex.js +27 -27
- package/dist/cjs/src/bitvavo.js +19 -19
- package/dist/cjs/src/bkex.js +21 -21
- package/dist/cjs/src/bl3p.js +8 -8
- package/dist/cjs/src/blockchaincom.js +21 -21
- package/dist/cjs/src/btcalpha.js +15 -15
- package/dist/cjs/src/btcbox.js +10 -10
- package/dist/cjs/src/btcmarkets.js +17 -17
- package/dist/cjs/src/btctradeua.js +8 -8
- package/dist/cjs/src/btcturk.js +11 -11
- package/dist/cjs/src/bybit.js +153 -121
- package/dist/cjs/src/cex.js +14 -14
- package/dist/cjs/src/coinbase.js +23 -23
- package/dist/cjs/src/coinbasepro.js +24 -24
- package/dist/cjs/src/coincheck.js +12 -12
- package/dist/cjs/src/coinex.js +87 -41
- package/dist/cjs/src/coinfalcon.js +16 -16
- package/dist/cjs/src/coinmate.js +14 -14
- package/dist/cjs/src/coinone.js +12 -12
- package/dist/cjs/src/coinsph.js +27 -22
- package/dist/cjs/src/coinspot.js +8 -8
- package/dist/cjs/src/cryptocom.js +29 -29
- package/dist/cjs/src/currencycom.js +20 -20
- package/dist/cjs/src/delta.js +25 -25
- package/dist/cjs/src/deribit.js +30 -30
- package/dist/cjs/src/digifinex.js +31 -31
- package/dist/cjs/src/exmo.js +26 -26
- package/dist/cjs/src/gate.js +38 -38
- package/dist/cjs/src/gemini.js +17 -17
- package/dist/cjs/src/hitbtc.js +34 -34
- package/dist/cjs/src/hollaex.js +23 -23
- package/dist/cjs/src/huobi.js +45 -45
- package/dist/cjs/src/huobijp.js +20 -20
- package/dist/cjs/src/idex.js +19 -19
- package/dist/cjs/src/independentreserve.js +12 -12
- package/dist/cjs/src/indodax.js +14 -14
- package/dist/cjs/src/kraken.js +27 -27
- package/dist/cjs/src/krakenfutures.js +12 -12
- package/dist/cjs/src/kucoin.js +33 -33
- package/dist/cjs/src/kucoinfutures.js +24 -24
- package/dist/cjs/src/kuna.js +12 -12
- package/dist/cjs/src/latoken.js +17 -17
- package/dist/cjs/src/lbank.js +12 -12
- package/dist/cjs/src/lbank2.js +23 -23
- package/dist/cjs/src/luno.js +16 -16
- package/dist/cjs/src/lykke.js +16 -16
- package/dist/cjs/src/mercado.js +12 -12
- package/dist/cjs/src/mexc.js +44 -42
- package/dist/cjs/src/ndax.js +20 -20
- package/dist/cjs/src/novadax.js +20 -20
- package/dist/cjs/src/oceanex.js +16 -16
- package/dist/cjs/src/okcoin.js +21 -21
- package/dist/cjs/src/okx.js +52 -52
- package/dist/cjs/src/paymium.js +11 -11
- package/dist/cjs/src/phemex.js +26 -26
- package/dist/cjs/src/poloniex.js +237 -136
- package/dist/cjs/src/poloniexfutures.js +18 -18
- 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/bitfinex.js +4 -4
- package/dist/cjs/src/pro/bitfinex2.js +6 -6
- package/dist/cjs/src/pro/bitget.js +6 -6
- package/dist/cjs/src/pro/bitmart.js +4 -4
- 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 +3 -3
- package/dist/cjs/src/pro/bittrex.js +6 -6
- package/dist/cjs/src/pro/bitvavo.js +5 -5
- package/dist/cjs/src/pro/blockchaincom.js +5 -5
- package/dist/cjs/src/pro/bybit.js +6 -6
- package/dist/cjs/src/pro/cex.js +7 -7
- package/dist/cjs/src/pro/coinbase.js +5 -5
- package/dist/cjs/src/pro/coinbasepro.js +6 -6
- package/dist/cjs/src/pro/coinex.js +5 -5
- package/dist/cjs/src/pro/cryptocom.js +10 -10
- 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 +5 -5
- 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 +3 -3
- package/dist/cjs/src/pro/hollaex.js +5 -5
- package/dist/cjs/src/pro/huobi.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 +12 -12
- package/dist/cjs/src/pro/krakenfutures.js +7 -7
- package/dist/cjs/src/pro/kucoin.js +6 -6
- package/dist/cjs/src/pro/kucoinfutures.js +6 -5
- 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 +19 -18
- 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 +6 -6
- package/dist/cjs/src/pro/whitebit.js +6 -6
- package/dist/cjs/src/probit.js +19 -19
- package/dist/cjs/src/tidex.js +13 -13
- package/dist/cjs/src/timex.js +16 -16
- package/dist/cjs/src/tokocrypto.js +18 -18
- package/dist/cjs/src/upbit.js +20 -20
- package/dist/cjs/src/wavesexchange.js +16 -16
- package/dist/cjs/src/wazirx.js +12 -12
- package/dist/cjs/src/whitebit.js +24 -24
- package/dist/cjs/src/woo.js +30 -24
- package/dist/cjs/src/yobit.js +16 -16
- package/dist/cjs/src/zaif.js +10 -10
- package/dist/cjs/src/zonda.js +15 -15
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bingx.d.ts +2 -0
- package/js/src/abstract/bitmart.d.ts +13 -0
- package/js/src/abstract/bybit.d.ts +33 -21
- package/js/src/abstract/coinsph.d.ts +5 -0
- package/js/src/abstract/woo.d.ts +6 -0
- package/js/src/ace.js +11 -11
- package/js/src/alpaca.js +7 -7
- package/js/src/ascendex.js +25 -25
- package/js/src/base/Exchange.js +4 -4
- package/js/src/bigone.js +19 -19
- package/js/src/binance.js +56 -56
- package/js/src/bingx.d.ts +1 -0
- package/js/src/bingx.js +85 -40
- package/js/src/bit2c.js +12 -12
- package/js/src/bitbank.js +13 -13
- package/js/src/bitbns.js +14 -14
- package/js/src/bitfinex.js +21 -21
- package/js/src/bitfinex2.js +29 -29
- package/js/src/bitflyer.js +17 -17
- package/js/src/bitforex.js +11 -11
- package/js/src/bitget.js +39 -39
- package/js/src/bithumb.js +11 -11
- package/js/src/bitmart.js +44 -31
- package/js/src/bitmex.js +24 -24
- package/js/src/bitopro.js +21 -21
- package/js/src/bitpanda.js +21 -21
- package/js/src/bitrue.js +18 -18
- package/js/src/bitso.js +21 -21
- package/js/src/bitstamp.js +21 -21
- package/js/src/bitstamp1.js +8 -8
- package/js/src/bittrex.js +27 -27
- package/js/src/bitvavo.js +19 -19
- package/js/src/bkex.js +21 -21
- package/js/src/bl3p.js +8 -8
- package/js/src/blockchaincom.js +21 -21
- package/js/src/btcalpha.js +15 -15
- package/js/src/btcbox.js +10 -10
- package/js/src/btcmarkets.js +17 -17
- package/js/src/btctradeua.js +8 -8
- package/js/src/btcturk.js +11 -11
- package/js/src/bybit.js +153 -121
- package/js/src/cex.js +14 -14
- package/js/src/coinbase.js +23 -23
- package/js/src/coinbasepro.js +24 -24
- package/js/src/coincheck.js +12 -12
- package/js/src/coinex.d.ts +1 -0
- package/js/src/coinex.js +87 -41
- package/js/src/coinfalcon.js +16 -16
- package/js/src/coinmate.js +14 -14
- package/js/src/coinone.js +12 -12
- package/js/src/coinsph.js +27 -22
- package/js/src/coinspot.js +8 -8
- package/js/src/cryptocom.js +29 -29
- package/js/src/currencycom.js +20 -20
- package/js/src/delta.js +25 -25
- package/js/src/deribit.js +30 -30
- package/js/src/digifinex.js +31 -31
- package/js/src/exmo.js +26 -26
- package/js/src/gate.js +38 -38
- package/js/src/gemini.js +17 -17
- package/js/src/hitbtc.js +34 -34
- package/js/src/hollaex.js +23 -23
- package/js/src/huobi.js +45 -45
- package/js/src/huobijp.js +20 -20
- package/js/src/idex.js +19 -19
- package/js/src/independentreserve.js +12 -12
- package/js/src/indodax.js +14 -14
- package/js/src/kraken.js +27 -27
- package/js/src/krakenfutures.js +12 -12
- package/js/src/kucoin.js +33 -33
- package/js/src/kucoinfutures.js +24 -24
- package/js/src/kuna.js +12 -12
- package/js/src/latoken.js +17 -17
- package/js/src/lbank.js +12 -12
- package/js/src/lbank2.js +23 -23
- package/js/src/luno.js +16 -16
- package/js/src/lykke.js +16 -16
- package/js/src/mercado.js +12 -12
- package/js/src/mexc.js +45 -43
- package/js/src/ndax.js +20 -20
- package/js/src/novadax.js +20 -20
- package/js/src/oceanex.js +16 -16
- package/js/src/okcoin.js +21 -21
- package/js/src/okx.js +52 -52
- package/js/src/paymium.js +11 -11
- package/js/src/phemex.js +26 -26
- package/js/src/poloniex.d.ts +1 -1
- package/js/src/poloniex.js +237 -136
- package/js/src/poloniexfutures.js +18 -18
- 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/bitfinex.js +4 -4
- package/js/src/pro/bitfinex2.js +6 -6
- package/js/src/pro/bitget.js +6 -6
- package/js/src/pro/bitmart.js +4 -4
- 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 +3 -3
- package/js/src/pro/bittrex.js +6 -6
- package/js/src/pro/bitvavo.js +5 -5
- package/js/src/pro/blockchaincom.js +5 -5
- package/js/src/pro/bybit.js +6 -6
- package/js/src/pro/cex.js +7 -7
- package/js/src/pro/coinbase.js +5 -5
- package/js/src/pro/coinbasepro.js +6 -6
- package/js/src/pro/coinex.js +5 -5
- package/js/src/pro/cryptocom.js +10 -10
- package/js/src/pro/currencycom.js +4 -4
- package/js/src/pro/deribit.js +6 -6
- package/js/src/pro/exmo.js +5 -5
- package/js/src/pro/gate.js +7 -7
- package/js/src/pro/gemini.js +3 -3
- package/js/src/pro/hitbtc.js +3 -3
- package/js/src/pro/hollaex.js +5 -5
- package/js/src/pro/huobi.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 +12 -12
- package/js/src/pro/krakenfutures.js +7 -7
- package/js/src/pro/kucoin.js +6 -6
- package/js/src/pro/kucoinfutures.js +6 -5
- 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.d.ts +1 -1
- package/js/src/pro/okx.js +19 -18
- 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 +6 -6
- package/js/src/pro/whitebit.js +6 -6
- package/js/src/probit.js +19 -19
- package/js/src/tidex.js +13 -13
- package/js/src/timex.js +16 -16
- package/js/src/tokocrypto.js +18 -18
- package/js/src/upbit.js +20 -20
- package/js/src/wavesexchange.js +16 -16
- package/js/src/wazirx.js +12 -12
- package/js/src/whitebit.js +24 -24
- package/js/src/woo.js +30 -24
- package/js/src/yobit.js +16 -16
- package/js/src/zaif.js +10 -10
- package/js/src/zonda.js +15 -15
- package/package.json +1 -1
- package/skip-tests.json +2 -0
package/js/src/mexc.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
// ---------------------------------------------------------------------------
|
|
8
8
|
import Exchange from './abstract/mexc.js';
|
|
9
|
-
import { BadRequest, InvalidNonce, BadSymbol, InvalidOrder, InvalidAddress, ExchangeError, ArgumentsRequired, NotSupported, InsufficientFunds, PermissionDenied, AuthenticationError, AccountSuspended } from './base/errors.js';
|
|
9
|
+
import { BadRequest, InvalidNonce, BadSymbol, InvalidOrder, InvalidAddress, ExchangeError, ArgumentsRequired, NotSupported, InsufficientFunds, PermissionDenied, AuthenticationError, AccountSuspended, OnMaintenance } from './base/errors.js';
|
|
10
10
|
import { TICK_SIZE } from './base/functions/number.js';
|
|
11
11
|
import { Precise } from './base/Precise.js';
|
|
12
12
|
import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
|
|
@@ -718,6 +718,7 @@ export default class mexc extends Exchange {
|
|
|
718
718
|
'2003': InvalidOrder,
|
|
719
719
|
'2005': InsufficientFunds,
|
|
720
720
|
'400': BadRequest,
|
|
721
|
+
// '500': OnMaintenance, // {"code": 500,"message": "Under maintenance, please try again later","announcement": "https://www.mexc.com/support/articles/17827791510263"}
|
|
721
722
|
'600': BadRequest,
|
|
722
723
|
'70011': PermissionDenied,
|
|
723
724
|
'88004': InsufficientFunds,
|
|
@@ -811,7 +812,8 @@ export default class mexc extends Exchange {
|
|
|
811
812
|
'Insufficient balance!': InsufficientFunds,
|
|
812
813
|
'Bid price is great than max allow price': InvalidOrder,
|
|
813
814
|
'Invalid symbol.': BadSymbol,
|
|
814
|
-
'Param error!': BadRequest,
|
|
815
|
+
'Param error!': BadRequest,
|
|
816
|
+
'maintenance': OnMaintenance, // {"code": 500,"message": "Under maintenance, please try again later","announcement": "https://www.mexc.com/support/articles/17827791510263"}
|
|
815
817
|
},
|
|
816
818
|
},
|
|
817
819
|
});
|
|
@@ -822,7 +824,7 @@ export default class mexc extends Exchange {
|
|
|
822
824
|
* @name mexc3#fetchStatus
|
|
823
825
|
* @description the latest known information on the availability of the exchange API
|
|
824
826
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
825
|
-
* @returns {object} a [status structure]{@link https://
|
|
827
|
+
* @returns {object} a [status structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#exchange-status-structure}
|
|
826
828
|
*/
|
|
827
829
|
const [marketType, query] = this.handleMarketTypeAndParams('fetchStatus', undefined, params);
|
|
828
830
|
let response = undefined;
|
|
@@ -1286,7 +1288,7 @@ export default class mexc extends Exchange {
|
|
|
1286
1288
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1287
1289
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
1288
1290
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
1289
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
1291
|
+
* @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
|
|
1290
1292
|
*/
|
|
1291
1293
|
await this.loadMarkets();
|
|
1292
1294
|
const market = this.market(symbol);
|
|
@@ -1360,7 +1362,7 @@ export default class mexc extends Exchange {
|
|
|
1360
1362
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1361
1363
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
1362
1364
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
1363
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
1365
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
1364
1366
|
*/
|
|
1365
1367
|
await this.loadMarkets();
|
|
1366
1368
|
const market = this.market(symbol);
|
|
@@ -1696,7 +1698,7 @@ export default class mexc extends Exchange {
|
|
|
1696
1698
|
* @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
|
|
1697
1699
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1698
1700
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
1699
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
1701
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
1700
1702
|
*/
|
|
1701
1703
|
await this.loadMarkets();
|
|
1702
1704
|
const request = {};
|
|
@@ -1784,7 +1786,7 @@ export default class mexc extends Exchange {
|
|
|
1784
1786
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1785
1787
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1786
1788
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
1787
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
1789
|
+
* @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
1788
1790
|
*/
|
|
1789
1791
|
await this.loadMarkets();
|
|
1790
1792
|
const market = this.market(symbol);
|
|
@@ -1974,7 +1976,7 @@ export default class mexc extends Exchange {
|
|
|
1974
1976
|
* @description fetches the bid and ask price and volume for multiple markets
|
|
1975
1977
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
|
|
1976
1978
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
1977
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
1979
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
1978
1980
|
*/
|
|
1979
1981
|
await this.loadMarkets();
|
|
1980
1982
|
let market = undefined;
|
|
@@ -2018,10 +2020,10 @@ export default class mexc extends Exchange {
|
|
|
2018
2020
|
* @param {string} type 'market' or 'limit'
|
|
2019
2021
|
* @param {string} side 'buy' or 'sell'
|
|
2020
2022
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
2021
|
-
* @param {float} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
2023
|
+
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
2022
2024
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
2023
2025
|
* @param {string} [params.marginMode] only 'isolated' is supported for spot-margin trading
|
|
2024
|
-
* @returns {object} an [order structure]{@link https://
|
|
2026
|
+
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
2025
2027
|
*/
|
|
2026
2028
|
await this.loadMarkets();
|
|
2027
2029
|
const market = this.market(symbol);
|
|
@@ -2224,7 +2226,7 @@ export default class mexc extends Exchange {
|
|
|
2224
2226
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
2225
2227
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
2226
2228
|
* @param {string} [params.marginMode] only 'isolated' is supported, for spot-margin trading
|
|
2227
|
-
* @returns {object} An [order structure]{@link https://
|
|
2229
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
2228
2230
|
*/
|
|
2229
2231
|
if (symbol === undefined) {
|
|
2230
2232
|
throw new ArgumentsRequired(this.id + ' fetchOrder() requires a symbol argument');
|
|
@@ -2347,7 +2349,7 @@ export default class mexc extends Exchange {
|
|
|
2347
2349
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
2348
2350
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
2349
2351
|
* @param {string} [params.marginMode] only 'isolated' is supported, for spot-margin trading
|
|
2350
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
2352
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
2351
2353
|
*/
|
|
2352
2354
|
await this.loadMarkets();
|
|
2353
2355
|
const request = {};
|
|
@@ -2577,7 +2579,7 @@ export default class mexc extends Exchange {
|
|
|
2577
2579
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
2578
2580
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
2579
2581
|
* @param {string} [params.marginMode] only 'isolated' is supported, for spot-margin trading
|
|
2580
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
2582
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
2581
2583
|
*/
|
|
2582
2584
|
await this.loadMarkets();
|
|
2583
2585
|
const request = {};
|
|
@@ -2665,7 +2667,7 @@ export default class mexc extends Exchange {
|
|
|
2665
2667
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
2666
2668
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
2667
2669
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
2668
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
2670
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
2669
2671
|
*/
|
|
2670
2672
|
return await this.fetchOrdersByState(3, symbol, since, limit, params);
|
|
2671
2673
|
}
|
|
@@ -2678,7 +2680,7 @@ export default class mexc extends Exchange {
|
|
|
2678
2680
|
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
|
|
2679
2681
|
* @param {int} [limit] max number of orders to return, default is undefined
|
|
2680
2682
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
2681
|
-
* @returns {object} a list of [order structures]{@link https://
|
|
2683
|
+
* @returns {object} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
2682
2684
|
*/
|
|
2683
2685
|
return await this.fetchOrdersByState(4, symbol, since, limit, params);
|
|
2684
2686
|
}
|
|
@@ -2708,7 +2710,7 @@ export default class mexc extends Exchange {
|
|
|
2708
2710
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
2709
2711
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
2710
2712
|
* @param {string} [params.marginMode] only 'isolated' is supported for spot-margin trading
|
|
2711
|
-
* @returns {object} An [order structure]{@link https://
|
|
2713
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
2712
2714
|
*/
|
|
2713
2715
|
await this.loadMarkets();
|
|
2714
2716
|
const request = {};
|
|
@@ -2814,7 +2816,7 @@ export default class mexc extends Exchange {
|
|
|
2814
2816
|
* @param {string[]} ids order ids
|
|
2815
2817
|
* @param {string} symbol unified market symbol, default is undefined
|
|
2816
2818
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
2817
|
-
* @returns {object} an list of [order structures]{@link https://
|
|
2819
|
+
* @returns {object} an list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
2818
2820
|
*/
|
|
2819
2821
|
await this.loadMarkets();
|
|
2820
2822
|
const market = (symbol !== undefined) ? this.market(symbol) : undefined;
|
|
@@ -2849,7 +2851,7 @@ export default class mexc extends Exchange {
|
|
|
2849
2851
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
2850
2852
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
2851
2853
|
* @param {string} [params.marginMode] only 'isolated' is supported for spot-margin trading
|
|
2852
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
2854
|
+
* @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
2853
2855
|
*/
|
|
2854
2856
|
await this.loadMarkets();
|
|
2855
2857
|
const market = (symbol !== undefined) ? this.market(symbol) : undefined;
|
|
@@ -3225,7 +3227,7 @@ export default class mexc extends Exchange {
|
|
|
3225
3227
|
* @name mexc3#fetchAccounts
|
|
3226
3228
|
* @description fetch all the accounts associated with a profile
|
|
3227
3229
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
3228
|
-
* @returns {object} a dictionary of [account structures]{@link https://
|
|
3230
|
+
* @returns {object} a dictionary of [account structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#account-structure} indexed by the account type
|
|
3229
3231
|
*/
|
|
3230
3232
|
// TODO: is the below endpoints suitable for fetchAccounts?
|
|
3231
3233
|
const [marketType, query] = this.handleMarketTypeAndParams('fetchAccounts', undefined, params);
|
|
@@ -3252,7 +3254,7 @@ export default class mexc extends Exchange {
|
|
|
3252
3254
|
* @name mexc3#fetchTradingFees
|
|
3253
3255
|
* @description fetch the trading fees for multiple markets
|
|
3254
3256
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
3255
|
-
* @returns {object} a dictionary of [fee structures]{@link https://
|
|
3257
|
+
* @returns {object} a dictionary of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure} indexed by market symbols
|
|
3256
3258
|
*/
|
|
3257
3259
|
await this.loadMarkets();
|
|
3258
3260
|
const response = await this.fetchAccountHelper('spot', params);
|
|
@@ -3407,7 +3409,7 @@ export default class mexc extends Exchange {
|
|
|
3407
3409
|
* @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#isolated-account
|
|
3408
3410
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
3409
3411
|
* @param {string} [params.symbols] // required for margin, market id's separated by commas
|
|
3410
|
-
* @returns {object} a [balance structure]{@link https://
|
|
3412
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
3411
3413
|
*/
|
|
3412
3414
|
await this.loadMarkets();
|
|
3413
3415
|
let marketType = undefined;
|
|
@@ -3535,7 +3537,7 @@ export default class mexc extends Exchange {
|
|
|
3535
3537
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
3536
3538
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
3537
3539
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
3538
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
3540
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
3539
3541
|
*/
|
|
3540
3542
|
if (symbol === undefined) {
|
|
3541
3543
|
throw new ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol argument');
|
|
@@ -3626,7 +3628,7 @@ export default class mexc extends Exchange {
|
|
|
3626
3628
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
3627
3629
|
* @param {int} [limit] the maximum number of trades to retrieve
|
|
3628
3630
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
3629
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
3631
|
+
* @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
3630
3632
|
*/
|
|
3631
3633
|
await this.loadMarkets();
|
|
3632
3634
|
const request = {};
|
|
@@ -3722,7 +3724,7 @@ export default class mexc extends Exchange {
|
|
|
3722
3724
|
* @param {string} symbol unified market symbol
|
|
3723
3725
|
* @param {float} amount the amount of margin to remove
|
|
3724
3726
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
3725
|
-
* @returns {object} a [margin structure]{@link https://
|
|
3727
|
+
* @returns {object} a [margin structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#reduce-margin-structure}
|
|
3726
3728
|
*/
|
|
3727
3729
|
return await this.modifyMarginHelper(symbol, amount, 'SUB', params);
|
|
3728
3730
|
}
|
|
@@ -3734,7 +3736,7 @@ export default class mexc extends Exchange {
|
|
|
3734
3736
|
* @param {string} symbol unified market symbol
|
|
3735
3737
|
* @param {float} amount amount of margin to add
|
|
3736
3738
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
3737
|
-
* @returns {object} a [margin structure]{@link https://
|
|
3739
|
+
* @returns {object} a [margin structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#add-margin-structure}
|
|
3738
3740
|
*/
|
|
3739
3741
|
return await this.modifyMarginHelper(symbol, amount, 'ADD', params);
|
|
3740
3742
|
}
|
|
@@ -3780,7 +3782,7 @@ export default class mexc extends Exchange {
|
|
|
3780
3782
|
* @param {int} [since] the earliest time in ms to fetch funding history for
|
|
3781
3783
|
* @param {int} [limit] the maximum number of funding history structures to retrieve
|
|
3782
3784
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
3783
|
-
* @returns {object} a [funding history structure]{@link https://
|
|
3785
|
+
* @returns {object} a [funding history structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-history-structure}
|
|
3784
3786
|
*/
|
|
3785
3787
|
await this.loadMarkets();
|
|
3786
3788
|
let market = undefined;
|
|
@@ -3893,7 +3895,7 @@ export default class mexc extends Exchange {
|
|
|
3893
3895
|
* @description fetch the current funding rate
|
|
3894
3896
|
* @param {string} symbol unified market symbol
|
|
3895
3897
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
3896
|
-
* @returns {object} a [funding rate structure]{@link https://
|
|
3898
|
+
* @returns {object} a [funding rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-structure}
|
|
3897
3899
|
*/
|
|
3898
3900
|
await this.loadMarkets();
|
|
3899
3901
|
const market = this.market(symbol);
|
|
@@ -3928,7 +3930,7 @@ export default class mexc extends Exchange {
|
|
|
3928
3930
|
* @param {int} [since] not used by mexc, but filtered internally by ccxt
|
|
3929
3931
|
* @param {int} [limit] mexc limit is page_size default 20, maximum is 100
|
|
3930
3932
|
* @param {object} [params] extra parameters specific to the mexc api endpoint
|
|
3931
|
-
* @returns {object[]} a list of [funding rate structures]{@link https://
|
|
3933
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure}
|
|
3932
3934
|
*/
|
|
3933
3935
|
if (symbol === undefined) {
|
|
3934
3936
|
throw new ArgumentsRequired(this.id + ' fetchFundingRateHistory() requires a symbol argument');
|
|
@@ -3994,7 +3996,7 @@ export default class mexc extends Exchange {
|
|
|
3994
3996
|
* @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
|
|
3995
3997
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
3996
3998
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
3997
|
-
* @returns {object} a dictionary of [leverage tiers structures]{@link https://
|
|
3999
|
+
* @returns {object} a dictionary of [leverage tiers structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#leverage-tiers-structure}, indexed by market symbols
|
|
3998
4000
|
*/
|
|
3999
4001
|
await this.loadMarkets();
|
|
4000
4002
|
const response = await this.contractPublicGetDetail(params);
|
|
@@ -4107,7 +4109,7 @@ export default class mexc extends Exchange {
|
|
|
4107
4109
|
* @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
|
|
4108
4110
|
* @param {string} code unified currency code of the currency for the deposit address
|
|
4109
4111
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
4110
|
-
* @returns {object} a dictionary of [address structures]{@link https://
|
|
4112
|
+
* @returns {object} a dictionary of [address structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure} indexed by the network
|
|
4111
4113
|
*/
|
|
4112
4114
|
await this.loadMarkets();
|
|
4113
4115
|
const currency = this.currency(code);
|
|
@@ -4148,7 +4150,7 @@ export default class mexc extends Exchange {
|
|
|
4148
4150
|
* @param {string} code unified currency code of the currency for the deposit address
|
|
4149
4151
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
4150
4152
|
* @param {string} [params.network] the blockchain network name
|
|
4151
|
-
* @returns {object} an [address structure]{@link https://
|
|
4153
|
+
* @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
|
|
4152
4154
|
*/
|
|
4153
4155
|
await this.loadMarkets();
|
|
4154
4156
|
const currency = this.currency(code);
|
|
@@ -4187,7 +4189,7 @@ export default class mexc extends Exchange {
|
|
|
4187
4189
|
* @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
|
|
4188
4190
|
* @param {string} code unified currency code
|
|
4189
4191
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
4190
|
-
* @returns {object} an [address structure]{@link https://
|
|
4192
|
+
* @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
|
|
4191
4193
|
*/
|
|
4192
4194
|
const rawNetwork = this.safeStringUpper(params, 'network');
|
|
4193
4195
|
params = this.omit(params, 'network');
|
|
@@ -4217,7 +4219,7 @@ export default class mexc extends Exchange {
|
|
|
4217
4219
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
4218
4220
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
4219
4221
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
4220
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
4222
|
+
* @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
4221
4223
|
*/
|
|
4222
4224
|
await this.loadMarkets();
|
|
4223
4225
|
const request = {
|
|
@@ -4277,7 +4279,7 @@ export default class mexc extends Exchange {
|
|
|
4277
4279
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
4278
4280
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
4279
4281
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
4280
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
4282
|
+
* @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
4281
4283
|
*/
|
|
4282
4284
|
await this.loadMarkets();
|
|
4283
4285
|
const request = {
|
|
@@ -4449,7 +4451,7 @@ export default class mexc extends Exchange {
|
|
|
4449
4451
|
* @description fetch data on a single open contract trade position
|
|
4450
4452
|
* @param {string} symbol unified market symbol of the market the position is held in, default is undefined
|
|
4451
4453
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
4452
|
-
* @returns {object} a [position structure]{@link https://
|
|
4454
|
+
* @returns {object} a [position structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure}
|
|
4453
4455
|
*/
|
|
4454
4456
|
await this.loadMarkets();
|
|
4455
4457
|
const market = this.market(symbol);
|
|
@@ -4466,7 +4468,7 @@ export default class mexc extends Exchange {
|
|
|
4466
4468
|
* @description fetch all open positions
|
|
4467
4469
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
4468
4470
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
4469
|
-
* @returns {object[]} a list of [position structure]{@link https://
|
|
4471
|
+
* @returns {object[]} a list of [position structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure}
|
|
4470
4472
|
*/
|
|
4471
4473
|
await this.loadMarkets();
|
|
4472
4474
|
const response = await this.contractPrivateGetPositionOpenPositions(params);
|
|
@@ -4608,7 +4610,7 @@ export default class mexc extends Exchange {
|
|
|
4608
4610
|
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
4609
4611
|
* @param {int} [limit] the maximum number of transfers structures to retrieve
|
|
4610
4612
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
4611
|
-
* @returns {object[]} a list of [transfer structures]{@link https://
|
|
4613
|
+
* @returns {object[]} a list of [transfer structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transfer-structure}
|
|
4612
4614
|
*/
|
|
4613
4615
|
const [marketType, query] = this.handleMarketTypeAndParams('fetchTransfers', undefined, params);
|
|
4614
4616
|
await this.loadMarkets();
|
|
@@ -4698,7 +4700,7 @@ export default class mexc extends Exchange {
|
|
|
4698
4700
|
* @param {string} toAccount account to transfer to
|
|
4699
4701
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
4700
4702
|
* @param {string} [params.symbol] market symbol required for margin account transfers eg:BTCUSDT
|
|
4701
|
-
* @returns {object} a [transfer structure]{@link https://
|
|
4703
|
+
* @returns {object} a [transfer structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transfer-structure}
|
|
4702
4704
|
*/
|
|
4703
4705
|
await this.loadMarkets();
|
|
4704
4706
|
const currency = this.currency(code);
|
|
@@ -4830,7 +4832,7 @@ export default class mexc extends Exchange {
|
|
|
4830
4832
|
* @param {string} address the address to withdraw to
|
|
4831
4833
|
* @param {string} tag
|
|
4832
4834
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
4833
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
4835
|
+
* @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
4834
4836
|
*/
|
|
4835
4837
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
4836
4838
|
const networks = this.safeValue(this.options, 'networks', {});
|
|
@@ -4897,7 +4899,7 @@ export default class mexc extends Exchange {
|
|
|
4897
4899
|
* @param {float} amount the amount to borrow
|
|
4898
4900
|
* @param {string} symbol unified market symbol
|
|
4899
4901
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
4900
|
-
* @returns {object} a [margin loan structure]{@link https://
|
|
4902
|
+
* @returns {object} a [margin loan structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#margin-loan-structure}
|
|
4901
4903
|
*/
|
|
4902
4904
|
await this.loadMarkets();
|
|
4903
4905
|
if (symbol === undefined) {
|
|
@@ -4933,7 +4935,7 @@ export default class mexc extends Exchange {
|
|
|
4933
4935
|
* @param {string} symbol unified market symbol
|
|
4934
4936
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
4935
4937
|
* @param {string} [params.borrowId] transaction id '762407666453712896'
|
|
4936
|
-
* @returns {object} a [margin loan structure]{@link https://
|
|
4938
|
+
* @returns {object} a [margin loan structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#margin-loan-structure}
|
|
4937
4939
|
*/
|
|
4938
4940
|
await this.loadMarkets();
|
|
4939
4941
|
if (symbol === undefined) {
|
|
@@ -4971,7 +4973,7 @@ export default class mexc extends Exchange {
|
|
|
4971
4973
|
* @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
|
|
4972
4974
|
* @param {string[]|undefined} codes returns fees for all currencies if undefined
|
|
4973
4975
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
4974
|
-
* @returns {object[]} a list of [fee structures]{@link https://
|
|
4976
|
+
* @returns {object[]} a list of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
4975
4977
|
*/
|
|
4976
4978
|
await this.loadMarkets();
|
|
4977
4979
|
const response = await this.spotPrivateGetCapitalConfigGetall(params);
|
|
@@ -5069,7 +5071,7 @@ export default class mexc extends Exchange {
|
|
|
5069
5071
|
* @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
|
|
5070
5072
|
* @param {string[]|undefined} codes returns fees for all currencies if undefined
|
|
5071
5073
|
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
5072
|
-
* @returns {object[]} a list of [fee structures]{@link https://
|
|
5074
|
+
* @returns {object[]} a list of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
5073
5075
|
*/
|
|
5074
5076
|
await this.loadMarkets();
|
|
5075
5077
|
const response = await this.spotPrivateGetCapitalConfigGetall(params);
|
package/js/src/ndax.js
CHANGED
|
@@ -560,7 +560,7 @@ export default class ndax extends Exchange {
|
|
|
560
560
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
561
561
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
562
562
|
* @param {object} [params] extra parameters specific to the ndax api endpoint
|
|
563
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
563
|
+
* @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
|
|
564
564
|
*/
|
|
565
565
|
const omsId = this.safeInteger(this.options, 'omsId', 1);
|
|
566
566
|
await this.loadMarkets();
|
|
@@ -669,7 +669,7 @@ export default class ndax extends Exchange {
|
|
|
669
669
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
670
670
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
671
671
|
* @param {object} [params] extra parameters specific to the ndax api endpoint
|
|
672
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
672
|
+
* @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
673
673
|
*/
|
|
674
674
|
const omsId = this.safeInteger(this.options, 'omsId', 1);
|
|
675
675
|
await this.loadMarkets();
|
|
@@ -958,7 +958,7 @@ export default class ndax extends Exchange {
|
|
|
958
958
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
959
959
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
960
960
|
* @param {object} [params] extra parameters specific to the ndax api endpoint
|
|
961
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
961
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
962
962
|
*/
|
|
963
963
|
const omsId = this.safeInteger(this.options, 'omsId', 1);
|
|
964
964
|
await this.loadMarkets();
|
|
@@ -986,7 +986,7 @@ export default class ndax extends Exchange {
|
|
|
986
986
|
* @name ndax#fetchAccounts
|
|
987
987
|
* @description fetch all the accounts associated with a profile
|
|
988
988
|
* @param {object} [params] extra parameters specific to the ndax api endpoint
|
|
989
|
-
* @returns {object} a dictionary of [account structures]{@link https://
|
|
989
|
+
* @returns {object} a dictionary of [account structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#account-structure} indexed by the account type
|
|
990
990
|
*/
|
|
991
991
|
if (!this.login) {
|
|
992
992
|
throw new AuthenticationError(this.id + ' fetchAccounts() requires exchange.login email credential');
|
|
@@ -1039,7 +1039,7 @@ export default class ndax extends Exchange {
|
|
|
1039
1039
|
* @name ndax#fetchBalance
|
|
1040
1040
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
1041
1041
|
* @param {object} [params] extra parameters specific to the ndax api endpoint
|
|
1042
|
-
* @returns {object} a [balance structure]{@link https://
|
|
1042
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
1043
1043
|
*/
|
|
1044
1044
|
const omsId = this.safeInteger(this.options, 'omsId', 1);
|
|
1045
1045
|
await this.loadMarkets();
|
|
@@ -1169,7 +1169,7 @@ export default class ndax extends Exchange {
|
|
|
1169
1169
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
1170
1170
|
* @param {int} [limit] max number of ledger entrys to return, default is undefined
|
|
1171
1171
|
* @param {object} [params] extra parameters specific to the ndax api endpoint
|
|
1172
|
-
* @returns {object} a [ledger structure]{@link https://
|
|
1172
|
+
* @returns {object} a [ledger structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ledger-structure}
|
|
1173
1173
|
*/
|
|
1174
1174
|
const omsId = this.safeInteger(this.options, 'omsId', 1);
|
|
1175
1175
|
await this.loadMarkets();
|
|
@@ -1323,10 +1323,10 @@ export default class ndax extends Exchange {
|
|
|
1323
1323
|
* @param {string} type 'market' or 'limit'
|
|
1324
1324
|
* @param {string} side 'buy' or 'sell'
|
|
1325
1325
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1326
|
-
* @param {float} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1326
|
+
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1327
1327
|
* @param {object} [params] extra parameters specific to the ndax api endpoint
|
|
1328
1328
|
* @param {float} [params.triggerPrice] the price at which a trigger order would be triggered
|
|
1329
|
-
* @returns {object} an [order structure]{@link https://
|
|
1329
|
+
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1330
1330
|
*/
|
|
1331
1331
|
const omsId = this.safeInteger(this.options, 'omsId', 1);
|
|
1332
1332
|
await this.loadMarkets();
|
|
@@ -1441,7 +1441,7 @@ export default class ndax extends Exchange {
|
|
|
1441
1441
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1442
1442
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
1443
1443
|
* @param {object} [params] extra parameters specific to the ndax api endpoint
|
|
1444
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
1444
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
1445
1445
|
*/
|
|
1446
1446
|
const omsId = this.safeInteger(this.options, 'omsId', 1);
|
|
1447
1447
|
await this.loadMarkets();
|
|
@@ -1526,7 +1526,7 @@ export default class ndax extends Exchange {
|
|
|
1526
1526
|
* @description cancel all open orders
|
|
1527
1527
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
1528
1528
|
* @param {object} [params] extra parameters specific to the ndax api endpoint
|
|
1529
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
1529
|
+
* @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1530
1530
|
*/
|
|
1531
1531
|
const omsId = this.safeInteger(this.options, 'omsId', 1);
|
|
1532
1532
|
await this.loadMarkets();
|
|
@@ -1561,7 +1561,7 @@ export default class ndax extends Exchange {
|
|
|
1561
1561
|
* @param {string} id order id
|
|
1562
1562
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1563
1563
|
* @param {object} [params] extra parameters specific to the ndax api endpoint
|
|
1564
|
-
* @returns {object} An [order structure]{@link https://
|
|
1564
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1565
1565
|
*/
|
|
1566
1566
|
const omsId = this.safeInteger(this.options, 'omsId', 1);
|
|
1567
1567
|
await this.loadMarkets();
|
|
@@ -1601,7 +1601,7 @@ export default class ndax extends Exchange {
|
|
|
1601
1601
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1602
1602
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1603
1603
|
* @param {object} [params] extra parameters specific to the ndax api endpoint
|
|
1604
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1604
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1605
1605
|
*/
|
|
1606
1606
|
const omsId = this.safeInteger(this.options, 'omsId', 1);
|
|
1607
1607
|
await this.loadMarkets();
|
|
@@ -1679,7 +1679,7 @@ export default class ndax extends Exchange {
|
|
|
1679
1679
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1680
1680
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
1681
1681
|
* @param {object} [params] extra parameters specific to the ndax api endpoint
|
|
1682
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1682
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1683
1683
|
*/
|
|
1684
1684
|
const omsId = this.safeInteger(this.options, 'omsId', 1);
|
|
1685
1685
|
await this.loadMarkets();
|
|
@@ -1771,7 +1771,7 @@ export default class ndax extends Exchange {
|
|
|
1771
1771
|
* @description fetches information on an order made by the user
|
|
1772
1772
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1773
1773
|
* @param {object} [params] extra parameters specific to the ndax api endpoint
|
|
1774
|
-
* @returns {object} An [order structure]{@link https://
|
|
1774
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1775
1775
|
*/
|
|
1776
1776
|
const omsId = this.safeInteger(this.options, 'omsId', 1);
|
|
1777
1777
|
await this.loadMarkets();
|
|
@@ -1849,7 +1849,7 @@ export default class ndax extends Exchange {
|
|
|
1849
1849
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1850
1850
|
* @param {int} [limit] the maximum number of trades to retrieve
|
|
1851
1851
|
* @param {object} [params] extra parameters specific to the ndax api endpoint
|
|
1852
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
1852
|
+
* @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
1853
1853
|
*/
|
|
1854
1854
|
const omsId = this.safeInteger(this.options, 'omsId', 1);
|
|
1855
1855
|
await this.loadMarkets();
|
|
@@ -1928,7 +1928,7 @@ export default class ndax extends Exchange {
|
|
|
1928
1928
|
* @description fetch the deposit address for a currency associated with this account
|
|
1929
1929
|
* @param {string} code unified currency code
|
|
1930
1930
|
* @param {object} [params] extra parameters specific to the ndax api endpoint
|
|
1931
|
-
* @returns {object} an [address structure]{@link https://
|
|
1931
|
+
* @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
|
|
1932
1932
|
*/
|
|
1933
1933
|
const omsId = this.safeInteger(this.options, 'omsId', 1);
|
|
1934
1934
|
await this.loadMarkets();
|
|
@@ -2000,7 +2000,7 @@ export default class ndax extends Exchange {
|
|
|
2000
2000
|
* @description create a currency deposit address
|
|
2001
2001
|
* @param {string} code unified currency code of the currency for the deposit address
|
|
2002
2002
|
* @param {object} [params] extra parameters specific to the ndax api endpoint
|
|
2003
|
-
* @returns {object} an [address structure]{@link https://
|
|
2003
|
+
* @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
|
|
2004
2004
|
*/
|
|
2005
2005
|
const request = {
|
|
2006
2006
|
'GenerateNewKey': true,
|
|
@@ -2017,7 +2017,7 @@ export default class ndax extends Exchange {
|
|
|
2017
2017
|
* @param {int} [since] not used by ndax fetchDeposits
|
|
2018
2018
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
2019
2019
|
* @param {object} [params] extra parameters specific to the ndax api endpoint
|
|
2020
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
2020
|
+
* @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
2021
2021
|
*/
|
|
2022
2022
|
const omsId = this.safeInteger(this.options, 'omsId', 1);
|
|
2023
2023
|
await this.loadMarkets();
|
|
@@ -2076,7 +2076,7 @@ export default class ndax extends Exchange {
|
|
|
2076
2076
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
2077
2077
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
2078
2078
|
* @param {object} [params] extra parameters specific to the ndax api endpoint
|
|
2079
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
2079
|
+
* @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
2080
2080
|
*/
|
|
2081
2081
|
const omsId = this.safeInteger(this.options, 'omsId', 1);
|
|
2082
2082
|
await this.loadMarkets();
|
|
@@ -2273,7 +2273,7 @@ export default class ndax extends Exchange {
|
|
|
2273
2273
|
* @param {string} address the address to withdraw to
|
|
2274
2274
|
* @param {string} tag
|
|
2275
2275
|
* @param {object} [params] extra parameters specific to the ndax api endpoint
|
|
2276
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
2276
|
+
* @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
2277
2277
|
*/
|
|
2278
2278
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
2279
2279
|
// this method required login, password and twofa key
|