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
package/dist/cjs/ccxt.js
CHANGED
|
@@ -180,7 +180,7 @@ var woo$1 = require('./src/pro/woo.js');
|
|
|
180
180
|
|
|
181
181
|
//-----------------------------------------------------------------------------
|
|
182
182
|
// this is updated by vss.js when building
|
|
183
|
-
const version = '4.1.
|
|
183
|
+
const version = '4.1.58';
|
|
184
184
|
Exchange["default"].ccxtVersion = version;
|
|
185
185
|
const exchanges = {
|
|
186
186
|
'ace': ace,
|
package/dist/cjs/src/ace.js
CHANGED
|
@@ -34,11 +34,11 @@ class ace extends ace$1 {
|
|
|
34
34
|
'createOrder': true,
|
|
35
35
|
'editOrder': false,
|
|
36
36
|
'fetchBalance': true,
|
|
37
|
-
'fetchBorrowRate': false,
|
|
38
37
|
'fetchBorrowRateHistories': false,
|
|
39
38
|
'fetchBorrowRateHistory': false,
|
|
40
|
-
'fetchBorrowRates': false,
|
|
41
39
|
'fetchClosedOrders': false,
|
|
40
|
+
'fetchCrossBorrowRate': false,
|
|
41
|
+
'fetchCrossBorrowRates': false,
|
|
42
42
|
'fetchCurrencies': false,
|
|
43
43
|
'fetchDepositAddress': false,
|
|
44
44
|
'fetchDeposits': false,
|
|
@@ -47,6 +47,8 @@ class ace extends ace$1 {
|
|
|
47
47
|
'fetchFundingRateHistory': false,
|
|
48
48
|
'fetchFundingRates': false,
|
|
49
49
|
'fetchIndexOHLCV': false,
|
|
50
|
+
'fetchIsolatedBorrowRate': false,
|
|
51
|
+
'fetchIsolatedBorrowRates': false,
|
|
50
52
|
'fetchMarginMode': false,
|
|
51
53
|
'fetchMarkets': true,
|
|
52
54
|
'fetchMarkOHLCV': false,
|
|
@@ -286,7 +288,7 @@ class ace extends ace$1 {
|
|
|
286
288
|
* @see https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#oapi-api---trade-data
|
|
287
289
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
288
290
|
* @param {object} [params] extra parameters specific to the ace api endpoint
|
|
289
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
291
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
290
292
|
*/
|
|
291
293
|
await this.loadMarkets();
|
|
292
294
|
const market = this.market(symbol);
|
|
@@ -312,7 +314,7 @@ class ace extends ace$1 {
|
|
|
312
314
|
* @see https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#oapi-api---trade-data
|
|
313
315
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
314
316
|
* @param {object} [params] extra parameters specific to the ace api endpoint
|
|
315
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
317
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
316
318
|
*/
|
|
317
319
|
await this.loadMarkets();
|
|
318
320
|
const response = await this.publicGetOapiV2ListTradePrice();
|
|
@@ -345,7 +347,7 @@ class ace extends ace$1 {
|
|
|
345
347
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
346
348
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
347
349
|
* @param {object} [params] extra parameters specific to the ace api endpoint
|
|
348
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
350
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
349
351
|
*/
|
|
350
352
|
await this.loadMarkets();
|
|
351
353
|
const market = this.market(symbol);
|
|
@@ -591,7 +593,7 @@ class ace extends ace$1 {
|
|
|
591
593
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
592
594
|
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
593
595
|
* @param {object} [params] extra parameters specific to the ace api endpoint
|
|
594
|
-
* @returns {object} an [order structure]{@link https://
|
|
596
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
595
597
|
*/
|
|
596
598
|
await this.loadMarkets();
|
|
597
599
|
const market = this.market(symbol);
|
|
@@ -628,7 +630,7 @@ class ace extends ace$1 {
|
|
|
628
630
|
* @param {string} id order id
|
|
629
631
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
630
632
|
* @param {object} [params] extra parameters specific to the ace api endpoint
|
|
631
|
-
* @returns {object} An [order structure]{@link https://
|
|
633
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
632
634
|
*/
|
|
633
635
|
await this.loadMarkets();
|
|
634
636
|
const request = {
|
|
@@ -653,7 +655,7 @@ class ace extends ace$1 {
|
|
|
653
655
|
* @see https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---order-status
|
|
654
656
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
655
657
|
* @param {object} [params] extra parameters specific to the ace api endpoint
|
|
656
|
-
* @returns {object} An [order structure]{@link https://
|
|
658
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
657
659
|
*/
|
|
658
660
|
await this.loadMarkets();
|
|
659
661
|
const request = {
|
|
@@ -695,9 +697,11 @@ class ace extends ace$1 {
|
|
|
695
697
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
696
698
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
697
699
|
* @param {object} [params] extra parameters specific to the ace api endpoint
|
|
698
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
700
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
699
701
|
*/
|
|
700
|
-
|
|
702
|
+
if (symbol === undefined) {
|
|
703
|
+
throw new errors.ArgumentsRequired(this.id + ' fetchOpenOrders() requires a symbol argument');
|
|
704
|
+
}
|
|
701
705
|
await this.loadMarkets();
|
|
702
706
|
const market = this.market(symbol);
|
|
703
707
|
const request = {
|
|
@@ -831,7 +835,7 @@ class ace extends ace$1 {
|
|
|
831
835
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
832
836
|
* @param {int} [limit] the maximum number of trades to retrieve
|
|
833
837
|
* @param {object} [params] extra parameters specific to the ace api endpoint
|
|
834
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
838
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
835
839
|
*/
|
|
836
840
|
await this.loadMarkets();
|
|
837
841
|
const market = this.safeMarket(symbol);
|
|
@@ -886,7 +890,7 @@ class ace extends ace$1 {
|
|
|
886
890
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
887
891
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
888
892
|
* @param {object} [params] extra parameters specific to the ace api endpoint
|
|
889
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
893
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
890
894
|
*/
|
|
891
895
|
await this.loadMarkets();
|
|
892
896
|
const market = this.safeMarket(symbol);
|
|
@@ -971,7 +975,7 @@ class ace extends ace$1 {
|
|
|
971
975
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
972
976
|
* @see https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---account-balance
|
|
973
977
|
* @param {object} [params] extra parameters specific to the ace api endpoint
|
|
974
|
-
* @returns {object} a [balance structure]{@link https://
|
|
978
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
975
979
|
*/
|
|
976
980
|
await this.loadMarkets();
|
|
977
981
|
const response = await this.privatePostV2CoinCustomerAccount(params);
|
package/dist/cjs/src/alpaca.js
CHANGED
|
@@ -319,7 +319,7 @@ class alpaca extends alpaca$1 {
|
|
|
319
319
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
320
320
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
321
321
|
* @param {object} [params] extra parameters specific to the alpaca api endpoint
|
|
322
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
322
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
323
323
|
*/
|
|
324
324
|
await this.loadMarkets();
|
|
325
325
|
const market = this.market(symbol);
|
|
@@ -363,7 +363,7 @@ class alpaca extends alpaca$1 {
|
|
|
363
363
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
364
364
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
365
365
|
* @param {object} [params] extra parameters specific to the alpaca api endpoint
|
|
366
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
366
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
367
367
|
*/
|
|
368
368
|
await this.loadMarkets();
|
|
369
369
|
const market = this.market(symbol);
|
|
@@ -509,7 +509,7 @@ class alpaca extends alpaca$1 {
|
|
|
509
509
|
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
510
510
|
* @param {object} [params] extra parameters specific to the alpaca api endpoint
|
|
511
511
|
* @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
|
|
512
|
-
* @returns {object} an [order structure]{@link https://
|
|
512
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
513
513
|
*/
|
|
514
514
|
await this.loadMarkets();
|
|
515
515
|
const market = this.market(symbol);
|
|
@@ -593,7 +593,7 @@ class alpaca extends alpaca$1 {
|
|
|
593
593
|
* @param {string} id order id
|
|
594
594
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
595
595
|
* @param {object} [params] extra parameters specific to the alpaca api endpoint
|
|
596
|
-
* @returns {object} An [order structure]{@link https://
|
|
596
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
597
597
|
*/
|
|
598
598
|
const request = {
|
|
599
599
|
'order_id': id,
|
|
@@ -614,7 +614,7 @@ class alpaca extends alpaca$1 {
|
|
|
614
614
|
* @description fetches information on an order made by the user
|
|
615
615
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
616
616
|
* @param {object} [params] extra parameters specific to the alpaca api endpoint
|
|
617
|
-
* @returns {object} An [order structure]{@link https://
|
|
617
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
618
618
|
*/
|
|
619
619
|
await this.loadMarkets();
|
|
620
620
|
const request = {
|
|
@@ -634,7 +634,7 @@ class alpaca extends alpaca$1 {
|
|
|
634
634
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
635
635
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
636
636
|
* @param {object} [params] extra parameters specific to the alpaca api endpoint
|
|
637
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
637
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
638
638
|
*/
|
|
639
639
|
await this.loadMarkets();
|
|
640
640
|
let market = undefined;
|
package/dist/cjs/src/ascendex.js
CHANGED
|
@@ -703,7 +703,7 @@ class ascendex extends ascendex$1 {
|
|
|
703
703
|
* @name ascendex#fetchAccounts
|
|
704
704
|
* @description fetch all the accounts associated with a profile
|
|
705
705
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
706
|
-
* @returns {object} a dictionary of [account structures]{@link https://
|
|
706
|
+
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
|
|
707
707
|
*/
|
|
708
708
|
let accountGroup = this.safeString(this.options, 'account-group');
|
|
709
709
|
let response = undefined;
|
|
@@ -801,7 +801,7 @@ class ascendex extends ascendex$1 {
|
|
|
801
801
|
* @name ascendex#fetchBalance
|
|
802
802
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
803
803
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
804
|
-
* @returns {object} a [balance structure]{@link https://
|
|
804
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
805
805
|
*/
|
|
806
806
|
await this.loadMarkets();
|
|
807
807
|
await this.loadAccounts();
|
|
@@ -890,7 +890,7 @@ class ascendex extends ascendex$1 {
|
|
|
890
890
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
891
891
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
892
892
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
893
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
893
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
894
894
|
*/
|
|
895
895
|
await this.loadMarkets();
|
|
896
896
|
const market = this.market(symbol);
|
|
@@ -981,7 +981,7 @@ class ascendex extends ascendex$1 {
|
|
|
981
981
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
982
982
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
983
983
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
984
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
984
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
985
985
|
*/
|
|
986
986
|
await this.loadMarkets();
|
|
987
987
|
const market = this.market(symbol);
|
|
@@ -1017,7 +1017,7 @@ class ascendex extends ascendex$1 {
|
|
|
1017
1017
|
* @see https://ascendex.github.io/ascendex-futures-pro-api-v2/#ticker
|
|
1018
1018
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1019
1019
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
1020
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
1020
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1021
1021
|
*/
|
|
1022
1022
|
await this.loadMarkets();
|
|
1023
1023
|
const request = {};
|
|
@@ -1191,7 +1191,7 @@ class ascendex extends ascendex$1 {
|
|
|
1191
1191
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1192
1192
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
1193
1193
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
1194
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
1194
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
1195
1195
|
*/
|
|
1196
1196
|
await this.loadMarkets();
|
|
1197
1197
|
const market = this.market(symbol);
|
|
@@ -1418,7 +1418,7 @@ class ascendex extends ascendex$1 {
|
|
|
1418
1418
|
* @name ascendex#fetchTradingFees
|
|
1419
1419
|
* @description fetch the trading fees for multiple markets
|
|
1420
1420
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
1421
|
-
* @returns {object} a dictionary of [fee structures]{@link https://
|
|
1421
|
+
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
1422
1422
|
*/
|
|
1423
1423
|
await this.loadMarkets();
|
|
1424
1424
|
await this.loadAccounts();
|
|
@@ -1569,7 +1569,7 @@ class ascendex extends ascendex$1 {
|
|
|
1569
1569
|
* @param {float} [params.takeProfit.triggerPrice] *swap only* take profit trigger price
|
|
1570
1570
|
* @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice that the attached stop loss order will be triggered (perpetual swap markets only)
|
|
1571
1571
|
* @param {float} [params.stopLoss.triggerPrice] *swap only* stop loss trigger price
|
|
1572
|
-
* @returns [An order structure]{@link https://
|
|
1572
|
+
* @returns [An order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1573
1573
|
*/
|
|
1574
1574
|
await this.loadMarkets();
|
|
1575
1575
|
await this.loadAccounts();
|
|
@@ -1661,7 +1661,7 @@ class ascendex extends ascendex$1 {
|
|
|
1661
1661
|
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
|
|
1662
1662
|
* @param {bool} [params.postOnly] true or false
|
|
1663
1663
|
* @param {float} [params.stopPrice] the price at which a trigger order is triggered at
|
|
1664
|
-
* @returns {object} an [order structure]{@link https://
|
|
1664
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1665
1665
|
*/
|
|
1666
1666
|
await this.loadMarkets();
|
|
1667
1667
|
await this.loadAccounts();
|
|
@@ -1755,7 +1755,7 @@ class ascendex extends ascendex$1 {
|
|
|
1755
1755
|
* @description fetches information on an order made by the user
|
|
1756
1756
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1757
1757
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
1758
|
-
* @returns {object} An [order structure]{@link https://
|
|
1758
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1759
1759
|
*/
|
|
1760
1760
|
await this.loadMarkets();
|
|
1761
1761
|
await this.loadAccounts();
|
|
@@ -1868,7 +1868,7 @@ class ascendex extends ascendex$1 {
|
|
|
1868
1868
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1869
1869
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1870
1870
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
1871
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1871
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1872
1872
|
*/
|
|
1873
1873
|
await this.loadMarkets();
|
|
1874
1874
|
await this.loadAccounts();
|
|
@@ -1992,7 +1992,7 @@ class ascendex extends ascendex$1 {
|
|
|
1992
1992
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
1993
1993
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
1994
1994
|
* @param {int} [params.until] the latest time in ms to fetch orders for
|
|
1995
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1995
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1996
1996
|
*/
|
|
1997
1997
|
await this.loadMarkets();
|
|
1998
1998
|
await this.loadAccounts();
|
|
@@ -2151,9 +2151,11 @@ class ascendex extends ascendex$1 {
|
|
|
2151
2151
|
* @param {string} id order id
|
|
2152
2152
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
2153
2153
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
2154
|
-
* @returns {object} An [order structure]{@link https://
|
|
2154
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2155
2155
|
*/
|
|
2156
|
-
|
|
2156
|
+
if (symbol === undefined) {
|
|
2157
|
+
throw new errors.ArgumentsRequired(this.id + ' cancelOrder() requires a symbol argument');
|
|
2158
|
+
}
|
|
2157
2159
|
await this.loadMarkets();
|
|
2158
2160
|
await this.loadAccounts();
|
|
2159
2161
|
const market = this.market(symbol);
|
|
@@ -2267,7 +2269,7 @@ class ascendex extends ascendex$1 {
|
|
|
2267
2269
|
* @description cancel all open orders
|
|
2268
2270
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
2269
2271
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
2270
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
2272
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2271
2273
|
*/
|
|
2272
2274
|
await this.loadMarkets();
|
|
2273
2275
|
await this.loadAccounts();
|
|
@@ -2393,7 +2395,7 @@ class ascendex extends ascendex$1 {
|
|
|
2393
2395
|
* @description fetch the deposit address for a currency associated with this account
|
|
2394
2396
|
* @param {string} code unified currency code
|
|
2395
2397
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
2396
|
-
* @returns {object} an [address structure]{@link https://
|
|
2398
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
2397
2399
|
*/
|
|
2398
2400
|
await this.loadMarkets();
|
|
2399
2401
|
const currency = this.currency(code);
|
|
@@ -2467,7 +2469,7 @@ class ascendex extends ascendex$1 {
|
|
|
2467
2469
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
2468
2470
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
2469
2471
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
2470
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
2472
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2471
2473
|
*/
|
|
2472
2474
|
const request = {
|
|
2473
2475
|
'txType': 'deposit',
|
|
@@ -2483,7 +2485,7 @@ class ascendex extends ascendex$1 {
|
|
|
2483
2485
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
2484
2486
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
2485
2487
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
2486
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
2488
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2487
2489
|
*/
|
|
2488
2490
|
const request = {
|
|
2489
2491
|
'txType': 'withdrawal',
|
|
@@ -2499,7 +2501,7 @@ class ascendex extends ascendex$1 {
|
|
|
2499
2501
|
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
2500
2502
|
* @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
|
|
2501
2503
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
2502
|
-
* @returns {object} a list of [transaction structure]{@link https://
|
|
2504
|
+
* @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2503
2505
|
*/
|
|
2504
2506
|
await this.loadMarkets();
|
|
2505
2507
|
const request = {
|
|
@@ -2622,7 +2624,7 @@ class ascendex extends ascendex$1 {
|
|
|
2622
2624
|
* @description fetch all open positions
|
|
2623
2625
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
2624
2626
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
2625
|
-
* @returns {object[]} a list of [position structure]{@link https://
|
|
2627
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
2626
2628
|
*/
|
|
2627
2629
|
await this.loadMarkets();
|
|
2628
2630
|
await this.loadAccounts();
|
|
@@ -2788,7 +2790,7 @@ class ascendex extends ascendex$1 {
|
|
|
2788
2790
|
* @description fetch the funding rate for multiple markets
|
|
2789
2791
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
2790
2792
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
2791
|
-
* @returns {object} a dictionary of [funding rates structures]{@link https://
|
|
2793
|
+
* @returns {object} a dictionary of [funding rates structures]{@link https://docs.ccxt.com/#/?id=funding-rates-structure}, indexe by market symbols
|
|
2792
2794
|
*/
|
|
2793
2795
|
await this.loadMarkets();
|
|
2794
2796
|
symbols = this.marketSymbols(symbols);
|
|
@@ -2870,7 +2872,7 @@ class ascendex extends ascendex$1 {
|
|
|
2870
2872
|
* @param {string} symbol unified market symbol
|
|
2871
2873
|
* @param {float} amount the amount of margin to remove
|
|
2872
2874
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
2873
|
-
* @returns {object} a [margin structure]{@link https://
|
|
2875
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
|
|
2874
2876
|
*/
|
|
2875
2877
|
return await this.modifyMarginHelper(symbol, -amount, 'reduce', params);
|
|
2876
2878
|
}
|
|
@@ -2882,7 +2884,7 @@ class ascendex extends ascendex$1 {
|
|
|
2882
2884
|
* @param {string} symbol unified market symbol
|
|
2883
2885
|
* @param {float} amount amount of margin to add
|
|
2884
2886
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
2885
|
-
* @returns {object} a [margin structure]{@link https://
|
|
2887
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
|
|
2886
2888
|
*/
|
|
2887
2889
|
return await this.modifyMarginHelper(symbol, amount, 'add', params);
|
|
2888
2890
|
}
|
|
@@ -2897,7 +2899,9 @@ class ascendex extends ascendex$1 {
|
|
|
2897
2899
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
2898
2900
|
* @returns {object} response from the exchange
|
|
2899
2901
|
*/
|
|
2900
|
-
|
|
2902
|
+
if (symbol === undefined) {
|
|
2903
|
+
throw new errors.ArgumentsRequired(this.id + ' setLeverage() requires a symbol argument');
|
|
2904
|
+
}
|
|
2901
2905
|
if ((leverage < 1) || (leverage > 100)) {
|
|
2902
2906
|
throw new errors.BadRequest(this.id + ' leverage should be between 1 and 100');
|
|
2903
2907
|
}
|
|
@@ -2927,7 +2931,9 @@ class ascendex extends ascendex$1 {
|
|
|
2927
2931
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
2928
2932
|
* @returns {object} response from the exchange
|
|
2929
2933
|
*/
|
|
2930
|
-
|
|
2934
|
+
if (symbol === undefined) {
|
|
2935
|
+
throw new errors.ArgumentsRequired(this.id + ' setMarginMode() requires a symbol argument');
|
|
2936
|
+
}
|
|
2931
2937
|
marginMode = marginMode.toLowerCase();
|
|
2932
2938
|
if (marginMode === 'cross') {
|
|
2933
2939
|
marginMode = 'crossed';
|
|
@@ -2957,7 +2963,7 @@ class ascendex extends ascendex$1 {
|
|
|
2957
2963
|
* @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
|
|
2958
2964
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
2959
2965
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
2960
|
-
* @returns {object} a dictionary of [leverage tiers structures]{@link https://
|
|
2966
|
+
* @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}, indexed by market symbols
|
|
2961
2967
|
*/
|
|
2962
2968
|
await this.loadMarkets();
|
|
2963
2969
|
const response = await this.v2PublicGetFuturesContract(params);
|
|
@@ -3098,7 +3104,7 @@ class ascendex extends ascendex$1 {
|
|
|
3098
3104
|
* @see https://ascendex.github.io/ascendex-pro-api/#list-all-assets
|
|
3099
3105
|
* @param {string[]|undefined} codes list of unified currency codes
|
|
3100
3106
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
3101
|
-
* @returns {object} a list of [fee structures]{@link https://
|
|
3107
|
+
* @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
3102
3108
|
*/
|
|
3103
3109
|
await this.loadMarkets();
|
|
3104
3110
|
const response = await this.v2PublicGetAssets(params);
|
|
@@ -3115,7 +3121,7 @@ class ascendex extends ascendex$1 {
|
|
|
3115
3121
|
* @param {string} fromAccount account to transfer from
|
|
3116
3122
|
* @param {string} toAccount account to transfer to
|
|
3117
3123
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
3118
|
-
* @returns {object} a [transfer structure]{@link https://
|
|
3124
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
3119
3125
|
*/
|
|
3120
3126
|
await this.loadMarkets();
|
|
3121
3127
|
await this.loadAccounts();
|
|
@@ -3187,7 +3193,7 @@ class ascendex extends ascendex$1 {
|
|
|
3187
3193
|
* @param {int} [limit] the maximum number of funding history structures to retrieve
|
|
3188
3194
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
3189
3195
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
3190
|
-
* @returns {object} a [funding history structure]{@link https://
|
|
3196
|
+
* @returns {object} a [funding history structure]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
|
|
3191
3197
|
*/
|
|
3192
3198
|
await this.loadMarkets();
|
|
3193
3199
|
await this.loadAccounts();
|
|
@@ -370,13 +370,12 @@ class Exchange {
|
|
|
370
370
|
'fetchBalance': true,
|
|
371
371
|
'fetchBidsAsks': undefined,
|
|
372
372
|
'fetchBorrowInterest': undefined,
|
|
373
|
-
'fetchBorrowRate': undefined,
|
|
374
373
|
'fetchBorrowRateHistory': undefined,
|
|
375
|
-
'fetchBorrowRatesPerSymbol': undefined,
|
|
376
|
-
'fetchBorrowRates': undefined,
|
|
377
374
|
'fetchCanceledOrders': undefined,
|
|
378
375
|
'fetchClosedOrder': undefined,
|
|
379
376
|
'fetchClosedOrders': undefined,
|
|
377
|
+
'fetchCrossBorrowRate': undefined,
|
|
378
|
+
'fetchCrossBorrowRates': undefined,
|
|
380
379
|
'fetchCurrencies': 'emulated',
|
|
381
380
|
'fetchDeposit': undefined,
|
|
382
381
|
'fetchDepositAddress': undefined,
|
|
@@ -391,6 +390,8 @@ class Exchange {
|
|
|
391
390
|
'fetchFundingRateHistory': undefined,
|
|
392
391
|
'fetchFundingRates': undefined,
|
|
393
392
|
'fetchIndexOHLCV': undefined,
|
|
393
|
+
'fetchIsolatedBorrowRate': undefined,
|
|
394
|
+
'fetchIsolatedBorrowRates': undefined,
|
|
394
395
|
'fetchL2OrderBook': true,
|
|
395
396
|
'fetchLastPrices': undefined,
|
|
396
397
|
'fetchLedger': undefined,
|
|
@@ -1410,8 +1411,11 @@ class Exchange {
|
|
|
1410
1411
|
parseOrder(order, market = undefined) {
|
|
1411
1412
|
throw new errors.NotSupported(this.id + ' parseOrder() is not supported yet');
|
|
1412
1413
|
}
|
|
1413
|
-
async
|
|
1414
|
-
throw new errors.NotSupported(this.id + '
|
|
1414
|
+
async fetchCrossBorrowRates(params = {}) {
|
|
1415
|
+
throw new errors.NotSupported(this.id + ' fetchCrossBorrowRates() is not supported yet');
|
|
1416
|
+
}
|
|
1417
|
+
async fetchIsolatedBorrowRates(params = {}) {
|
|
1418
|
+
throw new errors.NotSupported(this.id + ' fetchIsolatedBorrowRates() is not supported yet');
|
|
1415
1419
|
}
|
|
1416
1420
|
parseMarketLeverageTiers(info, market = undefined) {
|
|
1417
1421
|
throw new errors.NotSupported(this.id + ' parseMarketLeverageTiers() is not supported yet');
|
|
@@ -1465,14 +1469,20 @@ class Exchange {
|
|
|
1465
1469
|
parseToNumeric(number) {
|
|
1466
1470
|
const stringVersion = this.numberToString(number); // this will convert 1.0 and 1 to "1" and 1.1 to "1.1"
|
|
1467
1471
|
// keep this in mind:
|
|
1468
|
-
// in JS: 1 == 1.0 is true
|
|
1472
|
+
// in JS: 1 == 1.0 is true; 1 === 1.0 is true
|
|
1469
1473
|
// in Python: 1 == 1.0 is true
|
|
1470
|
-
// in PHP 1 == 1.0 is false
|
|
1471
|
-
if (stringVersion.indexOf('.')
|
|
1474
|
+
// in PHP 1 == 1.0 is true, but 1 === 1.0 is false
|
|
1475
|
+
if (stringVersion.indexOf('.') >= 0) {
|
|
1472
1476
|
return parseFloat(stringVersion);
|
|
1473
1477
|
}
|
|
1474
1478
|
return parseInt(stringVersion);
|
|
1475
1479
|
}
|
|
1480
|
+
isRoundNumber(value) {
|
|
1481
|
+
// this method is similar to isInteger, but this is more loyal and does not check for types.
|
|
1482
|
+
// i.e. isRoundNumber(1.000) returns true, while isInteger(1.000) returns false
|
|
1483
|
+
const res = this.parseToNumeric((value % 1));
|
|
1484
|
+
return res === 0;
|
|
1485
|
+
}
|
|
1476
1486
|
afterConstruct() {
|
|
1477
1487
|
this.createNetworksByIdObject();
|
|
1478
1488
|
}
|
|
@@ -2998,7 +3008,7 @@ class Exchange {
|
|
|
2998
3008
|
* @description specifically fetches positions for specific symbol, unlike fetchPositions (which can work with multiple symbols, but because of that, it might be slower & more rate-limit consuming)
|
|
2999
3009
|
* @param {string} symbol unified market symbol of the market the position is held in
|
|
3000
3010
|
* @param {object} params extra parameters specific to the endpoint
|
|
3001
|
-
* @returns {object[]} a list of [position structure]{@link https://
|
|
3011
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure} with maximum 3 items - one position for "one-way" mode, and two positions (long & short) for "two-way" (a.k.a. hedge) mode
|
|
3002
3012
|
*/
|
|
3003
3013
|
throw new errors.NotSupported(this.id + ' fetchPositionsBySymbol() is not supported yet');
|
|
3004
3014
|
}
|
|
@@ -3175,15 +3185,27 @@ class Exchange {
|
|
|
3175
3185
|
throw new errors.NotSupported(this.id + ' ' + key + ' does not have a value in mapping');
|
|
3176
3186
|
}
|
|
3177
3187
|
}
|
|
3178
|
-
async
|
|
3188
|
+
async fetchCrossBorrowRate(code, params = {}) {
|
|
3179
3189
|
await this.loadMarkets();
|
|
3180
3190
|
if (!this.has['fetchBorrowRates']) {
|
|
3181
|
-
throw new errors.NotSupported(this.id + '
|
|
3191
|
+
throw new errors.NotSupported(this.id + ' fetchCrossBorrowRate() is not supported yet');
|
|
3182
3192
|
}
|
|
3183
|
-
const borrowRates = await this.
|
|
3193
|
+
const borrowRates = await this.fetchCrossBorrowRates(params);
|
|
3184
3194
|
const rate = this.safeValue(borrowRates, code);
|
|
3185
3195
|
if (rate === undefined) {
|
|
3186
|
-
throw new errors.ExchangeError(this.id + '
|
|
3196
|
+
throw new errors.ExchangeError(this.id + ' fetchCrossBorrowRate() could not find the borrow rate for currency code ' + code);
|
|
3197
|
+
}
|
|
3198
|
+
return rate;
|
|
3199
|
+
}
|
|
3200
|
+
async fetchIsolatedBorrowRate(symbol, params = {}) {
|
|
3201
|
+
await this.loadMarkets();
|
|
3202
|
+
if (!this.has['fetchBorrowRates']) {
|
|
3203
|
+
throw new errors.NotSupported(this.id + ' fetchIsolatedBorrowRate() is not supported yet');
|
|
3204
|
+
}
|
|
3205
|
+
const borrowRates = await this.fetchIsolatedBorrowRates(params);
|
|
3206
|
+
const rate = this.safeValue(borrowRates, symbol);
|
|
3207
|
+
if (rate === undefined) {
|
|
3208
|
+
throw new errors.ExchangeError(this.id + ' fetchIsolatedBorrowRate() could not find the borrow rate for market symbol ' + symbol);
|
|
3187
3209
|
}
|
|
3188
3210
|
return rate;
|
|
3189
3211
|
}
|
|
@@ -3421,7 +3443,7 @@ class Exchange {
|
|
|
3421
3443
|
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
3422
3444
|
* @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
|
|
3423
3445
|
* @param {object} [params] extra parameters specific to the exchange api endpoint
|
|
3424
|
-
* @returns {object} a list of [transaction structures]{@link https://
|
|
3446
|
+
* @returns {object} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
3425
3447
|
*/
|
|
3426
3448
|
throw new errors.NotSupported(this.id + ' fetchDepositsWithdrawals() is not supported yet');
|
|
3427
3449
|
}
|
|
@@ -4075,15 +4097,6 @@ class Exchange {
|
|
|
4075
4097
|
throw new errors.ArgumentsRequired(this.id + ' ' + methodName + '() cannot have a symbol argument for cross margin');
|
|
4076
4098
|
}
|
|
4077
4099
|
}
|
|
4078
|
-
checkRequiredSymbol(methodName, symbol) {
|
|
4079
|
-
/**
|
|
4080
|
-
* @ignore
|
|
4081
|
-
* @method
|
|
4082
|
-
* @param {string} symbol unified symbol of the market
|
|
4083
|
-
* @param {string} methodName name of the method that requires a symbol
|
|
4084
|
-
*/
|
|
4085
|
-
this.checkRequiredArgument(methodName, symbol, 'symbol');
|
|
4086
|
-
}
|
|
4087
4100
|
parseDepositWithdrawFees(response, codes = undefined, currencyIdKey = undefined) {
|
|
4088
4101
|
/**
|
|
4089
4102
|
* @ignore
|
|
@@ -4167,7 +4180,7 @@ class Exchange {
|
|
|
4167
4180
|
* @param {object} market ccxt market
|
|
4168
4181
|
* @param {int} [since] when defined, the response items are filtered to only include items after this timestamp
|
|
4169
4182
|
* @param {int} [limit] limits the number of items in the response
|
|
4170
|
-
* @returns {object[]} an array of [funding history structures]{@link https://
|
|
4183
|
+
* @returns {object[]} an array of [funding history structures]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
|
|
4171
4184
|
*/
|
|
4172
4185
|
const result = [];
|
|
4173
4186
|
for (let i = 0; i < incomes.length; i++) {
|
|
@@ -4203,7 +4216,7 @@ class Exchange {
|
|
|
4203
4216
|
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
4204
4217
|
* @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
|
|
4205
4218
|
* @param {object} [params] extra parameters specific to the exchange api endpoint
|
|
4206
|
-
* @returns {object} a list of [transaction structures]{@link https://
|
|
4219
|
+
* @returns {object} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
4207
4220
|
*/
|
|
4208
4221
|
if (this.has['fetchDepositsWithdrawals']) {
|
|
4209
4222
|
return await this.fetchDepositsWithdrawals(code, since, limit, params);
|
|
@@ -4558,7 +4571,7 @@ class Exchange {
|
|
|
4558
4571
|
* @param {object} market ccxt market
|
|
4559
4572
|
* @param {int} [since] when defined, the response items are filtered to only include items after this timestamp
|
|
4560
4573
|
* @param {int} [limit] limits the number of items in the response
|
|
4561
|
-
* @returns {object[]} an array of [liquidation structures]{@link https://
|
|
4574
|
+
* @returns {object[]} an array of [liquidation structures]{@link https://docs.ccxt.com/#/?id=liquidation-structure}
|
|
4562
4575
|
*/
|
|
4563
4576
|
const result = [];
|
|
4564
4577
|
for (let i = 0; i < liquidations.length; i++) {
|
|
@@ -7,8 +7,6 @@ const minusOne = BigInt(-1);
|
|
|
7
7
|
const base = BigInt(10);
|
|
8
8
|
class Precise {
|
|
9
9
|
constructor(number, decimals = undefined) {
|
|
10
|
-
this.decimals = undefined;
|
|
11
|
-
this.integer = undefined;
|
|
12
10
|
this.base = undefined;
|
|
13
11
|
if (decimals === undefined) {
|
|
14
12
|
let modifier = 0;
|
|
@@ -35,7 +33,7 @@ class Precise {
|
|
|
35
33
|
}
|
|
36
34
|
div(other, precision = 18) {
|
|
37
35
|
const distance = precision - this.decimals + other.decimals;
|
|
38
|
-
let numerator
|
|
36
|
+
let numerator;
|
|
39
37
|
if (distance === 0) {
|
|
40
38
|
numerator = this.integer;
|
|
41
39
|
}
|
|
@@ -111,7 +111,7 @@ class Client {
|
|
|
111
111
|
if (!this.isOpen()) {
|
|
112
112
|
const error = new errors.RequestTimeout('Connection to ' + this.url + ' failed due to a connection timeout');
|
|
113
113
|
this.onError(error);
|
|
114
|
-
this.connection.close(1006);
|
|
114
|
+
this.connection.close(platform.isNode ? 1006 : 1000);
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
setConnectionTimeout() {
|