ccxt 4.1.56 → 4.1.58
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 +3893 -3214
- 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/base/ws/Client.js +1 -1
- 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 +110 -89
- 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 +15 -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/base/ws/Client.js +1 -1
- 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 +110 -89
- 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 +15 -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
|
@@ -29,7 +29,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
29
29
|
'future': true,
|
|
30
30
|
'option': true,
|
|
31
31
|
'addMargin': false,
|
|
32
|
-
'borrowMargin':
|
|
32
|
+
'borrowMargin': false,
|
|
33
33
|
'cancelAllOrders': true,
|
|
34
34
|
'cancelOrder': true,
|
|
35
35
|
'cancelOrders': true,
|
|
@@ -39,11 +39,11 @@ class cryptocom extends cryptocom$1 {
|
|
|
39
39
|
'fetchBalance': true,
|
|
40
40
|
'fetchBidsAsks': false,
|
|
41
41
|
'fetchBorrowInterest': false,
|
|
42
|
-
'fetchBorrowRate': false,
|
|
43
42
|
'fetchBorrowRateHistories': false,
|
|
44
43
|
'fetchBorrowRateHistory': false,
|
|
45
|
-
'fetchBorrowRates': false,
|
|
46
44
|
'fetchClosedOrders': 'emulated',
|
|
45
|
+
'fetchCrossBorrowRate': false,
|
|
46
|
+
'fetchCrossBorrowRates': false,
|
|
47
47
|
'fetchCurrencies': false,
|
|
48
48
|
'fetchDepositAddress': true,
|
|
49
49
|
'fetchDepositAddressesByNetwork': true,
|
|
@@ -57,6 +57,8 @@ class cryptocom extends cryptocom$1 {
|
|
|
57
57
|
'fetchFundingRates': false,
|
|
58
58
|
'fetchGreeks': false,
|
|
59
59
|
'fetchIndexOHLCV': false,
|
|
60
|
+
'fetchIsolatedBorrowRate': false,
|
|
61
|
+
'fetchIsolatedBorrowRates': false,
|
|
60
62
|
'fetchLedger': true,
|
|
61
63
|
'fetchLeverage': false,
|
|
62
64
|
'fetchLeverageTiers': false,
|
|
@@ -90,7 +92,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
90
92
|
'fetchVolatilityHistory': false,
|
|
91
93
|
'fetchWithdrawals': true,
|
|
92
94
|
'reduceMargin': false,
|
|
93
|
-
'repayMargin':
|
|
95
|
+
'repayMargin': false,
|
|
94
96
|
'setLeverage': false,
|
|
95
97
|
'setMarginMode': false,
|
|
96
98
|
'setPositionMode': false,
|
|
@@ -210,26 +212,6 @@ class cryptocom extends cryptocom$1 {
|
|
|
210
212
|
'private/get-open-orders': 10 / 3,
|
|
211
213
|
'private/get-order-detail': 1 / 3,
|
|
212
214
|
'private/get-trades': 100,
|
|
213
|
-
'private/margin/get-user-config': 10 / 3,
|
|
214
|
-
'private/margin/get-account-summary': 10 / 3,
|
|
215
|
-
'private/margin/transfer': 10 / 3,
|
|
216
|
-
'private/margin/borrow': 10 / 3,
|
|
217
|
-
'private/margin/repay': 10 / 3,
|
|
218
|
-
'private/margin/get-transfer-history': 10 / 3,
|
|
219
|
-
'private/margin/get-borrow-history': 10 / 3,
|
|
220
|
-
'private/margin/get-interest-history': 10 / 3,
|
|
221
|
-
'private/margin/get-repay-history': 10 / 3,
|
|
222
|
-
'private/margin/get-liquidation-history': 10 / 3,
|
|
223
|
-
'private/margin/get-liquidation-orders': 10 / 3,
|
|
224
|
-
'private/margin/create-order': 2 / 3,
|
|
225
|
-
'private/margin/cancel-order': 2 / 3,
|
|
226
|
-
'private/margin/cancel-all-orders': 2 / 3,
|
|
227
|
-
'private/margin/get-order-history': 10 / 3,
|
|
228
|
-
'private/margin/get-open-orders': 10 / 3,
|
|
229
|
-
'private/margin/get-order-detail': 1 / 3,
|
|
230
|
-
'private/margin/get-trades': 100,
|
|
231
|
-
'private/deriv/transfer': 10 / 3,
|
|
232
|
-
'private/deriv/get-transfer-history': 10 / 3,
|
|
233
215
|
'private/get-accounts': 10 / 3,
|
|
234
216
|
'private/get-subaccount-balances': 10 / 3,
|
|
235
217
|
'private/create-subaccount-transfer': 10 / 3,
|
|
@@ -583,7 +565,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
583
565
|
* @see https://exchange-docs.crypto.com/derivatives/index.html#public-get-tickers
|
|
584
566
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
585
567
|
* @param {object} [params] extra parameters specific to the cryptocom api endpoint
|
|
586
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
568
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
587
569
|
*/
|
|
588
570
|
await this.loadMarkets();
|
|
589
571
|
let market = undefined;
|
|
@@ -640,7 +622,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
640
622
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
641
623
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
642
624
|
* @param {object} [params] extra parameters specific to the cryptocom api endpoint
|
|
643
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
625
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
644
626
|
*/
|
|
645
627
|
await this.loadMarkets();
|
|
646
628
|
symbol = this.symbol(symbol);
|
|
@@ -659,7 +641,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
659
641
|
* @param {object} [params] extra parameters specific to the cryptocom api endpoint
|
|
660
642
|
* @param {int} [params.until] timestamp in ms for the ending date filter, default is the current time
|
|
661
643
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
662
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
644
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
663
645
|
*/
|
|
664
646
|
await this.loadMarkets();
|
|
665
647
|
let paginate = false;
|
|
@@ -740,7 +722,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
740
722
|
* @param {object} [params] extra parameters specific to the cryptocom api endpoint
|
|
741
723
|
* @param {int} [params.until] timestamp in ms for the ending date filter, default is the current time
|
|
742
724
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
743
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
725
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
744
726
|
*/
|
|
745
727
|
await this.loadMarkets();
|
|
746
728
|
let paginate = false;
|
|
@@ -859,7 +841,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
859
841
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
860
842
|
* @param {int} [limit] the number of order book entries to return, max 50
|
|
861
843
|
* @param {object} [params] extra parameters specific to the cryptocom api endpoint
|
|
862
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
844
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
863
845
|
*/
|
|
864
846
|
await this.loadMarkets();
|
|
865
847
|
const market = this.market(symbol);
|
|
@@ -917,7 +899,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
917
899
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
918
900
|
* @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-user-balance
|
|
919
901
|
* @param {object} [params] extra parameters specific to the cryptocom api endpoint
|
|
920
|
-
* @returns {object} a [balance structure]{@link https://
|
|
902
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
921
903
|
*/
|
|
922
904
|
await this.loadMarkets();
|
|
923
905
|
const response = await this.v1PrivatePostPrivateUserBalance(params);
|
|
@@ -974,7 +956,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
974
956
|
* @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-order-detail
|
|
975
957
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
976
958
|
* @param {object} [params] extra parameters specific to the cryptocom api endpoint
|
|
977
|
-
* @returns {object} An [order structure]{@link https://
|
|
959
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
978
960
|
*/
|
|
979
961
|
await this.loadMarkets();
|
|
980
962
|
let market = undefined;
|
|
@@ -1151,7 +1133,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
1151
1133
|
* @param {float} [params.stopPrice] price to trigger a stop order
|
|
1152
1134
|
* @param {float} [params.stopLossPrice] price to trigger a stop-loss trigger order
|
|
1153
1135
|
* @param {float} [params.takeProfitPrice] price to trigger a take-profit trigger order
|
|
1154
|
-
* @returns {object} an [order structure]{@link https://
|
|
1136
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1155
1137
|
*/
|
|
1156
1138
|
await this.loadMarkets();
|
|
1157
1139
|
const market = this.market(symbol);
|
|
@@ -1179,7 +1161,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
1179
1161
|
* @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-create-order-list-list
|
|
1180
1162
|
* @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-create-order-list-oco
|
|
1181
1163
|
* @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
|
|
1182
|
-
* @returns {object} an [order structure]{@link https://
|
|
1164
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1183
1165
|
*/
|
|
1184
1166
|
await this.loadMarkets();
|
|
1185
1167
|
const ordersRequests = [];
|
|
@@ -1383,7 +1365,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
1383
1365
|
* @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-cancel-all-orders
|
|
1384
1366
|
* @param {string} symbol unified market symbol of the orders to cancel
|
|
1385
1367
|
* @param {object} [params] extra parameters specific to the cryptocom api endpoint
|
|
1386
|
-
* @returns {object} Returns exchange raw message{@link https://
|
|
1368
|
+
* @returns {object} Returns exchange raw message{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1387
1369
|
*/
|
|
1388
1370
|
await this.loadMarkets();
|
|
1389
1371
|
let market = undefined;
|
|
@@ -1403,7 +1385,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
1403
1385
|
* @param {string} id the order id of the order to cancel
|
|
1404
1386
|
* @param {string} [symbol] unified symbol of the market the order was made in
|
|
1405
1387
|
* @param {object} [params] extra parameters specific to the cryptocom api endpoint
|
|
1406
|
-
* @returns {object} An [order structure]{@link https://
|
|
1388
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1407
1389
|
*/
|
|
1408
1390
|
await this.loadMarkets();
|
|
1409
1391
|
let market = undefined;
|
|
@@ -1438,9 +1420,11 @@ class cryptocom extends cryptocom$1 {
|
|
|
1438
1420
|
* @param {string[]} ids order ids
|
|
1439
1421
|
* @param {string} symbol unified market symbol
|
|
1440
1422
|
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
1441
|
-
* @returns {object} an list of [order structures]{@link https://
|
|
1423
|
+
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1442
1424
|
*/
|
|
1443
|
-
|
|
1425
|
+
if (symbol === undefined) {
|
|
1426
|
+
throw new errors.ArgumentsRequired(this.id + ' cancelOrders() requires a symbol argument');
|
|
1427
|
+
}
|
|
1444
1428
|
await this.loadMarkets();
|
|
1445
1429
|
const market = this.market(symbol);
|
|
1446
1430
|
const orderRequests = [];
|
|
@@ -1470,7 +1454,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
1470
1454
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1471
1455
|
* @param {int} [limit] the maximum number of open order structures to retrieve
|
|
1472
1456
|
* @param {object} [params] extra parameters specific to the cryptocom api endpoint
|
|
1473
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1457
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1474
1458
|
*/
|
|
1475
1459
|
await this.loadMarkets();
|
|
1476
1460
|
let market = undefined;
|
|
@@ -1533,7 +1517,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
1533
1517
|
* @param {object} [params] extra parameters specific to the cryptocom api endpoint
|
|
1534
1518
|
* @param {int} [params.until] timestamp in ms for the ending date filter, default is the current time
|
|
1535
1519
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
1536
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
1520
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1537
1521
|
*/
|
|
1538
1522
|
await this.loadMarkets();
|
|
1539
1523
|
let paginate = false;
|
|
@@ -1617,7 +1601,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
1617
1601
|
* @param {string} address the address to withdraw to
|
|
1618
1602
|
* @param {string} tag
|
|
1619
1603
|
* @param {object} [params] extra parameters specific to the cryptocom api endpoint
|
|
1620
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
1604
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1621
1605
|
*/
|
|
1622
1606
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
1623
1607
|
await this.loadMarkets();
|
|
@@ -1664,7 +1648,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
1664
1648
|
* @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-deposit-address
|
|
1665
1649
|
* @param {string} code unified currency code of the currency for the deposit address
|
|
1666
1650
|
* @param {object} [params] extra parameters specific to the cryptocom api endpoint
|
|
1667
|
-
* @returns {object} a dictionary of [address structures]{@link https://
|
|
1651
|
+
* @returns {object} a dictionary of [address structures]{@link https://docs.ccxt.com/#/?id=address-structure} indexed by the network
|
|
1668
1652
|
*/
|
|
1669
1653
|
await this.loadMarkets();
|
|
1670
1654
|
const currency = this.currency(code);
|
|
@@ -1724,7 +1708,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
1724
1708
|
* @description fetch the deposit address for a currency associated with this account
|
|
1725
1709
|
* @param {string} code unified currency code
|
|
1726
1710
|
* @param {object} [params] extra parameters specific to the cryptocom api endpoint
|
|
1727
|
-
* @returns {object} an [address structure]{@link https://
|
|
1711
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
1728
1712
|
*/
|
|
1729
1713
|
const network = this.safeStringUpper(params, 'network');
|
|
1730
1714
|
params = this.omit(params, ['network']);
|
|
@@ -1760,7 +1744,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
1760
1744
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
1761
1745
|
* @param {object} [params] extra parameters specific to the cryptocom api endpoint
|
|
1762
1746
|
* @param {int} [params.until] timestamp in ms for the ending date filter, default is the current time
|
|
1763
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
1747
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1764
1748
|
*/
|
|
1765
1749
|
await this.loadMarkets();
|
|
1766
1750
|
let currency = undefined;
|
|
@@ -1819,7 +1803,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
1819
1803
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
1820
1804
|
* @param {object} [params] extra parameters specific to the cryptocom api endpoint
|
|
1821
1805
|
* @param {int} [params.until] timestamp in ms for the ending date filter, default is the current time
|
|
1822
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
1806
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1823
1807
|
*/
|
|
1824
1808
|
await this.loadMarkets();
|
|
1825
1809
|
let currency = undefined;
|
|
@@ -1879,7 +1863,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
1879
1863
|
* @param {string} fromAccount account to transfer from
|
|
1880
1864
|
* @param {string} toAccount account to transfer to
|
|
1881
1865
|
* @param {object} [params] extra parameters specific to the cryptocom api endpoint
|
|
1882
|
-
* @returns {object} a [transfer structure]{@link https://
|
|
1866
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
1883
1867
|
*/
|
|
1884
1868
|
await this.loadMarkets();
|
|
1885
1869
|
const currency = this.currency(code);
|
|
@@ -1917,7 +1901,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
1917
1901
|
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
1918
1902
|
* @param {int} [limit] the maximum number of transfers structures to retrieve
|
|
1919
1903
|
* @param {object} [params] extra parameters specific to the cryptocom api endpoint
|
|
1920
|
-
* @returns {object[]} a list of [transfer structures]{@link https://
|
|
1904
|
+
* @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
1921
1905
|
*/
|
|
1922
1906
|
if (!('direction' in params)) {
|
|
1923
1907
|
throw new errors.ArgumentsRequired(this.id + ' fetchTransfers() requires a direction param to be either "IN" or "OUT"');
|
|
@@ -2415,154 +2399,6 @@ class cryptocom extends cryptocom$1 {
|
|
|
2415
2399
|
'fee': fee,
|
|
2416
2400
|
};
|
|
2417
2401
|
}
|
|
2418
|
-
async repayMargin(code, amount, symbol = undefined, params = {}) {
|
|
2419
|
-
/**
|
|
2420
|
-
* @method
|
|
2421
|
-
* @name cryptocom#repayMargin
|
|
2422
|
-
* @description repay borrowed margin and interest
|
|
2423
|
-
* @see https://exchange-docs.crypto.com/spot/index.html#private-margin-repay
|
|
2424
|
-
* @param {string} code unified currency code of the currency to repay
|
|
2425
|
-
* @param {float} amount the amount to repay
|
|
2426
|
-
* @param {string} symbol unified market symbol, not used by cryptocom.repayMargin ()
|
|
2427
|
-
* @param {object} [params] extra parameters specific to the cryptocom api endpoint
|
|
2428
|
-
* @returns {object} a [margin loan structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#margin-loan-structure}
|
|
2429
|
-
*/
|
|
2430
|
-
await this.loadMarkets();
|
|
2431
|
-
const currency = this.currency(code);
|
|
2432
|
-
const request = {
|
|
2433
|
-
'currency': currency['id'],
|
|
2434
|
-
'amount': this.currencyToPrecision(code, amount),
|
|
2435
|
-
};
|
|
2436
|
-
const response = await this.v2PrivatePostPrivateMarginRepay(this.extend(request, params));
|
|
2437
|
-
//
|
|
2438
|
-
// {
|
|
2439
|
-
// "id": 1656620104211,
|
|
2440
|
-
// "method": "private/margin/repay",
|
|
2441
|
-
// "code": 0,
|
|
2442
|
-
// "result": {
|
|
2443
|
-
// "badDebt": 0
|
|
2444
|
-
// }
|
|
2445
|
-
// }
|
|
2446
|
-
//
|
|
2447
|
-
const transaction = this.parseMarginLoan(response, currency);
|
|
2448
|
-
return this.extend(transaction, {
|
|
2449
|
-
'amount': amount,
|
|
2450
|
-
});
|
|
2451
|
-
}
|
|
2452
|
-
async borrowMargin(code, amount, symbol = undefined, params = {}) {
|
|
2453
|
-
/**
|
|
2454
|
-
* @method
|
|
2455
|
-
* @name cryptocom#borrowMargin
|
|
2456
|
-
* @description create a loan to borrow margin
|
|
2457
|
-
* @see https://exchange-docs.crypto.com/spot/index.html#private-margin-borrow
|
|
2458
|
-
* @param {string} code unified currency code of the currency to borrow
|
|
2459
|
-
* @param {float} amount the amount to borrow
|
|
2460
|
-
* @param {string} symbol unified market symbol, not used by cryptocom.repayMargin ()
|
|
2461
|
-
* @param {object} [params] extra parameters specific to the cryptocom api endpoint
|
|
2462
|
-
* @returns {object} a [margin loan structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#margin-loan-structure}
|
|
2463
|
-
*/
|
|
2464
|
-
await this.loadMarkets();
|
|
2465
|
-
const currency = this.currency(code);
|
|
2466
|
-
const request = {
|
|
2467
|
-
'currency': currency['id'],
|
|
2468
|
-
'amount': this.currencyToPrecision(code, amount),
|
|
2469
|
-
};
|
|
2470
|
-
const response = await this.v2PrivatePostPrivateMarginBorrow(this.extend(request, params));
|
|
2471
|
-
//
|
|
2472
|
-
// {
|
|
2473
|
-
// "id": 1656619578559,
|
|
2474
|
-
// "method": "private/margin/borrow",
|
|
2475
|
-
// "code": 0
|
|
2476
|
-
// }
|
|
2477
|
-
//
|
|
2478
|
-
const transaction = this.parseMarginLoan(response, currency);
|
|
2479
|
-
return this.extend(transaction, {
|
|
2480
|
-
'amount': amount,
|
|
2481
|
-
});
|
|
2482
|
-
}
|
|
2483
|
-
parseMarginLoan(info, currency = undefined) {
|
|
2484
|
-
//
|
|
2485
|
-
// borrowMargin
|
|
2486
|
-
//
|
|
2487
|
-
// {
|
|
2488
|
-
// "id": 1656619578559,
|
|
2489
|
-
// "method": "private/margin/borrow",
|
|
2490
|
-
// "code": 0
|
|
2491
|
-
// }
|
|
2492
|
-
//
|
|
2493
|
-
// repayMargin
|
|
2494
|
-
//
|
|
2495
|
-
// {
|
|
2496
|
-
// "id": 1656620104211,
|
|
2497
|
-
// "method": "private/margin/repay",
|
|
2498
|
-
// "code": 0,
|
|
2499
|
-
// "result": {
|
|
2500
|
-
// "badDebt": 0
|
|
2501
|
-
// }
|
|
2502
|
-
// }
|
|
2503
|
-
//
|
|
2504
|
-
return {
|
|
2505
|
-
'id': this.safeInteger(info, 'id'),
|
|
2506
|
-
'currency': this.safeCurrencyCode(undefined, currency),
|
|
2507
|
-
'amount': undefined,
|
|
2508
|
-
'symbol': undefined,
|
|
2509
|
-
'timestamp': undefined,
|
|
2510
|
-
'datetime': undefined,
|
|
2511
|
-
'info': info,
|
|
2512
|
-
};
|
|
2513
|
-
}
|
|
2514
|
-
parseBorrowInterest(info, market = undefined) {
|
|
2515
|
-
//
|
|
2516
|
-
// {
|
|
2517
|
-
// "loan_id": "2643528867803765921",
|
|
2518
|
-
// "currency": "USDT",
|
|
2519
|
-
// "interest": 0.00000004,
|
|
2520
|
-
// "time": 1656702899559,
|
|
2521
|
-
// "stake_amount": 6,
|
|
2522
|
-
// "interest_rate": 0.000025
|
|
2523
|
-
// },
|
|
2524
|
-
//
|
|
2525
|
-
const timestamp = this.safeInteger(info, 'time');
|
|
2526
|
-
let symbol = undefined;
|
|
2527
|
-
if (market !== undefined) {
|
|
2528
|
-
symbol = market['symbol'];
|
|
2529
|
-
}
|
|
2530
|
-
return {
|
|
2531
|
-
'symbol': symbol,
|
|
2532
|
-
'marginMode': undefined,
|
|
2533
|
-
'currency': this.safeCurrencyCode(this.safeString(info, 'currency')),
|
|
2534
|
-
'interest': this.safeNumber(info, 'interest'),
|
|
2535
|
-
'interestRate': this.safeNumber(info, 'interest_rate'),
|
|
2536
|
-
'amountBorrowed': undefined,
|
|
2537
|
-
'timestamp': timestamp,
|
|
2538
|
-
'datetime': this.iso8601(timestamp),
|
|
2539
|
-
'info': info,
|
|
2540
|
-
};
|
|
2541
|
-
}
|
|
2542
|
-
parseBorrowRates(info, codeKey) {
|
|
2543
|
-
//
|
|
2544
|
-
// {
|
|
2545
|
-
// "currency": "AGLD",
|
|
2546
|
-
// "hourly_rate": 0.00003334,
|
|
2547
|
-
// "max_borrow_limit": 342.4032393,
|
|
2548
|
-
// "min_borrow_limit": 30
|
|
2549
|
-
// },
|
|
2550
|
-
//
|
|
2551
|
-
const timestamp = this.milliseconds();
|
|
2552
|
-
const rates = [];
|
|
2553
|
-
for (let i = 0; i < info.length; i++) {
|
|
2554
|
-
const entry = info[i];
|
|
2555
|
-
rates.push({
|
|
2556
|
-
'currency': this.safeCurrencyCode(this.safeString(entry, 'currency')),
|
|
2557
|
-
'rate': this.safeNumber(entry, 'hourly_rate'),
|
|
2558
|
-
'period': 3600000,
|
|
2559
|
-
'timestamp': timestamp,
|
|
2560
|
-
'datetime': this.iso8601(timestamp),
|
|
2561
|
-
'info': entry,
|
|
2562
|
-
});
|
|
2563
|
-
}
|
|
2564
|
-
return rates;
|
|
2565
|
-
}
|
|
2566
2402
|
customHandleMarginModeAndParams(methodName, params = {}) {
|
|
2567
2403
|
/**
|
|
2568
2404
|
* @ignore
|
|
@@ -2645,7 +2481,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
2645
2481
|
* @see https://exchange-docs.crypto.com/spot/index.html#private-get-currency-networks
|
|
2646
2482
|
* @param {string[]|undefined} codes list of unified currency codes
|
|
2647
2483
|
* @param {object} [params] extra parameters specific to the cryptocom api endpoint
|
|
2648
|
-
* @returns {object} a list of [fee structures]{@link https://
|
|
2484
|
+
* @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
2649
2485
|
*/
|
|
2650
2486
|
await this.loadMarkets();
|
|
2651
2487
|
const response = await this.v2PrivatePostPrivateGetCurrencyNetworks(params);
|
|
@@ -2664,7 +2500,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
2664
2500
|
* @param {int} [limit] max number of ledger entries to return
|
|
2665
2501
|
* @param {object} [params] extra parameters specific to the cryptocom api endpoint
|
|
2666
2502
|
* @param {int} [params.until] timestamp in ms for the ending date filter, default is the current time
|
|
2667
|
-
* @returns {object} a [ledger structure]{@link https://
|
|
2503
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
2668
2504
|
*/
|
|
2669
2505
|
await this.loadMarkets();
|
|
2670
2506
|
const request = {};
|
|
@@ -2803,7 +2639,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
2803
2639
|
* @description fetch all the accounts associated with a profile
|
|
2804
2640
|
* @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-accounts
|
|
2805
2641
|
* @param {object} [params] extra parameters specific to the cryptocom api endpoint
|
|
2806
|
-
* @returns {object} a dictionary of [account structures]{@link https://
|
|
2642
|
+
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
|
|
2807
2643
|
*/
|
|
2808
2644
|
await this.loadMarkets();
|
|
2809
2645
|
const response = await this.v1PrivatePostPrivateGetAccounts(params);
|
|
@@ -2888,7 +2724,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
2888
2724
|
* @param {int} [limit] number of records
|
|
2889
2725
|
* @param {object} [params] exchange specific params
|
|
2890
2726
|
* @param {int} [params.type] 'future', 'option'
|
|
2891
|
-
* @returns {object[]} a list of [settlement history objects]{@link https://
|
|
2727
|
+
* @returns {object[]} a list of [settlement history objects]{@link https://docs.ccxt.com/#/?id=settlement-history-structure}
|
|
2892
2728
|
*/
|
|
2893
2729
|
await this.loadMarkets();
|
|
2894
2730
|
let market = undefined;
|
|
@@ -2976,9 +2812,11 @@ class cryptocom extends cryptocom$1 {
|
|
|
2976
2812
|
* @param {object} [params] extra parameters specific to the cryptocom api endpoint
|
|
2977
2813
|
* @param {int} [params.until] timestamp in ms for the ending date filter, default is the current time
|
|
2978
2814
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
2979
|
-
* @returns {object[]} a list of [funding rate structures]{@link https://
|
|
2815
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
2980
2816
|
*/
|
|
2981
|
-
|
|
2817
|
+
if (symbol === undefined) {
|
|
2818
|
+
throw new errors.ArgumentsRequired(this.id + ' fetchFundingRateHistory() requires a symbol argument');
|
|
2819
|
+
}
|
|
2982
2820
|
await this.loadMarkets();
|
|
2983
2821
|
let paginate = false;
|
|
2984
2822
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchFundingRateHistory', 'paginate');
|
|
@@ -3047,7 +2885,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
3047
2885
|
* @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-positions
|
|
3048
2886
|
* @param {string} symbol unified market symbol of the market the position is held in
|
|
3049
2887
|
* @param {object} [params] extra parameters specific to the cryptocom api endpoint
|
|
3050
|
-
* @returns {object} a [position structure]{@link https://
|
|
2888
|
+
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
3051
2889
|
*/
|
|
3052
2890
|
await this.loadMarkets();
|
|
3053
2891
|
const market = this.market(symbol);
|
|
@@ -3089,7 +2927,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
3089
2927
|
* @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-positions
|
|
3090
2928
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
3091
2929
|
* @param {object} [params] extra parameters specific to the cryptocom api endpoint
|
|
3092
|
-
* @returns {object[]} a list of [position structure]{@link https://
|
|
2930
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
3093
2931
|
*/
|
|
3094
2932
|
await this.loadMarkets();
|
|
3095
2933
|
symbols = this.marketSymbols(symbols);
|