ccxt 4.1.56 → 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/README.md +3 -3
- package/build.sh +30 -18
- package/dist/ccxt.browser.js +3872 -3202
- package/dist/ccxt.browser.min.js +10 -10
- 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 +16 -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 +106 -85
- 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 +100 -77
- 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 +132 -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 +87 -82
- package/dist/cjs/src/p2b.js +79 -82
- 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/bybit.d.ts +1 -0
- package/js/src/abstract/cryptocom.d.ts +0 -20
- 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 +16 -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 +106 -85
- 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 +100 -77
- 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 +132 -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 +87 -82
- package/js/src/p2b.d.ts +8 -7
- package/js/src/p2b.js +79 -81
- 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 +1 -1
|
@@ -39,10 +39,10 @@ class digifinex extends digifinex$1 {
|
|
|
39
39
|
'createStopOrder': false,
|
|
40
40
|
'fetchBalance': true,
|
|
41
41
|
'fetchBorrowInterest': true,
|
|
42
|
-
'fetchBorrowRate': true,
|
|
43
42
|
'fetchBorrowRateHistories': false,
|
|
44
43
|
'fetchBorrowRateHistory': false,
|
|
45
|
-
'
|
|
44
|
+
'fetchCrossBorrowRate': true,
|
|
45
|
+
'fetchCrossBorrowRates': true,
|
|
46
46
|
'fetchCurrencies': true,
|
|
47
47
|
'fetchDepositAddress': true,
|
|
48
48
|
'fetchDeposits': true,
|
|
@@ -53,6 +53,8 @@ class digifinex extends digifinex$1 {
|
|
|
53
53
|
'fetchFundingRateHistory': true,
|
|
54
54
|
'fetchFundingRates': false,
|
|
55
55
|
'fetchIndexOHLCV': false,
|
|
56
|
+
'fetchIsolatedBorrowRate': false,
|
|
57
|
+
'fetchIsolatedBorrowRates': false,
|
|
56
58
|
'fetchLedger': true,
|
|
57
59
|
'fetchLeverage': false,
|
|
58
60
|
'fetchLeverageTiers': true,
|
|
@@ -800,7 +802,7 @@ class digifinex extends digifinex$1 {
|
|
|
800
802
|
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#margin-assets
|
|
801
803
|
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#accountbalance
|
|
802
804
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
803
|
-
* @returns {object} a [balance structure]{@link https://
|
|
805
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
804
806
|
*/
|
|
805
807
|
await this.loadMarkets();
|
|
806
808
|
let marketType = undefined;
|
|
@@ -866,7 +868,7 @@ class digifinex extends digifinex$1 {
|
|
|
866
868
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
867
869
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
868
870
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
869
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
871
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
870
872
|
*/
|
|
871
873
|
await this.loadMarkets();
|
|
872
874
|
const market = this.market(symbol);
|
|
@@ -944,7 +946,7 @@ class digifinex extends digifinex$1 {
|
|
|
944
946
|
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#tickers
|
|
945
947
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
946
948
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
947
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
949
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
948
950
|
*/
|
|
949
951
|
await this.loadMarkets();
|
|
950
952
|
symbols = this.marketSymbols(symbols);
|
|
@@ -1031,7 +1033,7 @@ class digifinex extends digifinex$1 {
|
|
|
1031
1033
|
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#ticker
|
|
1032
1034
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1033
1035
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
1034
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
1036
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1035
1037
|
*/
|
|
1036
1038
|
await this.loadMarkets();
|
|
1037
1039
|
const market = this.market(symbol);
|
|
@@ -1339,7 +1341,7 @@ class digifinex extends digifinex$1 {
|
|
|
1339
1341
|
* @name digifinex#fetchStatus
|
|
1340
1342
|
* @description the latest known information on the availability of the exchange API
|
|
1341
1343
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
1342
|
-
* @returns {object} a [status structure]{@link https://
|
|
1344
|
+
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
1343
1345
|
*/
|
|
1344
1346
|
const response = await this.publicSpotGetPing(params);
|
|
1345
1347
|
//
|
|
@@ -1369,7 +1371,7 @@ class digifinex extends digifinex$1 {
|
|
|
1369
1371
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1370
1372
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
1371
1373
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
1372
|
-
* @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}
|
|
1373
1375
|
*/
|
|
1374
1376
|
await this.loadMarkets();
|
|
1375
1377
|
const market = this.market(symbol);
|
|
@@ -1560,7 +1562,7 @@ class digifinex extends digifinex$1 {
|
|
|
1560
1562
|
* @param {bool} [params.postOnly] true or false
|
|
1561
1563
|
* @param {bool} [params.reduceOnly] true or false
|
|
1562
1564
|
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
1563
|
-
* @returns {object} an [order structure]{@link https://
|
|
1565
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1564
1566
|
*/
|
|
1565
1567
|
await this.loadMarkets();
|
|
1566
1568
|
const market = this.market(symbol);
|
|
@@ -1611,7 +1613,7 @@ class digifinex extends digifinex$1 {
|
|
|
1611
1613
|
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#batchorder
|
|
1612
1614
|
* @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
|
|
1613
1615
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
1614
|
-
* @returns {object} an [order structure]{@link https://
|
|
1616
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1615
1617
|
*/
|
|
1616
1618
|
await this.loadMarkets();
|
|
1617
1619
|
const ordersRequests = [];
|
|
@@ -1815,7 +1817,7 @@ class digifinex extends digifinex$1 {
|
|
|
1815
1817
|
* @param {string} id order id
|
|
1816
1818
|
* @param {string} symbol not used by digifinex cancelOrder ()
|
|
1817
1819
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
1818
|
-
* @returns {object} An [order structure]{@link https://
|
|
1820
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1819
1821
|
*/
|
|
1820
1822
|
await this.loadMarkets();
|
|
1821
1823
|
let market = undefined;
|
|
@@ -1839,7 +1841,9 @@ class digifinex extends digifinex$1 {
|
|
|
1839
1841
|
'order_id': id,
|
|
1840
1842
|
};
|
|
1841
1843
|
if (marketType === 'swap') {
|
|
1842
|
-
|
|
1844
|
+
if (symbol === undefined) {
|
|
1845
|
+
throw new errors.ArgumentsRequired(this.id + ' cancelOrder() requires a symbol argument');
|
|
1846
|
+
}
|
|
1843
1847
|
request['instrument_id'] = market['id'];
|
|
1844
1848
|
}
|
|
1845
1849
|
else {
|
|
@@ -1884,7 +1888,7 @@ class digifinex extends digifinex$1 {
|
|
|
1884
1888
|
* @param {string[]} ids order ids
|
|
1885
1889
|
* @param {string} symbol not used by digifinex cancelOrders ()
|
|
1886
1890
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
1887
|
-
* @returns {object} an list of [order structures]{@link https://
|
|
1891
|
+
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1888
1892
|
*/
|
|
1889
1893
|
await this.loadMarkets();
|
|
1890
1894
|
const defaultType = this.safeString(this.options, 'defaultType', 'spot');
|
|
@@ -2083,7 +2087,7 @@ class digifinex extends digifinex$1 {
|
|
|
2083
2087
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
2084
2088
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
2085
2089
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
2086
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
2090
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2087
2091
|
*/
|
|
2088
2092
|
await this.loadMarkets();
|
|
2089
2093
|
let market = undefined;
|
|
@@ -2185,7 +2189,7 @@ class digifinex extends digifinex$1 {
|
|
|
2185
2189
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
2186
2190
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
2187
2191
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
2188
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
2192
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2189
2193
|
*/
|
|
2190
2194
|
await this.loadMarkets();
|
|
2191
2195
|
let market = undefined;
|
|
@@ -2288,7 +2292,7 @@ class digifinex extends digifinex$1 {
|
|
|
2288
2292
|
* @param {string} id order id
|
|
2289
2293
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
2290
2294
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
2291
|
-
* @returns {object} An [order structure]{@link https://
|
|
2295
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2292
2296
|
*/
|
|
2293
2297
|
await this.loadMarkets();
|
|
2294
2298
|
let market = undefined;
|
|
@@ -2385,7 +2389,7 @@ class digifinex extends digifinex$1 {
|
|
|
2385
2389
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
2386
2390
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
2387
2391
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
2388
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
2392
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
2389
2393
|
*/
|
|
2390
2394
|
await this.loadMarkets();
|
|
2391
2395
|
let market = undefined;
|
|
@@ -2535,7 +2539,7 @@ class digifinex extends digifinex$1 {
|
|
|
2535
2539
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
2536
2540
|
* @param {int} [limit] max number of ledger entrys to return, default is undefined
|
|
2537
2541
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
2538
|
-
* @returns {object} a [ledger structure]{@link https://
|
|
2542
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
2539
2543
|
*/
|
|
2540
2544
|
await this.loadMarkets();
|
|
2541
2545
|
const request = {};
|
|
@@ -2643,7 +2647,7 @@ class digifinex extends digifinex$1 {
|
|
|
2643
2647
|
* @description fetch the deposit address for a currency associated with this account
|
|
2644
2648
|
* @param {string} code unified currency code
|
|
2645
2649
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
2646
|
-
* @returns {object} an [address structure]{@link https://
|
|
2650
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
2647
2651
|
*/
|
|
2648
2652
|
await this.loadMarkets();
|
|
2649
2653
|
const currency = this.currency(code);
|
|
@@ -2722,7 +2726,7 @@ class digifinex extends digifinex$1 {
|
|
|
2722
2726
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
2723
2727
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
2724
2728
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
2725
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
2729
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2726
2730
|
*/
|
|
2727
2731
|
return await this.fetchTransactionsByType('deposit', code, since, limit, params);
|
|
2728
2732
|
}
|
|
@@ -2735,7 +2739,7 @@ class digifinex extends digifinex$1 {
|
|
|
2735
2739
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
2736
2740
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
2737
2741
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
2738
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
2742
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2739
2743
|
*/
|
|
2740
2744
|
return await this.fetchTransactionsByType('withdrawal', code, since, limit, params);
|
|
2741
2745
|
}
|
|
@@ -2872,7 +2876,7 @@ class digifinex extends digifinex$1 {
|
|
|
2872
2876
|
* @param {string} fromAccount account to transfer from
|
|
2873
2877
|
* @param {string} toAccount account to transfer to
|
|
2874
2878
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
2875
|
-
* @returns {object} a [transfer structure]{@link https://
|
|
2879
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
2876
2880
|
*/
|
|
2877
2881
|
await this.loadMarkets();
|
|
2878
2882
|
const currency = this.currency(code);
|
|
@@ -2903,7 +2907,7 @@ class digifinex extends digifinex$1 {
|
|
|
2903
2907
|
* @param {string} address the address to withdraw to
|
|
2904
2908
|
* @param {string} tag
|
|
2905
2909
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
2906
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
2910
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2907
2911
|
*/
|
|
2908
2912
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
2909
2913
|
this.checkAddress(address);
|
|
@@ -2994,7 +2998,16 @@ class digifinex extends digifinex$1 {
|
|
|
2994
2998
|
'info': info,
|
|
2995
2999
|
};
|
|
2996
3000
|
}
|
|
2997
|
-
async
|
|
3001
|
+
async fetchCrossBorrowRate(code, params = {}) {
|
|
3002
|
+
/**
|
|
3003
|
+
* @method
|
|
3004
|
+
* @name digifinex#fetchCrossBorrowRate
|
|
3005
|
+
* @description fetch the rate of interest to borrow a currency for margin trading
|
|
3006
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#margin-assets
|
|
3007
|
+
* @param {string} code unified currency code
|
|
3008
|
+
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
3009
|
+
* @returns {object} a [borrow rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure}
|
|
3010
|
+
*/
|
|
2998
3011
|
await this.loadMarkets();
|
|
2999
3012
|
const request = {};
|
|
3000
3013
|
const response = await this.privateSpotGetMarginAssets(this.extend(request, params));
|
|
@@ -3026,13 +3039,14 @@ class digifinex extends digifinex$1 {
|
|
|
3026
3039
|
const currency = this.currency(code);
|
|
3027
3040
|
return this.parseBorrowRate(result, currency);
|
|
3028
3041
|
}
|
|
3029
|
-
async
|
|
3042
|
+
async fetchCrossBorrowRates(params = {}) {
|
|
3030
3043
|
/**
|
|
3031
3044
|
* @method
|
|
3032
|
-
* @name digifinex#
|
|
3045
|
+
* @name digifinex#fetchCrossBorrowRates
|
|
3033
3046
|
* @description fetch the borrow interest rates of all currencies
|
|
3047
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#margin-assets
|
|
3034
3048
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
3035
|
-
* @returns {object} a list of [borrow rate structures]{@link https://
|
|
3049
|
+
* @returns {object} a list of [borrow rate structures]{@link https://docs.ccxt.com/#/?id=borrow-rate-structure}
|
|
3036
3050
|
*/
|
|
3037
3051
|
await this.loadMarkets();
|
|
3038
3052
|
const response = await this.privateSpotGetMarginAssets(params);
|
|
@@ -3053,7 +3067,7 @@ class digifinex extends digifinex$1 {
|
|
|
3053
3067
|
// "equity": 45.133305540922
|
|
3054
3068
|
// }
|
|
3055
3069
|
//
|
|
3056
|
-
const result = this.safeValue(response, 'list');
|
|
3070
|
+
const result = this.safeValue(response, 'list', []);
|
|
3057
3071
|
return this.parseBorrowRates(result, 'currency');
|
|
3058
3072
|
}
|
|
3059
3073
|
parseBorrowRate(info, currency = undefined) {
|
|
@@ -3103,7 +3117,7 @@ class digifinex extends digifinex$1 {
|
|
|
3103
3117
|
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#currentfundingrate
|
|
3104
3118
|
* @param {string} symbol unified market symbol
|
|
3105
3119
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
3106
|
-
* @returns {object} a [funding rate structure]{@link https://
|
|
3120
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
3107
3121
|
*/
|
|
3108
3122
|
await this.loadMarkets();
|
|
3109
3123
|
const market = this.market(symbol);
|
|
@@ -3169,11 +3183,13 @@ class digifinex extends digifinex$1 {
|
|
|
3169
3183
|
* @description fetches historical funding rate prices
|
|
3170
3184
|
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
3171
3185
|
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
3172
|
-
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://
|
|
3186
|
+
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
3173
3187
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
3174
|
-
* @returns {object[]} a list of [funding rate structures]{@link https://
|
|
3188
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
3175
3189
|
*/
|
|
3176
|
-
|
|
3190
|
+
if (symbol === undefined) {
|
|
3191
|
+
throw new errors.ArgumentsRequired(this.id + ' fetchFundingRateHistory() requires a symbol argument');
|
|
3192
|
+
}
|
|
3177
3193
|
await this.loadMarkets();
|
|
3178
3194
|
const market = this.market(symbol);
|
|
3179
3195
|
if (!market['swap']) {
|
|
@@ -3231,7 +3247,7 @@ class digifinex extends digifinex$1 {
|
|
|
3231
3247
|
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#tradingfee
|
|
3232
3248
|
* @param {string} symbol unified market symbol
|
|
3233
3249
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
3234
|
-
* @returns {object} a [fee structure]{@link https://
|
|
3250
|
+
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
3235
3251
|
*/
|
|
3236
3252
|
await this.loadMarkets();
|
|
3237
3253
|
const market = this.market(symbol);
|
|
@@ -3281,7 +3297,7 @@ class digifinex extends digifinex$1 {
|
|
|
3281
3297
|
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#positions
|
|
3282
3298
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
3283
3299
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
3284
|
-
* @returns {object[]} a list of [position structures]{@link https://
|
|
3300
|
+
* @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
3285
3301
|
*/
|
|
3286
3302
|
await this.loadMarkets();
|
|
3287
3303
|
symbols = this.marketSymbols(symbols);
|
|
@@ -3387,7 +3403,7 @@ class digifinex extends digifinex$1 {
|
|
|
3387
3403
|
* @description fetch data on a single open contract trade position
|
|
3388
3404
|
* @param {string} symbol unified market symbol of the market the position is held in
|
|
3389
3405
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
3390
|
-
* @returns {object} a [position structure]{@link https://
|
|
3406
|
+
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
3391
3407
|
*/
|
|
3392
3408
|
await this.loadMarkets();
|
|
3393
3409
|
const market = this.market(symbol);
|
|
@@ -3567,8 +3583,10 @@ class digifinex extends digifinex$1 {
|
|
|
3567
3583
|
* @param {string} [params.side] either 'long' or 'short', required for isolated markets only
|
|
3568
3584
|
* @returns {object} response from the exchange
|
|
3569
3585
|
*/
|
|
3586
|
+
if (symbol === undefined) {
|
|
3587
|
+
throw new errors.ArgumentsRequired(this.id + ' setLeverage() requires a symbol argument');
|
|
3588
|
+
}
|
|
3570
3589
|
await this.loadMarkets();
|
|
3571
|
-
this.checkRequiredSymbol('setLeverage', symbol);
|
|
3572
3590
|
const market = this.market(symbol);
|
|
3573
3591
|
if (market['type'] !== 'swap') {
|
|
3574
3592
|
throw new errors.BadSymbol(this.id + ' setLeverage() supports swap contracts only');
|
|
@@ -3620,7 +3638,7 @@ class digifinex extends digifinex$1 {
|
|
|
3620
3638
|
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
3621
3639
|
* @param {int} [limit] the maximum number of transfers to retrieve
|
|
3622
3640
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
3623
|
-
* @returns {object[]} a list of [transfer structures]{@link https://
|
|
3641
|
+
* @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
3624
3642
|
*/
|
|
3625
3643
|
await this.loadMarkets();
|
|
3626
3644
|
let currency = undefined;
|
|
@@ -3662,7 +3680,7 @@ class digifinex extends digifinex$1 {
|
|
|
3662
3680
|
* @description retrieve information on the maximum leverage, for different trade sizes
|
|
3663
3681
|
* @param {string[]|undefined} symbols a list of unified market symbols
|
|
3664
3682
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
3665
|
-
* @returns {object} a dictionary of [leverage tiers structures]{@link https://
|
|
3683
|
+
* @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}, indexed by market symbols
|
|
3666
3684
|
*/
|
|
3667
3685
|
await this.loadMarkets();
|
|
3668
3686
|
const response = await this.publicSwapGetPublicInstruments(params);
|
|
@@ -3728,7 +3746,7 @@ class digifinex extends digifinex$1 {
|
|
|
3728
3746
|
* @description retrieve information on the maximum leverage, for different trade sizes for a single market
|
|
3729
3747
|
* @param {string} symbol unified market symbol
|
|
3730
3748
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
3731
|
-
* @returns {object} a [leverage tiers structure]{@link https://
|
|
3749
|
+
* @returns {object} a [leverage tiers structure]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}
|
|
3732
3750
|
*/
|
|
3733
3751
|
await this.loadMarkets();
|
|
3734
3752
|
const market = this.market(symbol);
|
|
@@ -3844,7 +3862,7 @@ class digifinex extends digifinex$1 {
|
|
|
3844
3862
|
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#get-currency-deposit-and-withdrawal-information
|
|
3845
3863
|
* @param {string[]|undefined} codes not used by fetchDepositWithdrawFees ()
|
|
3846
3864
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
3847
|
-
* @returns {object} a list of [fee structures]{@link https://
|
|
3865
|
+
* @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
3848
3866
|
*/
|
|
3849
3867
|
await this.loadMarkets();
|
|
3850
3868
|
const response = await this.publicSpotGetCurrencies(params);
|
|
@@ -3961,7 +3979,7 @@ class digifinex extends digifinex$1 {
|
|
|
3961
3979
|
* @param {float} amount amount of margin to add
|
|
3962
3980
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
3963
3981
|
* @param {string} params.side the position side: 'long' or 'short'
|
|
3964
|
-
* @returns {object} a [margin structure]{@link https://
|
|
3982
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=margin-structure}
|
|
3965
3983
|
*/
|
|
3966
3984
|
const side = this.safeString(params, 'side');
|
|
3967
3985
|
this.checkRequiredArgument('addMargin', side, 'side', ['long', 'short']);
|
|
@@ -3977,7 +3995,7 @@ class digifinex extends digifinex$1 {
|
|
|
3977
3995
|
* @param {float} amount the amount of margin to remove
|
|
3978
3996
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
3979
3997
|
* @param {string} params.side the position side: 'long' or 'short'
|
|
3980
|
-
* @returns {object} a [margin structure]{@link https://
|
|
3998
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=margin-structure}
|
|
3981
3999
|
*/
|
|
3982
4000
|
const side = this.safeString(params, 'side');
|
|
3983
4001
|
this.checkRequiredArgument('reduceMargin', side, 'side', ['long', 'short']);
|
|
@@ -4044,7 +4062,7 @@ class digifinex extends digifinex$1 {
|
|
|
4044
4062
|
* @param {int} [limit] the maximum number of funding history structures to retrieve
|
|
4045
4063
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
4046
4064
|
* @param {int} [params.until] timestamp in ms of the latest funding payment
|
|
4047
|
-
* @returns {object} a [funding history structure]{@link https://
|
|
4065
|
+
* @returns {object} a [funding history structure]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
|
|
4048
4066
|
*/
|
|
4049
4067
|
await this.loadMarkets();
|
|
4050
4068
|
let request = {};
|
|
@@ -4110,7 +4128,9 @@ class digifinex extends digifinex$1 {
|
|
|
4110
4128
|
* @param {object} [params] extra parameters specific to the digifinex api endpoint
|
|
4111
4129
|
* @returns {object} response from the exchange
|
|
4112
4130
|
*/
|
|
4113
|
-
|
|
4131
|
+
if (symbol === undefined) {
|
|
4132
|
+
throw new errors.ArgumentsRequired(this.id + ' setMarginMode() requires a symbol argument');
|
|
4133
|
+
}
|
|
4114
4134
|
await this.loadMarkets();
|
|
4115
4135
|
const market = this.market(symbol);
|
|
4116
4136
|
marginMode = marginMode.toLowerCase();
|
package/dist/cjs/src/exmo.js
CHANGED
|
@@ -279,7 +279,7 @@ class exmo extends exmo$1 {
|
|
|
279
279
|
* @param {string} symbol unified market symbol
|
|
280
280
|
* @param {float} amount the amount of margin to remove
|
|
281
281
|
* @param {object} [params] extra parameters specific to the exmo api endpoint
|
|
282
|
-
* @returns {object} a [margin structure]{@link https://
|
|
282
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
|
|
283
283
|
*/
|
|
284
284
|
return await this.modifyMarginHelper(symbol, amount, 'reduce', params);
|
|
285
285
|
}
|
|
@@ -291,7 +291,7 @@ class exmo extends exmo$1 {
|
|
|
291
291
|
* @param {string} symbol unified market symbol
|
|
292
292
|
* @param {float} amount amount of margin to add
|
|
293
293
|
* @param {object} [params] extra parameters specific to the exmo api endpoint
|
|
294
|
-
* @returns {object} a [margin structure]{@link https://
|
|
294
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
|
|
295
295
|
*/
|
|
296
296
|
return await this.modifyMarginHelper(symbol, amount, 'add', params);
|
|
297
297
|
}
|
|
@@ -301,7 +301,7 @@ class exmo extends exmo$1 {
|
|
|
301
301
|
* @name exmo#fetchTradingFees
|
|
302
302
|
* @description fetch the trading fees for multiple markets
|
|
303
303
|
* @param {object} [params] extra parameters specific to the exmo api endpoint
|
|
304
|
-
* @returns {object} a dictionary of [fee structures]{@link https://
|
|
304
|
+
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
305
305
|
*/
|
|
306
306
|
let method = this.safeString(params, 'method');
|
|
307
307
|
params = this.omit(params, 'method');
|
|
@@ -427,7 +427,7 @@ class exmo extends exmo$1 {
|
|
|
427
427
|
* @see https://documenter.getpostman.com/view/10287440/SzYXWKPi#4190035d-24b1-453d-833b-37e0a52f88e2
|
|
428
428
|
* @param {string[]|undefined} codes list of unified currency codes
|
|
429
429
|
* @param {object} [params] extra parameters specific to the exmo api endpoint
|
|
430
|
-
* @returns {object} a list of [transaction fees structures]{@link https://
|
|
430
|
+
* @returns {object} a list of [transaction fees structures]{@link https://docs.ccxt.com/#/?id=fees-structure}
|
|
431
431
|
*/
|
|
432
432
|
await this.loadMarkets();
|
|
433
433
|
const cryptoList = await this.publicGetPaymentsProvidersCryptoList(params);
|
|
@@ -500,7 +500,7 @@ class exmo extends exmo$1 {
|
|
|
500
500
|
* @see https://documenter.getpostman.com/view/10287440/SzYXWKPi#4190035d-24b1-453d-833b-37e0a52f88e2
|
|
501
501
|
* @param {string[]|undefined} codes list of unified currency codes
|
|
502
502
|
* @param {object} [params] extra parameters specific to the exmo api endpoint
|
|
503
|
-
* @returns {object} a list of [transaction fees structures]{@link https://
|
|
503
|
+
* @returns {object} a list of [transaction fees structures]{@link https://docs.ccxt.com/#/?id=fees-structure}
|
|
504
504
|
*/
|
|
505
505
|
await this.loadMarkets();
|
|
506
506
|
const response = await this.publicGetPaymentsProvidersCryptoList(params);
|
|
@@ -952,7 +952,7 @@ class exmo extends exmo$1 {
|
|
|
952
952
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
953
953
|
* @param {object} [params] extra parameters specific to the exmo api endpoint
|
|
954
954
|
* @param {string} [params.marginMode] *isolated* fetches the isolated margin balance
|
|
955
|
-
* @returns {object} a [balance structure]{@link https://
|
|
955
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
956
956
|
*/
|
|
957
957
|
await this.loadMarkets();
|
|
958
958
|
let marginMode = undefined;
|
|
@@ -1000,7 +1000,7 @@ class exmo extends exmo$1 {
|
|
|
1000
1000
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1001
1001
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
1002
1002
|
* @param {object} [params] extra parameters specific to the exmo api endpoint
|
|
1003
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
1003
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
1004
1004
|
*/
|
|
1005
1005
|
await this.loadMarkets();
|
|
1006
1006
|
const market = this.market(symbol);
|
|
@@ -1022,7 +1022,7 @@ class exmo extends exmo$1 {
|
|
|
1022
1022
|
* @param {string[]|undefined} symbols list of unified market symbols, all symbols fetched if undefined, default is undefined
|
|
1023
1023
|
* @param {int} [limit] max number of entries per orderbook to return, default is undefined
|
|
1024
1024
|
* @param {object} [params] extra parameters specific to the exmo api endpoint
|
|
1025
|
-
* @returns {object} a dictionary of [order book structures]{@link https://
|
|
1025
|
+
* @returns {object} a dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbol
|
|
1026
1026
|
*/
|
|
1027
1027
|
await this.loadMarkets();
|
|
1028
1028
|
let ids = undefined;
|
|
@@ -1101,7 +1101,7 @@ class exmo extends exmo$1 {
|
|
|
1101
1101
|
* @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
|
|
1102
1102
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1103
1103
|
* @param {object} [params] extra parameters specific to the exmo api endpoint
|
|
1104
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
1104
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1105
1105
|
*/
|
|
1106
1106
|
await this.loadMarkets();
|
|
1107
1107
|
symbols = this.marketSymbols(symbols);
|
|
@@ -1139,7 +1139,7 @@ class exmo extends exmo$1 {
|
|
|
1139
1139
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1140
1140
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1141
1141
|
* @param {object} [params] extra parameters specific to the exmo api endpoint
|
|
1142
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
1142
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1143
1143
|
*/
|
|
1144
1144
|
await this.loadMarkets();
|
|
1145
1145
|
const response = await this.publicGetTicker(params);
|
|
@@ -1245,7 +1245,7 @@ class exmo extends exmo$1 {
|
|
|
1245
1245
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1246
1246
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
1247
1247
|
* @param {object} [params] extra parameters specific to the exmo api endpoint
|
|
1248
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
1248
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
1249
1249
|
*/
|
|
1250
1250
|
await this.loadMarkets();
|
|
1251
1251
|
const market = this.market(symbol);
|
|
@@ -1292,9 +1292,11 @@ class exmo extends exmo$1 {
|
|
|
1292
1292
|
*
|
|
1293
1293
|
* EXCHANGE SPECIFIC PARAMETERS
|
|
1294
1294
|
* @param {int} [params.offset] last deal offset, default = 0
|
|
1295
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
1295
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1296
1296
|
*/
|
|
1297
|
-
|
|
1297
|
+
if (symbol === undefined) {
|
|
1298
|
+
throw new errors.ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol argument');
|
|
1299
|
+
}
|
|
1298
1300
|
let marginMode = undefined;
|
|
1299
1301
|
[marginMode, params] = this.handleMarginModeAndParams('fetchMyTrades', params);
|
|
1300
1302
|
if (marginMode === 'cross') {
|
|
@@ -1396,7 +1398,7 @@ class exmo extends exmo$1 {
|
|
|
1396
1398
|
* @param {float} [params.stopPrice] the price at which a trigger order is triggered at
|
|
1397
1399
|
* @param {string} [params.timeInForce] *spot only* 'fok', 'ioc' or 'post_only'
|
|
1398
1400
|
* @param {boolean} [params.postOnly] *spot only* true for post only orders
|
|
1399
|
-
* @returns {object} an [order structure]{@link https://
|
|
1401
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1400
1402
|
*/
|
|
1401
1403
|
await this.loadMarkets();
|
|
1402
1404
|
const market = this.market(symbol);
|
|
@@ -1508,7 +1510,7 @@ class exmo extends exmo$1 {
|
|
|
1508
1510
|
* @param {object} [params] extra parameters specific to the exmo api endpoint
|
|
1509
1511
|
* @param {boolean} [params.trigger] true to cancel a trigger order
|
|
1510
1512
|
* @param {string} [params.marginMode] set to 'cross' or 'isolated' to cancel a margin order
|
|
1511
|
-
* @returns {object} An [order structure]{@link https://
|
|
1513
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1512
1514
|
*/
|
|
1513
1515
|
await this.loadMarkets();
|
|
1514
1516
|
const request = {};
|
|
@@ -1556,7 +1558,7 @@ class exmo extends exmo$1 {
|
|
|
1556
1558
|
* @see https://documenter.getpostman.com/view/10287440/SzYXWKPi#cf27781e-28e5-4b39-a52d-3110f5d22459 // spot
|
|
1557
1559
|
* @param {string} symbol not used by exmo fetchOrder
|
|
1558
1560
|
* @param {object} [params] extra parameters specific to the exmo api endpoint
|
|
1559
|
-
* @returns {object} An [order structure]{@link https://
|
|
1561
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1560
1562
|
*/
|
|
1561
1563
|
await this.loadMarkets();
|
|
1562
1564
|
const request = {
|
|
@@ -1601,7 +1603,7 @@ class exmo extends exmo$1 {
|
|
|
1601
1603
|
* @param {int} [limit] the maximum number of trades to retrieve
|
|
1602
1604
|
* @param {object} [params] extra parameters specific to the exmo api endpoint
|
|
1603
1605
|
* @param {string} [params.marginMode] set to "isolated" to fetch trades for a margin order
|
|
1604
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
1606
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1605
1607
|
*/
|
|
1606
1608
|
let marginMode = undefined;
|
|
1607
1609
|
[marginMode, params] = this.handleMarginModeAndParams('fetchOrderTrades', params);
|
|
@@ -1678,7 +1680,7 @@ class exmo extends exmo$1 {
|
|
|
1678
1680
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1679
1681
|
* @param {object} [params] extra parameters specific to the exmo api endpoint
|
|
1680
1682
|
* @param {string} [params.marginMode] set to "isolated" for margin orders
|
|
1681
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1683
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1682
1684
|
*/
|
|
1683
1685
|
await this.loadMarkets();
|
|
1684
1686
|
let market = undefined;
|
|
@@ -1942,7 +1944,7 @@ class exmo extends exmo$1 {
|
|
|
1942
1944
|
* @param {int} [limit] max number of orders to return, default is undefined
|
|
1943
1945
|
* @param {object} [params] extra parameters specific to the exmo api endpoint
|
|
1944
1946
|
* @param {string} [params.marginMode] set to "isolated" for margin orders
|
|
1945
|
-
* @returns {object} a list of [order structures]{@link https://
|
|
1947
|
+
* @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1946
1948
|
*/
|
|
1947
1949
|
await this.loadMarkets();
|
|
1948
1950
|
let marginMode = undefined;
|
|
@@ -2047,7 +2049,7 @@ class exmo extends exmo$1 {
|
|
|
2047
2049
|
* @param {int} [params.distance] distance for trailing stop orders
|
|
2048
2050
|
* @param {int} [params.expire] expiration timestamp in UTC timezone for the order. order will not be expired if expire is 0
|
|
2049
2051
|
* @param {string} [params.comment] optional comment for order. up to 50 latin symbols, whitespaces, underscores
|
|
2050
|
-
* @returns {object} an [order structure]{@link https://
|
|
2052
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2051
2053
|
*/
|
|
2052
2054
|
await this.loadMarkets();
|
|
2053
2055
|
const market = this.market(symbol);
|
|
@@ -2080,7 +2082,7 @@ class exmo extends exmo$1 {
|
|
|
2080
2082
|
* @description fetch the deposit address for a currency associated with this account
|
|
2081
2083
|
* @param {string} code unified currency code
|
|
2082
2084
|
* @param {object} [params] extra parameters specific to the exmo api endpoint
|
|
2083
|
-
* @returns {object} an [address structure]{@link https://
|
|
2085
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
2084
2086
|
*/
|
|
2085
2087
|
await this.loadMarkets();
|
|
2086
2088
|
const response = await this.privatePostDepositAddress(params);
|
|
@@ -2129,7 +2131,7 @@ class exmo extends exmo$1 {
|
|
|
2129
2131
|
* @param {string} address the address to withdraw to
|
|
2130
2132
|
* @param {string} tag
|
|
2131
2133
|
* @param {object} [params] extra parameters specific to the exmo api endpoint
|
|
2132
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
2134
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2133
2135
|
*/
|
|
2134
2136
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
2135
2137
|
await this.loadMarkets();
|
|
@@ -2307,7 +2309,7 @@ class exmo extends exmo$1 {
|
|
|
2307
2309
|
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
2308
2310
|
* @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
|
|
2309
2311
|
* @param {object} [params] extra parameters specific to the exmo api endpoint
|
|
2310
|
-
* @returns {object} a list of [transaction structure]{@link https://
|
|
2312
|
+
* @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2311
2313
|
*/
|
|
2312
2314
|
await this.loadMarkets();
|
|
2313
2315
|
const request = {};
|
|
@@ -2360,7 +2362,7 @@ class exmo extends exmo$1 {
|
|
|
2360
2362
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
2361
2363
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
2362
2364
|
* @param {object} [params] extra parameters specific to the exmo api endpoint
|
|
2363
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
2365
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2364
2366
|
*/
|
|
2365
2367
|
await this.loadMarkets();
|
|
2366
2368
|
let currency = undefined;
|
|
@@ -2412,7 +2414,7 @@ class exmo extends exmo$1 {
|
|
|
2412
2414
|
* @param {string} id withdrawal id
|
|
2413
2415
|
* @param {string} code unified currency code of the currency withdrawn, default is undefined
|
|
2414
2416
|
* @param {object} [params] extra parameters specific to the exmo api endpoint
|
|
2415
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
2417
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2416
2418
|
*/
|
|
2417
2419
|
await this.loadMarkets();
|
|
2418
2420
|
let currency = undefined;
|
|
@@ -2463,7 +2465,7 @@ class exmo extends exmo$1 {
|
|
|
2463
2465
|
* @param {string} id deposit id
|
|
2464
2466
|
* @param {string} code unified currency code, default is undefined
|
|
2465
2467
|
* @param {object} [params] extra parameters specific to the exmo api endpoint
|
|
2466
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
2468
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2467
2469
|
*/
|
|
2468
2470
|
await this.loadMarkets();
|
|
2469
2471
|
let currency = undefined;
|
|
@@ -2515,7 +2517,7 @@ class exmo extends exmo$1 {
|
|
|
2515
2517
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
2516
2518
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
2517
2519
|
* @param {object} [params] extra parameters specific to the exmo api endpoint
|
|
2518
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
2520
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2519
2521
|
*/
|
|
2520
2522
|
await this.loadMarkets();
|
|
2521
2523
|
let currency = undefined;
|