ccxt 4.1.56 → 4.1.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.git-templates/hooks/pre-push +2 -2
- package/README.md +3 -3
- package/build.sh +30 -18
- package/dist/ccxt.browser.js +3872 -3202
- package/dist/ccxt.browser.min.js +10 -10
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +17 -13
- package/dist/cjs/src/alpaca.js +6 -6
- package/dist/cjs/src/ascendex.js +35 -29
- package/dist/cjs/src/base/Exchange.js +39 -26
- package/dist/cjs/src/base/Precise.js +1 -3
- package/dist/cjs/src/bigone.js +24 -20
- package/dist/cjs/src/binance.js +97 -76
- package/dist/cjs/src/bingx.js +63 -44
- package/dist/cjs/src/bit2c.js +18 -15
- package/dist/cjs/src/bitbank.js +16 -15
- package/dist/cjs/src/bitbns.js +28 -18
- package/dist/cjs/src/bitfinex.js +23 -21
- package/dist/cjs/src/bitfinex2.js +32 -28
- package/dist/cjs/src/bitflyer.js +28 -20
- package/dist/cjs/src/bitforex.js +25 -18
- package/dist/cjs/src/bitget.js +184 -147
- package/dist/cjs/src/bithumb.js +23 -16
- package/dist/cjs/src/bitmart.js +106 -85
- package/dist/cjs/src/bitmex.js +104 -64
- package/dist/cjs/src/bitopro.js +38 -26
- package/dist/cjs/src/bitpanda.js +24 -23
- package/dist/cjs/src/bitrue.js +33 -24
- package/dist/cjs/src/bitso.js +24 -23
- package/dist/cjs/src/bitstamp.js +24 -23
- package/dist/cjs/src/bittrex.js +30 -29
- package/dist/cjs/src/bitvavo.js +38 -30
- package/dist/cjs/src/bl3p.js +11 -10
- package/dist/cjs/src/blockchaincom.js +20 -20
- package/dist/cjs/src/btcalpha.js +18 -17
- package/dist/cjs/src/btcbox.js +13 -12
- package/dist/cjs/src/btcmarkets.js +20 -19
- package/dist/cjs/src/btcturk.js +14 -13
- package/dist/cjs/src/bybit.js +84 -54
- package/dist/cjs/src/cex.js +16 -14
- package/dist/cjs/src/coinbase.js +29 -27
- package/dist/cjs/src/coinbasepro.js +27 -25
- package/dist/cjs/src/coincheck.js +15 -14
- package/dist/cjs/src/coinex.js +100 -77
- package/dist/cjs/src/coinlist.js +28 -27
- package/dist/cjs/src/coinmate.js +20 -17
- package/dist/cjs/src/coinone.js +21 -16
- package/dist/cjs/src/coinsph.js +37 -28
- package/dist/cjs/src/coinspot.js +12 -11
- package/dist/cjs/src/cryptocom.js +40 -202
- package/dist/cjs/src/currencycom.js +32 -25
- package/dist/cjs/src/delta.js +34 -28
- package/dist/cjs/src/deribit.js +39 -36
- package/dist/cjs/src/digifinex.js +64 -44
- package/dist/cjs/src/exmo.js +29 -27
- package/dist/cjs/src/gate.js +67 -53
- package/dist/cjs/src/gemini.js +23 -20
- package/dist/cjs/src/hitbtc.js +65 -56
- package/dist/cjs/src/hollaex.js +30 -27
- package/dist/cjs/src/htx.js +132 -143
- package/dist/cjs/src/huobijp.js +22 -20
- package/dist/cjs/src/idex.js +22 -21
- package/dist/cjs/src/independentreserve.js +15 -14
- package/dist/cjs/src/indodax.js +30 -26
- package/dist/cjs/src/kraken.js +29 -27
- package/dist/cjs/src/krakenfutures.js +29 -22
- package/dist/cjs/src/kucoin.js +48 -43
- package/dist/cjs/src/kucoinfutures.js +33 -28
- package/dist/cjs/src/kuna.js +25 -24
- package/dist/cjs/src/latoken.js +24 -22
- package/dist/cjs/src/lbank.js +45 -30
- package/dist/cjs/src/luno.js +22 -19
- package/dist/cjs/src/lykke.js +19 -17
- package/dist/cjs/src/mercado.js +30 -19
- package/dist/cjs/src/mexc.js +60 -49
- package/dist/cjs/src/ndax.js +23 -22
- package/dist/cjs/src/novadax.js +23 -22
- package/dist/cjs/src/oceanex.js +22 -19
- package/dist/cjs/src/okcoin.js +29 -23
- package/dist/cjs/src/okx.js +87 -82
- package/dist/cjs/src/p2b.js +79 -82
- package/dist/cjs/src/paymium.js +10 -10
- package/dist/cjs/src/phemex.js +63 -40
- package/dist/cjs/src/poloniex.js +22 -22
- package/dist/cjs/src/poloniexfutures.js +23 -19
- package/dist/cjs/src/pro/alpaca.js +5 -5
- package/dist/cjs/src/pro/ascendex.js +4 -4
- package/dist/cjs/src/pro/binance.js +16 -16
- package/dist/cjs/src/pro/bingx.js +1 -1
- package/dist/cjs/src/pro/bitfinex.js +4 -4
- package/dist/cjs/src/pro/bitfinex2.js +6 -6
- package/dist/cjs/src/pro/bitget.js +7 -7
- package/dist/cjs/src/pro/bitmart.js +7 -5
- package/dist/cjs/src/pro/bitmex.js +6 -6
- package/dist/cjs/src/pro/bitopro.js +4 -4
- package/dist/cjs/src/pro/bitpanda.js +6 -6
- package/dist/cjs/src/pro/bitrue.js +2 -2
- package/dist/cjs/src/pro/bitstamp.js +6 -4
- package/dist/cjs/src/pro/bittrex.js +6 -6
- package/dist/cjs/src/pro/bitvavo.js +11 -7
- package/dist/cjs/src/pro/blockchaincom.js +8 -8
- package/dist/cjs/src/pro/bybit.js +7 -7
- package/dist/cjs/src/pro/cex.js +13 -9
- package/dist/cjs/src/pro/coinbase.js +5 -5
- package/dist/cjs/src/pro/coinbasepro.js +11 -10
- package/dist/cjs/src/pro/coinex.js +7 -9
- package/dist/cjs/src/pro/cryptocom.js +9 -9
- package/dist/cjs/src/pro/currencycom.js +4 -4
- package/dist/cjs/src/pro/deribit.js +6 -6
- package/dist/cjs/src/pro/exmo.js +12 -14
- package/dist/cjs/src/pro/gate.js +7 -7
- package/dist/cjs/src/pro/gemini.js +3 -3
- package/dist/cjs/src/pro/hitbtc.js +263 -4
- package/dist/cjs/src/pro/hollaex.js +5 -5
- package/dist/cjs/src/pro/htx.js +6 -6
- package/dist/cjs/src/pro/huobijp.js +3 -3
- package/dist/cjs/src/pro/idex.js +4 -4
- package/dist/cjs/src/pro/independentreserve.js +2 -2
- package/dist/cjs/src/pro/kraken.js +10 -10
- package/dist/cjs/src/pro/krakenfutures.js +41 -17
- package/dist/cjs/src/pro/kucoin.js +7 -7
- package/dist/cjs/src/pro/kucoinfutures.js +8 -6
- package/dist/cjs/src/pro/luno.js +2 -2
- package/dist/cjs/src/pro/mexc.js +6 -6
- package/dist/cjs/src/pro/ndax.js +3 -3
- package/dist/cjs/src/pro/okcoin.js +5 -5
- package/dist/cjs/src/pro/okx.js +12 -12
- package/dist/cjs/src/pro/phemex.js +6 -6
- package/dist/cjs/src/pro/poloniex.js +7 -7
- package/dist/cjs/src/pro/poloniexfutures.js +5 -5
- package/dist/cjs/src/pro/probit.js +6 -6
- package/dist/cjs/src/pro/upbit.js +3 -3
- package/dist/cjs/src/pro/wazirx.js +8 -8
- package/dist/cjs/src/pro/whitebit.js +12 -8
- package/dist/cjs/src/pro/woo.js +1 -1
- package/dist/cjs/src/probit.js +28 -23
- package/dist/cjs/src/tidex.js +16 -15
- package/dist/cjs/src/timex.js +19 -18
- package/dist/cjs/src/tokocrypto.js +27 -22
- package/dist/cjs/src/upbit.js +19 -19
- package/dist/cjs/src/wavesexchange.js +22 -19
- package/dist/cjs/src/wazirx.js +24 -17
- package/dist/cjs/src/whitebit.js +33 -27
- package/dist/cjs/src/woo.js +44 -34
- package/dist/cjs/src/yobit.js +25 -20
- package/dist/cjs/src/zaif.js +9 -9
- package/dist/cjs/src/zonda.js +18 -17
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bybit.d.ts +1 -0
- package/js/src/abstract/cryptocom.d.ts +0 -20
- package/js/src/ace.js +18 -14
- package/js/src/alpaca.js +6 -6
- package/js/src/ascendex.js +35 -29
- package/js/src/base/Exchange.d.ts +37 -34
- package/js/src/base/Exchange.js +39 -26
- package/js/src/base/Precise.d.ts +4 -4
- package/js/src/base/Precise.js +1 -3
- package/js/src/base/functions/type.d.ts +25 -25
- package/js/src/base/types.d.ts +21 -14
- package/js/src/bigone.js +25 -21
- package/js/src/binance.d.ts +2 -2
- package/js/src/binance.js +97 -76
- package/js/src/bingx.js +63 -44
- package/js/src/bit2c.js +19 -16
- package/js/src/bitbank.js +16 -15
- package/js/src/bitbns.js +28 -18
- package/js/src/bitfinex.js +23 -21
- package/js/src/bitfinex2.js +32 -28
- package/js/src/bitflyer.js +28 -20
- package/js/src/bitforex.js +26 -19
- package/js/src/bitget.d.ts +25 -3
- package/js/src/bitget.js +184 -147
- package/js/src/bithumb.js +23 -16
- package/js/src/bitmart.d.ts +1 -1
- package/js/src/bitmart.js +106 -85
- package/js/src/bitmex.d.ts +2 -2
- package/js/src/bitmex.js +104 -64
- package/js/src/bitopro.js +38 -26
- package/js/src/bitpanda.js +24 -23
- package/js/src/bitrue.js +33 -24
- package/js/src/bitso.js +24 -23
- package/js/src/bitstamp.d.ts +2 -2
- package/js/src/bitstamp.js +24 -23
- package/js/src/bittrex.js +30 -29
- package/js/src/bitvavo.js +38 -30
- package/js/src/bl3p.js +11 -10
- package/js/src/blockchaincom.js +20 -20
- package/js/src/btcalpha.js +18 -17
- package/js/src/btcbox.js +13 -12
- package/js/src/btcmarkets.js +20 -19
- package/js/src/btcturk.js +14 -13
- package/js/src/bybit.d.ts +1 -1
- package/js/src/bybit.js +84 -54
- package/js/src/cex.js +16 -14
- package/js/src/coinbase.js +29 -27
- package/js/src/coinbasepro.js +27 -25
- package/js/src/coincheck.js +15 -14
- package/js/src/coinex.d.ts +1 -1
- package/js/src/coinex.js +100 -77
- package/js/src/coinlist.js +28 -27
- package/js/src/coinmate.js +21 -18
- package/js/src/coinone.js +21 -16
- package/js/src/coinsph.js +37 -28
- package/js/src/coinspot.js +12 -11
- package/js/src/cryptocom.d.ts +0 -23
- package/js/src/cryptocom.js +40 -202
- package/js/src/currencycom.js +32 -25
- package/js/src/delta.js +35 -29
- package/js/src/deribit.js +39 -36
- package/js/src/digifinex.d.ts +2 -2
- package/js/src/digifinex.js +65 -45
- package/js/src/exmo.js +29 -27
- package/js/src/gate.d.ts +1 -1
- package/js/src/gate.js +67 -53
- package/js/src/gemini.js +23 -20
- package/js/src/hitbtc.d.ts +1 -0
- package/js/src/hitbtc.js +65 -56
- package/js/src/hollaex.js +30 -27
- package/js/src/htx.d.ts +11 -3
- package/js/src/htx.js +132 -143
- package/js/src/huobijp.js +23 -21
- package/js/src/idex.js +22 -21
- package/js/src/independentreserve.js +15 -14
- package/js/src/indodax.js +30 -26
- package/js/src/kraken.js +29 -27
- package/js/src/krakenfutures.js +29 -22
- package/js/src/kucoin.d.ts +1 -1
- package/js/src/kucoin.js +48 -43
- package/js/src/kucoinfutures.js +33 -28
- package/js/src/kuna.js +25 -24
- package/js/src/latoken.js +25 -23
- package/js/src/lbank.js +46 -31
- package/js/src/luno.js +22 -19
- package/js/src/lykke.js +19 -17
- package/js/src/mercado.js +30 -19
- package/js/src/mexc.d.ts +1 -1
- package/js/src/mexc.js +60 -49
- package/js/src/ndax.js +23 -22
- package/js/src/novadax.js +23 -22
- package/js/src/oceanex.js +22 -19
- package/js/src/okcoin.js +29 -23
- package/js/src/okx.d.ts +2 -2
- package/js/src/okx.js +87 -82
- package/js/src/p2b.d.ts +8 -7
- package/js/src/p2b.js +79 -81
- package/js/src/paymium.js +10 -10
- package/js/src/phemex.js +63 -40
- package/js/src/poloniex.js +22 -22
- package/js/src/poloniexfutures.js +23 -19
- package/js/src/pro/alpaca.js +5 -5
- package/js/src/pro/ascendex.js +4 -4
- package/js/src/pro/binance.js +16 -16
- package/js/src/pro/bingx.js +1 -1
- package/js/src/pro/bitfinex.js +4 -4
- package/js/src/pro/bitfinex2.d.ts +1 -1
- package/js/src/pro/bitfinex2.js +6 -6
- package/js/src/pro/bitget.js +7 -7
- package/js/src/pro/bitmart.js +7 -5
- package/js/src/pro/bitmex.js +6 -6
- package/js/src/pro/bitopro.js +4 -4
- package/js/src/pro/bitpanda.js +6 -6
- package/js/src/pro/bitrue.js +2 -2
- package/js/src/pro/bitstamp.js +7 -5
- package/js/src/pro/bittrex.js +6 -6
- package/js/src/pro/bitvavo.js +12 -8
- package/js/src/pro/blockchaincom.js +8 -8
- package/js/src/pro/bybit.js +7 -7
- package/js/src/pro/cex.js +14 -10
- package/js/src/pro/coinbase.js +5 -5
- package/js/src/pro/coinbasepro.js +12 -11
- package/js/src/pro/coinex.js +7 -9
- package/js/src/pro/cryptocom.js +9 -9
- package/js/src/pro/currencycom.js +4 -4
- package/js/src/pro/deribit.js +6 -6
- package/js/src/pro/exmo.js +12 -14
- package/js/src/pro/gate.js +7 -7
- package/js/src/pro/gemini.js +3 -3
- package/js/src/pro/hitbtc.d.ts +8 -1
- package/js/src/pro/hitbtc.js +264 -5
- package/js/src/pro/hollaex.js +5 -5
- package/js/src/pro/htx.js +6 -6
- package/js/src/pro/huobijp.js +3 -3
- package/js/src/pro/idex.js +4 -4
- package/js/src/pro/independentreserve.js +2 -2
- package/js/src/pro/kraken.js +10 -10
- package/js/src/pro/krakenfutures.d.ts +1 -0
- package/js/src/pro/krakenfutures.js +42 -18
- package/js/src/pro/kucoin.js +7 -7
- package/js/src/pro/kucoinfutures.js +8 -6
- package/js/src/pro/luno.js +2 -2
- package/js/src/pro/mexc.js +6 -6
- package/js/src/pro/ndax.js +3 -3
- package/js/src/pro/okcoin.js +5 -5
- package/js/src/pro/okx.js +12 -12
- package/js/src/pro/phemex.js +6 -6
- package/js/src/pro/poloniex.js +7 -7
- package/js/src/pro/poloniexfutures.js +5 -5
- package/js/src/pro/probit.js +6 -6
- package/js/src/pro/upbit.js +3 -3
- package/js/src/pro/wazirx.js +8 -8
- package/js/src/pro/whitebit.js +13 -9
- package/js/src/pro/woo.js +1 -1
- package/js/src/probit.js +29 -24
- package/js/src/tidex.js +16 -15
- package/js/src/timex.js +19 -18
- package/js/src/tokocrypto.js +28 -23
- package/js/src/upbit.js +19 -19
- package/js/src/wavesexchange.js +23 -20
- package/js/src/wazirx.js +25 -18
- package/js/src/whitebit.js +33 -27
- package/js/src/woo.js +45 -35
- package/js/src/yobit.js +25 -20
- package/js/src/zaif.js +9 -9
- package/js/src/zonda.js +18 -17
- package/package.json +1 -1
|
@@ -402,7 +402,7 @@ class poloniexfutures extends poloniexfutures$1 {
|
|
|
402
402
|
* @see https://futures-docs.poloniex.com/#get-real-time-ticker-2-0
|
|
403
403
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
404
404
|
* @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
|
|
405
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
405
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
406
406
|
*/
|
|
407
407
|
await this.loadMarkets();
|
|
408
408
|
const market = this.market(symbol);
|
|
@@ -438,7 +438,7 @@ class poloniexfutures extends poloniexfutures$1 {
|
|
|
438
438
|
* @see https://futures-docs.poloniex.com/#get-real-time-ticker-of-all-symbols
|
|
439
439
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
440
440
|
* @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
|
|
441
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
441
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
442
442
|
*/
|
|
443
443
|
await this.loadMarkets();
|
|
444
444
|
const response = await this.publicGetTickers(params);
|
|
@@ -454,7 +454,7 @@ class poloniexfutures extends poloniexfutures$1 {
|
|
|
454
454
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
455
455
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
456
456
|
* @param {object} [params] extra parameters specific to the poloniexfuturesfutures api endpoint
|
|
457
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
457
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
458
458
|
*/
|
|
459
459
|
await this.loadMarkets();
|
|
460
460
|
const level = this.safeNumber(params, 'level');
|
|
@@ -540,7 +540,7 @@ class poloniexfutures extends poloniexfutures$1 {
|
|
|
540
540
|
* @param {string} symbol unified market symbol
|
|
541
541
|
* @param {int} [limit] max number of orders to return, default is undefined
|
|
542
542
|
* @param {object} [params] extra parameters specific to the blockchaincom api endpoint
|
|
543
|
-
* @returns {object} an [order book structure]{@link https://
|
|
543
|
+
* @returns {object} an [order book structure]{@link https://docs.ccxt.com/#/?id=order-book-structure}
|
|
544
544
|
*/
|
|
545
545
|
await this.loadMarkets();
|
|
546
546
|
const market = this.market(symbol);
|
|
@@ -648,7 +648,7 @@ class poloniexfutures extends poloniexfutures$1 {
|
|
|
648
648
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
649
649
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
650
650
|
* @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
|
|
651
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
651
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
652
652
|
*/
|
|
653
653
|
await this.loadMarkets();
|
|
654
654
|
const market = this.market(symbol);
|
|
@@ -770,7 +770,7 @@ class poloniexfutures extends poloniexfutures$1 {
|
|
|
770
770
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
771
771
|
* @see https://futures-docs.poloniex.com/#get-account-overview
|
|
772
772
|
* @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
|
|
773
|
-
* @returns {object} a [balance structure]{@link https://
|
|
773
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
774
774
|
*/
|
|
775
775
|
await this.loadMarkets();
|
|
776
776
|
const currencyId = this.safeString(params, 'currency');
|
|
@@ -822,7 +822,7 @@ class poloniexfutures extends poloniexfutures$1 {
|
|
|
822
822
|
* @param {string} [params.stopPriceType] TP, IP or MP, defaults to TP
|
|
823
823
|
* @param {bool} [params.closeOrder] set to true to close position
|
|
824
824
|
* @param {bool} [params.forceHold] A mark to forcely hold the funds for an order, even though it's an order to reduce the position size. This helps the order stay on the order book and not get canceled when the position size changes. Set to false by default.
|
|
825
|
-
* @returns {object} an [order structure]{@link https://
|
|
825
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
826
826
|
*/
|
|
827
827
|
await this.loadMarkets();
|
|
828
828
|
const market = this.market(symbol);
|
|
@@ -916,7 +916,7 @@ class poloniexfutures extends poloniexfutures$1 {
|
|
|
916
916
|
* @param {string} id order id
|
|
917
917
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
918
918
|
* @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
|
|
919
|
-
* @returns {object} An [order structure]{@link https://
|
|
919
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
920
920
|
*/
|
|
921
921
|
await this.loadMarkets();
|
|
922
922
|
const request = {
|
|
@@ -955,7 +955,7 @@ class poloniexfutures extends poloniexfutures$1 {
|
|
|
955
955
|
* @see https://futures-docs.poloniex.com/#get-position-list
|
|
956
956
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
957
957
|
* @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
|
|
958
|
-
* @returns {object[]} a list of [position structure]{@link https://
|
|
958
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
959
959
|
*/
|
|
960
960
|
await this.loadMarkets();
|
|
961
961
|
const response = await this.privateGetPositions(params);
|
|
@@ -1111,9 +1111,11 @@ class poloniexfutures extends poloniexfutures$1 {
|
|
|
1111
1111
|
* @param {int} [since] the earliest time in ms to fetch funding history for
|
|
1112
1112
|
* @param {int} [limit] the maximum number of funding history structures to retrieve
|
|
1113
1113
|
* @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
|
|
1114
|
-
* @returns {object} a [funding history structure]{@link https://
|
|
1114
|
+
* @returns {object} a [funding history structure]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
|
|
1115
1115
|
*/
|
|
1116
|
-
|
|
1116
|
+
if (symbol === undefined) {
|
|
1117
|
+
throw new errors.ArgumentsRequired(this.id + ' fetchFundingHistory() requires a symbol argument');
|
|
1118
|
+
}
|
|
1117
1119
|
await this.loadMarkets();
|
|
1118
1120
|
const market = this.market(symbol);
|
|
1119
1121
|
const request = {
|
|
@@ -1180,7 +1182,7 @@ class poloniexfutures extends poloniexfutures$1 {
|
|
|
1180
1182
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
1181
1183
|
* @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
|
|
1182
1184
|
* @param {object} [params.stop] When true, all the trigger orders will be cancelled
|
|
1183
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
1185
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1184
1186
|
*/
|
|
1185
1187
|
await this.loadMarkets();
|
|
1186
1188
|
const request = {};
|
|
@@ -1248,7 +1250,7 @@ class poloniexfutures extends poloniexfutures$1 {
|
|
|
1248
1250
|
* @param {int} [params.until] End time in ms
|
|
1249
1251
|
* @param {string} [params.side] buy or sell
|
|
1250
1252
|
* @param {string} [params.type] limit or market
|
|
1251
|
-
* @returns An [array of order structures]{@link https://
|
|
1253
|
+
* @returns An [array of order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1252
1254
|
*/
|
|
1253
1255
|
await this.loadMarkets();
|
|
1254
1256
|
const stop = this.safeValue(params, 'stop');
|
|
@@ -1351,7 +1353,7 @@ class poloniexfutures extends poloniexfutures$1 {
|
|
|
1351
1353
|
* @param {int} [params.till] end time in ms
|
|
1352
1354
|
* @param {string} [params.side] buy or sell
|
|
1353
1355
|
* @param {string} [params.type] limit, or market
|
|
1354
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1356
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1355
1357
|
*/
|
|
1356
1358
|
return await this.fetchOrdersByStatus('open', symbol, since, limit, params);
|
|
1357
1359
|
}
|
|
@@ -1369,7 +1371,7 @@ class poloniexfutures extends poloniexfutures$1 {
|
|
|
1369
1371
|
* @param {int} [params.till] end time in ms
|
|
1370
1372
|
* @param {string} [params.side] buy or sell
|
|
1371
1373
|
* @param {string} [params.type] limit, or market
|
|
1372
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1374
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1373
1375
|
*/
|
|
1374
1376
|
return await this.fetchOrdersByStatus('closed', symbol, since, limit, params);
|
|
1375
1377
|
}
|
|
@@ -1382,7 +1384,7 @@ class poloniexfutures extends poloniexfutures$1 {
|
|
|
1382
1384
|
* @see https://futures-docs.poloniex.com/#get-single-order-by-clientoid
|
|
1383
1385
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1384
1386
|
* @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
|
|
1385
|
-
* @returns {object} An [order structure]{@link https://
|
|
1387
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1386
1388
|
*/
|
|
1387
1389
|
await this.loadMarkets();
|
|
1388
1390
|
const request = {};
|
|
@@ -1581,7 +1583,7 @@ class poloniexfutures extends poloniexfutures$1 {
|
|
|
1581
1583
|
* @see https://futures-docs.poloniex.com/#get-premium-index
|
|
1582
1584
|
* @param {string} symbol unified market symbol
|
|
1583
1585
|
* @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
|
|
1584
|
-
* @returns {object} a [funding rate structure]{@link https://
|
|
1586
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
1585
1587
|
*/
|
|
1586
1588
|
await this.loadMarkets();
|
|
1587
1589
|
const market = this.market(symbol);
|
|
@@ -1635,7 +1637,7 @@ class poloniexfutures extends poloniexfutures$1 {
|
|
|
1635
1637
|
* @param {string} side buy or sell
|
|
1636
1638
|
* @param {string} type limit, market, limit_stop or market_stop
|
|
1637
1639
|
* @param {int} endAt end time (milisecond)
|
|
1638
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
1640
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1639
1641
|
*/
|
|
1640
1642
|
await this.loadMarkets();
|
|
1641
1643
|
const request = {};
|
|
@@ -1696,7 +1698,9 @@ class poloniexfutures extends poloniexfutures$1 {
|
|
|
1696
1698
|
* @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
|
|
1697
1699
|
* @returns {object} response from the exchange
|
|
1698
1700
|
*/
|
|
1699
|
-
|
|
1701
|
+
if (symbol === undefined) {
|
|
1702
|
+
throw new errors.ArgumentsRequired(this.id + ' setMarginMode() requires a symbol argument');
|
|
1703
|
+
}
|
|
1700
1704
|
if ((marginMode !== 0) && (marginMode !== 1)) {
|
|
1701
1705
|
throw new errors.ArgumentsRequired(this.id + ' setMarginMode() marginMode must be 0 (isolated) or 1 (cross)');
|
|
1702
1706
|
}
|
|
@@ -51,7 +51,7 @@ class alpaca extends alpaca$1 {
|
|
|
51
51
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
52
52
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
53
53
|
* @param {object} [params] extra parameters specific to the alpaca api endpoint
|
|
54
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
54
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
55
55
|
*/
|
|
56
56
|
const url = this.urls['api']['ws']['crypto'];
|
|
57
57
|
await this.authenticate(url);
|
|
@@ -183,7 +183,7 @@ class alpaca extends alpaca$1 {
|
|
|
183
183
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
184
184
|
* @param {int} [limit] the maximum amount of order book entries to return.
|
|
185
185
|
* @param {object} [params] extra parameters specific to the alpaca api endpoint
|
|
186
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
186
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
187
187
|
*/
|
|
188
188
|
const url = this.urls['api']['ws']['crypto'];
|
|
189
189
|
await this.authenticate(url);
|
|
@@ -263,7 +263,7 @@ class alpaca extends alpaca$1 {
|
|
|
263
263
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
264
264
|
* @param {int} [limit] the maximum number of trade structures to retrieve
|
|
265
265
|
* @param {object} [params] extra parameters specific to the alpaca api endpoint
|
|
266
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
266
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure
|
|
267
267
|
*/
|
|
268
268
|
const url = this.urls['api']['ws']['crypto'];
|
|
269
269
|
await this.authenticate(url);
|
|
@@ -316,7 +316,7 @@ class alpaca extends alpaca$1 {
|
|
|
316
316
|
* @param {int} [limit] the maximum number of trade structures to retrieve
|
|
317
317
|
* @param {object} [params] extra parameters specific to the alpaca api endpoint
|
|
318
318
|
* @param {boolean} [params.unifiedMargin] use unified margin account
|
|
319
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
319
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure
|
|
320
320
|
*/
|
|
321
321
|
const url = this.urls['api']['ws']['trading'];
|
|
322
322
|
await this.authenticate(url);
|
|
@@ -347,7 +347,7 @@ class alpaca extends alpaca$1 {
|
|
|
347
347
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
348
348
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
349
349
|
* @param {object} [params] extra parameters specific to the alpaca api endpoint
|
|
350
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
350
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure
|
|
351
351
|
*/
|
|
352
352
|
const url = this.urls['api']['ws']['trading'];
|
|
353
353
|
await this.authenticate(url);
|
|
@@ -144,7 +144,7 @@ class ascendex extends ascendex$1 {
|
|
|
144
144
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
145
145
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
146
146
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
147
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
147
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
148
148
|
*/
|
|
149
149
|
await this.loadMarkets();
|
|
150
150
|
const market = this.market(symbol);
|
|
@@ -204,7 +204,7 @@ class ascendex extends ascendex$1 {
|
|
|
204
204
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
205
205
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
206
206
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
207
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
207
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
208
208
|
*/
|
|
209
209
|
await this.loadMarkets();
|
|
210
210
|
const market = this.market(symbol);
|
|
@@ -349,7 +349,7 @@ class ascendex extends ascendex$1 {
|
|
|
349
349
|
* @name ascendex#watchBalance
|
|
350
350
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
351
351
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
352
|
-
* @returns {object} a [balance structure]{@link https://
|
|
352
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
353
353
|
*/
|
|
354
354
|
await this.loadMarkets();
|
|
355
355
|
const [type, query] = this.handleMarketTypeAndParams('watchBalance', undefined, params);
|
|
@@ -477,7 +477,7 @@ class ascendex extends ascendex$1 {
|
|
|
477
477
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
478
478
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
479
479
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
480
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
480
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
481
481
|
*/
|
|
482
482
|
await this.loadMarkets();
|
|
483
483
|
let market = undefined;
|
|
@@ -140,7 +140,7 @@ class binance extends binance$1 {
|
|
|
140
140
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
141
141
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
142
142
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
143
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
143
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
144
144
|
*/
|
|
145
145
|
//
|
|
146
146
|
// todo add support for <levels>-snapshots (depth)
|
|
@@ -542,7 +542,7 @@ class binance extends binance$1 {
|
|
|
542
542
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
543
543
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
544
544
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
545
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
545
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
546
546
|
*/
|
|
547
547
|
await this.loadMarkets();
|
|
548
548
|
const market = this.market(symbol);
|
|
@@ -935,7 +935,7 @@ class binance extends binance$1 {
|
|
|
935
935
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
936
936
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
937
937
|
* @param {string} [params.name] stream to use can be ticker or bookTicker
|
|
938
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
938
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
939
939
|
*/
|
|
940
940
|
await this.loadMarkets();
|
|
941
941
|
const market = this.market(symbol);
|
|
@@ -970,7 +970,7 @@ class binance extends binance$1 {
|
|
|
970
970
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
|
|
971
971
|
* @param {string[]} symbols unified symbol of the market to fetch the ticker for
|
|
972
972
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
973
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
973
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
974
974
|
*/
|
|
975
975
|
await this.loadMarkets();
|
|
976
976
|
symbols = this.marketSymbols(symbols, undefined, true, true, true);
|
|
@@ -1390,7 +1390,7 @@ class binance extends binance$1 {
|
|
|
1390
1390
|
* @param {string|undefined} [params.type] 'future', 'delivery', 'savings', 'funding', or 'spot'
|
|
1391
1391
|
* @param {string|undefined} [params.marginMode] 'cross' or 'isolated', for margin trading, uses this.options.defaultMarginMode if not passed, defaults to undefined/None/null
|
|
1392
1392
|
* @param {string[]|undefined} [params.symbols] unified market symbols, only used in isolated margin mode
|
|
1393
|
-
* @returns {object} a [balance structure]{@link https://
|
|
1393
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
1394
1394
|
*/
|
|
1395
1395
|
await this.loadMarkets();
|
|
1396
1396
|
const url = this.urls['api']['ws']['ws'];
|
|
@@ -1467,7 +1467,7 @@ class binance extends binance$1 {
|
|
|
1467
1467
|
* @name binance#watchBalance
|
|
1468
1468
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
1469
1469
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
1470
|
-
* @returns {object} a [balance structure]{@link https://
|
|
1470
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
1471
1471
|
*/
|
|
1472
1472
|
await this.loadMarkets();
|
|
1473
1473
|
await this.authenticate(params);
|
|
@@ -1635,7 +1635,7 @@ class binance extends binance$1 {
|
|
|
1635
1635
|
* @param {float|undefined} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1636
1636
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
1637
1637
|
* @param {boolean} params.test test order, default false
|
|
1638
|
-
* @returns {object} an [order structure]{@link https://
|
|
1638
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1639
1639
|
*/
|
|
1640
1640
|
await this.loadMarkets();
|
|
1641
1641
|
this.checkIsSpot('createOrderWs', symbol, params);
|
|
@@ -1769,7 +1769,7 @@ class binance extends binance$1 {
|
|
|
1769
1769
|
* @param {float} amount how much of the currency you want to trade in units of the base currency
|
|
1770
1770
|
* @param {float|undefined} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1771
1771
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
1772
|
-
* @returns {object} an [order structure]{@link https://
|
|
1772
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1773
1773
|
*/
|
|
1774
1774
|
await this.loadMarkets();
|
|
1775
1775
|
this.checkIsSpot('editOrderWs', symbol, params);
|
|
@@ -1873,7 +1873,7 @@ class binance extends binance$1 {
|
|
|
1873
1873
|
* @param {string} symbol unified market symbol, default is undefined
|
|
1874
1874
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
1875
1875
|
* @param {string|undefined} [params.cancelRestrictions] Supported values: ONLY_NEW - Cancel will succeed if the order status is NEW. ONLY_PARTIALLY_FILLED - Cancel will succeed if order status is PARTIALLY_FILLED.
|
|
1876
|
-
* @returns {object} an list of [order structures]{@link https://
|
|
1876
|
+
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1877
1877
|
*/
|
|
1878
1878
|
await this.loadMarkets();
|
|
1879
1879
|
if (symbol === undefined) {
|
|
@@ -1915,7 +1915,7 @@ class binance extends binance$1 {
|
|
|
1915
1915
|
* @description cancel all open orders in a market
|
|
1916
1916
|
* @param {string} symbol unified market symbol of the market to cancel orders in
|
|
1917
1917
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
1918
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
1918
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1919
1919
|
*/
|
|
1920
1920
|
await this.loadMarkets();
|
|
1921
1921
|
const url = this.urls['api']['ws']['ws'];
|
|
@@ -1945,7 +1945,7 @@ class binance extends binance$1 {
|
|
|
1945
1945
|
* @description fetches information on an order made by the user
|
|
1946
1946
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1947
1947
|
* @param {object} params extra parameters specific to the binance api endpoint
|
|
1948
|
-
* @returns {object} An [order structure]{@link https://
|
|
1948
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1949
1949
|
*/
|
|
1950
1950
|
await this.loadMarkets();
|
|
1951
1951
|
if (symbol === undefined) {
|
|
@@ -1992,7 +1992,7 @@ class binance extends binance$1 {
|
|
|
1992
1992
|
* @param {int} [params.startTime] earliest time in ms to retrieve orders for
|
|
1993
1993
|
* @param {int} [params.endTime] latest time in ms to retrieve orders for
|
|
1994
1994
|
* @param {int} [params.limit] the maximum number of order structures to retrieve
|
|
1995
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
1995
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1996
1996
|
*/
|
|
1997
1997
|
await this.loadMarkets();
|
|
1998
1998
|
if (symbol === undefined) {
|
|
@@ -2029,7 +2029,7 @@ class binance extends binance$1 {
|
|
|
2029
2029
|
* @param {int|undefined} [since] the earliest time in ms to fetch open orders for
|
|
2030
2030
|
* @param {int|undefined} [limit] the maximum number of open orders structures to retrieve
|
|
2031
2031
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
2032
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
2032
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2033
2033
|
*/
|
|
2034
2034
|
await this.loadMarkets();
|
|
2035
2035
|
this.checkIsSpot('fetchOpenOrdersWs', symbol);
|
|
@@ -2064,7 +2064,7 @@ class binance extends binance$1 {
|
|
|
2064
2064
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
2065
2065
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
2066
2066
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
2067
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
2067
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2068
2068
|
*/
|
|
2069
2069
|
await this.loadMarkets();
|
|
2070
2070
|
let messageHash = 'orders';
|
|
@@ -2542,7 +2542,7 @@ class binance extends binance$1 {
|
|
|
2542
2542
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
2543
2543
|
* @param {int} [params.endTime] the latest time in ms to fetch trades for
|
|
2544
2544
|
* @param {int} [params.fromId] first trade Id to fetch
|
|
2545
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
2545
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
2546
2546
|
*/
|
|
2547
2547
|
await this.loadMarkets();
|
|
2548
2548
|
if (symbol === undefined) {
|
|
@@ -2617,7 +2617,7 @@ class binance extends binance$1 {
|
|
|
2617
2617
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
2618
2618
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
2619
2619
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
2620
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
2620
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure
|
|
2621
2621
|
*/
|
|
2622
2622
|
await this.loadMarkets();
|
|
2623
2623
|
let type = undefined;
|
|
@@ -481,7 +481,7 @@ class bingx extends bingx$1 {
|
|
|
481
481
|
* @param {int} [since] the earliest time in ms to trades orders for
|
|
482
482
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
483
483
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
484
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
484
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure
|
|
485
485
|
*/
|
|
486
486
|
await this.loadMarkets();
|
|
487
487
|
await this.authenticate();
|
|
@@ -61,7 +61,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
61
61
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
62
62
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
63
63
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
64
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
64
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
65
65
|
*/
|
|
66
66
|
await this.loadMarkets();
|
|
67
67
|
symbol = this.symbol(symbol);
|
|
@@ -78,7 +78,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
78
78
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
79
79
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
80
80
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
81
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
81
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
82
82
|
*/
|
|
83
83
|
return await this.subscribe('ticker', symbol, params);
|
|
84
84
|
}
|
|
@@ -253,7 +253,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
253
253
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
254
254
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
255
255
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
256
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
256
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
257
257
|
*/
|
|
258
258
|
if (limit !== undefined) {
|
|
259
259
|
if ((limit !== 25) && (limit !== 100)) {
|
|
@@ -460,7 +460,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
460
460
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
461
461
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
462
462
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
463
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
463
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
464
464
|
*/
|
|
465
465
|
await this.loadMarkets();
|
|
466
466
|
await this.authenticate();
|
|
@@ -193,7 +193,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
193
193
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
194
194
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
195
195
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
196
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
196
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
197
197
|
*/
|
|
198
198
|
const trades = await this.subscribe('trades', symbol, params);
|
|
199
199
|
if (this.newUpdates) {
|
|
@@ -210,7 +210,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
210
210
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
211
211
|
* @param {int} [limit] the maximum number of trade structures to retrieve
|
|
212
212
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
213
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
213
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure
|
|
214
214
|
*/
|
|
215
215
|
await this.loadMarkets();
|
|
216
216
|
let messageHash = 'myTrade';
|
|
@@ -231,7 +231,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
231
231
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
232
232
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
233
233
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
234
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
234
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
235
235
|
*/
|
|
236
236
|
return await this.subscribe('ticker', symbol, params);
|
|
237
237
|
}
|
|
@@ -521,7 +521,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
521
521
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
522
522
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
523
523
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
524
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
524
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
525
525
|
*/
|
|
526
526
|
if (limit !== undefined) {
|
|
527
527
|
if ((limit !== 25) && (limit !== 100)) {
|
|
@@ -687,7 +687,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
687
687
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
688
688
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
689
689
|
* @param {str} [params.type] spot or contract if not provided this.options['defaultType'] is used
|
|
690
|
-
* @returns {object} a [balance structure]{@link https://
|
|
690
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
691
691
|
*/
|
|
692
692
|
await this.loadMarkets();
|
|
693
693
|
const balanceType = this.safeString(params, 'wallet', 'exchange'); // exchange, margin
|
|
@@ -884,7 +884,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
884
884
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
885
885
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
886
886
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
887
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
887
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure
|
|
888
888
|
*/
|
|
889
889
|
await this.loadMarkets();
|
|
890
890
|
let messageHash = 'orders';
|
|
@@ -129,7 +129,7 @@ class bitget extends bitget$1 {
|
|
|
129
129
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
130
130
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
131
131
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
132
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
132
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
133
133
|
*/
|
|
134
134
|
await this.loadMarkets();
|
|
135
135
|
const market = this.market(symbol);
|
|
@@ -150,7 +150,7 @@ class bitget extends bitget$1 {
|
|
|
150
150
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
|
|
151
151
|
* @param {string[]} symbols unified symbol of the market to fetch the ticker for
|
|
152
152
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
153
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
153
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
154
154
|
*/
|
|
155
155
|
await this.loadMarkets();
|
|
156
156
|
symbols = this.marketSymbols(symbols, undefined, false);
|
|
@@ -453,7 +453,7 @@ class bitget extends bitget$1 {
|
|
|
453
453
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
454
454
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
455
455
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
456
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
456
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
457
457
|
*/
|
|
458
458
|
await this.loadMarkets();
|
|
459
459
|
const market = this.market(symbol);
|
|
@@ -627,7 +627,7 @@ class bitget extends bitget$1 {
|
|
|
627
627
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
628
628
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
629
629
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
630
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
630
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
631
631
|
*/
|
|
632
632
|
await this.loadMarkets();
|
|
633
633
|
const market = this.market(symbol);
|
|
@@ -942,7 +942,7 @@ class bitget extends bitget$1 {
|
|
|
942
942
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
943
943
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
944
944
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
945
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
945
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure
|
|
946
946
|
*/
|
|
947
947
|
await this.loadMarkets();
|
|
948
948
|
let market = undefined;
|
|
@@ -1265,7 +1265,7 @@ class bitget extends bitget$1 {
|
|
|
1265
1265
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1266
1266
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
1267
1267
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
1268
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
1268
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1269
1269
|
*/
|
|
1270
1270
|
// only contracts stream provides the trade info consistently in between order updates
|
|
1271
1271
|
// the spot stream only provides on limit orders updates so we can't support it for spot
|
|
@@ -1417,7 +1417,7 @@ class bitget extends bitget$1 {
|
|
|
1417
1417
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
1418
1418
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
1419
1419
|
* @param {str} [params.type] spot or contract if not provided this.options['defaultType'] is used
|
|
1420
|
-
* @returns {object} a [balance structure]{@link https://
|
|
1420
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
1421
1421
|
*/
|
|
1422
1422
|
let type = undefined;
|
|
1423
1423
|
[type, params] = this.handleMarketTypeAndParams('watchOrders', undefined, params);
|
|
@@ -87,7 +87,7 @@ class bitmart extends bitmart$1 {
|
|
|
87
87
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
88
88
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
89
89
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
90
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
90
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
91
91
|
*/
|
|
92
92
|
await this.loadMarkets();
|
|
93
93
|
symbol = this.symbol(symbol);
|
|
@@ -104,7 +104,7 @@ class bitmart extends bitmart$1 {
|
|
|
104
104
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
105
105
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
106
106
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
107
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
107
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
108
108
|
*/
|
|
109
109
|
return await this.subscribe('ticker', symbol, params);
|
|
110
110
|
}
|
|
@@ -117,9 +117,11 @@ class bitmart extends bitmart$1 {
|
|
|
117
117
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
118
118
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
119
119
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
120
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
120
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
121
121
|
*/
|
|
122
|
-
|
|
122
|
+
if (symbol === undefined) {
|
|
123
|
+
throw new errors.ArgumentsRequired(this.id + ' watchOrders() requires a symbol argument');
|
|
124
|
+
}
|
|
123
125
|
await this.loadMarkets();
|
|
124
126
|
const market = this.market(symbol);
|
|
125
127
|
symbol = market['symbol'];
|
|
@@ -382,7 +384,7 @@ class bitmart extends bitmart$1 {
|
|
|
382
384
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
383
385
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
384
386
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
385
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
387
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
386
388
|
*/
|
|
387
389
|
const options = this.safeValue(this.options, 'watchOrderBook', {});
|
|
388
390
|
const depth = this.safeString(options, 'depth', 'depth50');
|