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
|
@@ -405,7 +405,7 @@ export default class poloniexfutures extends Exchange {
|
|
|
405
405
|
* @see https://futures-docs.poloniex.com/#get-real-time-ticker-2-0
|
|
406
406
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
407
407
|
* @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
|
|
408
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
408
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
409
409
|
*/
|
|
410
410
|
await this.loadMarkets();
|
|
411
411
|
const market = this.market(symbol);
|
|
@@ -441,7 +441,7 @@ export default class poloniexfutures extends Exchange {
|
|
|
441
441
|
* @see https://futures-docs.poloniex.com/#get-real-time-ticker-of-all-symbols
|
|
442
442
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
443
443
|
* @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
|
|
444
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
444
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
445
445
|
*/
|
|
446
446
|
await this.loadMarkets();
|
|
447
447
|
const response = await this.publicGetTickers(params);
|
|
@@ -457,7 +457,7 @@ export default class poloniexfutures extends Exchange {
|
|
|
457
457
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
458
458
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
459
459
|
* @param {object} [params] extra parameters specific to the poloniexfuturesfutures api endpoint
|
|
460
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
460
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
461
461
|
*/
|
|
462
462
|
await this.loadMarkets();
|
|
463
463
|
const level = this.safeNumber(params, 'level');
|
|
@@ -543,7 +543,7 @@ export default class poloniexfutures extends Exchange {
|
|
|
543
543
|
* @param {string} symbol unified market symbol
|
|
544
544
|
* @param {int} [limit] max number of orders to return, default is undefined
|
|
545
545
|
* @param {object} [params] extra parameters specific to the blockchaincom api endpoint
|
|
546
|
-
* @returns {object} an [order book structure]{@link https://
|
|
546
|
+
* @returns {object} an [order book structure]{@link https://docs.ccxt.com/#/?id=order-book-structure}
|
|
547
547
|
*/
|
|
548
548
|
await this.loadMarkets();
|
|
549
549
|
const market = this.market(symbol);
|
|
@@ -651,7 +651,7 @@ export default class poloniexfutures extends Exchange {
|
|
|
651
651
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
652
652
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
653
653
|
* @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
|
|
654
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
654
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
655
655
|
*/
|
|
656
656
|
await this.loadMarkets();
|
|
657
657
|
const market = this.market(symbol);
|
|
@@ -773,7 +773,7 @@ export default class poloniexfutures extends Exchange {
|
|
|
773
773
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
774
774
|
* @see https://futures-docs.poloniex.com/#get-account-overview
|
|
775
775
|
* @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
|
|
776
|
-
* @returns {object} a [balance structure]{@link https://
|
|
776
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
777
777
|
*/
|
|
778
778
|
await this.loadMarkets();
|
|
779
779
|
const currencyId = this.safeString(params, 'currency');
|
|
@@ -825,7 +825,7 @@ export default class poloniexfutures extends Exchange {
|
|
|
825
825
|
* @param {string} [params.stopPriceType] TP, IP or MP, defaults to TP
|
|
826
826
|
* @param {bool} [params.closeOrder] set to true to close position
|
|
827
827
|
* @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.
|
|
828
|
-
* @returns {object} an [order structure]{@link https://
|
|
828
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
829
829
|
*/
|
|
830
830
|
await this.loadMarkets();
|
|
831
831
|
const market = this.market(symbol);
|
|
@@ -919,7 +919,7 @@ export default class poloniexfutures extends Exchange {
|
|
|
919
919
|
* @param {string} id order id
|
|
920
920
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
921
921
|
* @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
|
|
922
|
-
* @returns {object} An [order structure]{@link https://
|
|
922
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
923
923
|
*/
|
|
924
924
|
await this.loadMarkets();
|
|
925
925
|
const request = {
|
|
@@ -958,7 +958,7 @@ export default class poloniexfutures extends Exchange {
|
|
|
958
958
|
* @see https://futures-docs.poloniex.com/#get-position-list
|
|
959
959
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
960
960
|
* @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
|
|
961
|
-
* @returns {object[]} a list of [position structure]{@link https://
|
|
961
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
962
962
|
*/
|
|
963
963
|
await this.loadMarkets();
|
|
964
964
|
const response = await this.privateGetPositions(params);
|
|
@@ -1114,9 +1114,11 @@ export default class poloniexfutures extends Exchange {
|
|
|
1114
1114
|
* @param {int} [since] the earliest time in ms to fetch funding history for
|
|
1115
1115
|
* @param {int} [limit] the maximum number of funding history structures to retrieve
|
|
1116
1116
|
* @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
|
|
1117
|
-
* @returns {object} a [funding history structure]{@link https://
|
|
1117
|
+
* @returns {object} a [funding history structure]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
|
|
1118
1118
|
*/
|
|
1119
|
-
|
|
1119
|
+
if (symbol === undefined) {
|
|
1120
|
+
throw new ArgumentsRequired(this.id + ' fetchFundingHistory() requires a symbol argument');
|
|
1121
|
+
}
|
|
1120
1122
|
await this.loadMarkets();
|
|
1121
1123
|
const market = this.market(symbol);
|
|
1122
1124
|
const request = {
|
|
@@ -1183,7 +1185,7 @@ export default class poloniexfutures extends Exchange {
|
|
|
1183
1185
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
1184
1186
|
* @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
|
|
1185
1187
|
* @param {object} [params.stop] When true, all the trigger orders will be cancelled
|
|
1186
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
1188
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1187
1189
|
*/
|
|
1188
1190
|
await this.loadMarkets();
|
|
1189
1191
|
const request = {};
|
|
@@ -1251,7 +1253,7 @@ export default class poloniexfutures extends Exchange {
|
|
|
1251
1253
|
* @param {int} [params.until] End time in ms
|
|
1252
1254
|
* @param {string} [params.side] buy or sell
|
|
1253
1255
|
* @param {string} [params.type] limit or market
|
|
1254
|
-
* @returns An [array of order structures]{@link https://
|
|
1256
|
+
* @returns An [array of order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1255
1257
|
*/
|
|
1256
1258
|
await this.loadMarkets();
|
|
1257
1259
|
const stop = this.safeValue(params, 'stop');
|
|
@@ -1354,7 +1356,7 @@ export default class poloniexfutures extends Exchange {
|
|
|
1354
1356
|
* @param {int} [params.till] end time in ms
|
|
1355
1357
|
* @param {string} [params.side] buy or sell
|
|
1356
1358
|
* @param {string} [params.type] limit, or market
|
|
1357
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1359
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1358
1360
|
*/
|
|
1359
1361
|
return await this.fetchOrdersByStatus('open', symbol, since, limit, params);
|
|
1360
1362
|
}
|
|
@@ -1372,7 +1374,7 @@ export default class poloniexfutures extends Exchange {
|
|
|
1372
1374
|
* @param {int} [params.till] end time in ms
|
|
1373
1375
|
* @param {string} [params.side] buy or sell
|
|
1374
1376
|
* @param {string} [params.type] limit, or market
|
|
1375
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1377
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1376
1378
|
*/
|
|
1377
1379
|
return await this.fetchOrdersByStatus('closed', symbol, since, limit, params);
|
|
1378
1380
|
}
|
|
@@ -1385,7 +1387,7 @@ export default class poloniexfutures extends Exchange {
|
|
|
1385
1387
|
* @see https://futures-docs.poloniex.com/#get-single-order-by-clientoid
|
|
1386
1388
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1387
1389
|
* @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
|
|
1388
|
-
* @returns {object} An [order structure]{@link https://
|
|
1390
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1389
1391
|
*/
|
|
1390
1392
|
await this.loadMarkets();
|
|
1391
1393
|
const request = {};
|
|
@@ -1584,7 +1586,7 @@ export default class poloniexfutures extends Exchange {
|
|
|
1584
1586
|
* @see https://futures-docs.poloniex.com/#get-premium-index
|
|
1585
1587
|
* @param {string} symbol unified market symbol
|
|
1586
1588
|
* @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
|
|
1587
|
-
* @returns {object} a [funding rate structure]{@link https://
|
|
1589
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
1588
1590
|
*/
|
|
1589
1591
|
await this.loadMarkets();
|
|
1590
1592
|
const market = this.market(symbol);
|
|
@@ -1638,7 +1640,7 @@ export default class poloniexfutures extends Exchange {
|
|
|
1638
1640
|
* @param {string} side buy or sell
|
|
1639
1641
|
* @param {string} type limit, market, limit_stop or market_stop
|
|
1640
1642
|
* @param {int} endAt end time (milisecond)
|
|
1641
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
1643
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1642
1644
|
*/
|
|
1643
1645
|
await this.loadMarkets();
|
|
1644
1646
|
const request = {};
|
|
@@ -1699,7 +1701,9 @@ export default class poloniexfutures extends Exchange {
|
|
|
1699
1701
|
* @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
|
|
1700
1702
|
* @returns {object} response from the exchange
|
|
1701
1703
|
*/
|
|
1702
|
-
|
|
1704
|
+
if (symbol === undefined) {
|
|
1705
|
+
throw new ArgumentsRequired(this.id + ' setMarginMode() requires a symbol argument');
|
|
1706
|
+
}
|
|
1703
1707
|
if ((marginMode !== 0) && (marginMode !== 1)) {
|
|
1704
1708
|
throw new ArgumentsRequired(this.id + ' setMarginMode() marginMode must be 0 (isolated) or 1 (cross)');
|
|
1705
1709
|
}
|
package/js/src/pro/alpaca.js
CHANGED
|
@@ -54,7 +54,7 @@ export default class alpaca extends alpacaRest {
|
|
|
54
54
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
55
55
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
56
56
|
* @param {object} [params] extra parameters specific to the alpaca api endpoint
|
|
57
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
57
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
58
58
|
*/
|
|
59
59
|
const url = this.urls['api']['ws']['crypto'];
|
|
60
60
|
await this.authenticate(url);
|
|
@@ -186,7 +186,7 @@ export default class alpaca extends alpacaRest {
|
|
|
186
186
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
187
187
|
* @param {int} [limit] the maximum amount of order book entries to return.
|
|
188
188
|
* @param {object} [params] extra parameters specific to the alpaca api endpoint
|
|
189
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
189
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
190
190
|
*/
|
|
191
191
|
const url = this.urls['api']['ws']['crypto'];
|
|
192
192
|
await this.authenticate(url);
|
|
@@ -266,7 +266,7 @@ export default class alpaca extends alpacaRest {
|
|
|
266
266
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
267
267
|
* @param {int} [limit] the maximum number of trade structures to retrieve
|
|
268
268
|
* @param {object} [params] extra parameters specific to the alpaca api endpoint
|
|
269
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
269
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure
|
|
270
270
|
*/
|
|
271
271
|
const url = this.urls['api']['ws']['crypto'];
|
|
272
272
|
await this.authenticate(url);
|
|
@@ -319,7 +319,7 @@ export default class alpaca extends alpacaRest {
|
|
|
319
319
|
* @param {int} [limit] the maximum number of trade structures to retrieve
|
|
320
320
|
* @param {object} [params] extra parameters specific to the alpaca api endpoint
|
|
321
321
|
* @param {boolean} [params.unifiedMargin] use unified margin account
|
|
322
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
322
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure
|
|
323
323
|
*/
|
|
324
324
|
const url = this.urls['api']['ws']['trading'];
|
|
325
325
|
await this.authenticate(url);
|
|
@@ -350,7 +350,7 @@ export default class alpaca extends alpacaRest {
|
|
|
350
350
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
351
351
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
352
352
|
* @param {object} [params] extra parameters specific to the alpaca api endpoint
|
|
353
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
353
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure
|
|
354
354
|
*/
|
|
355
355
|
const url = this.urls['api']['ws']['trading'];
|
|
356
356
|
await this.authenticate(url);
|
package/js/src/pro/ascendex.js
CHANGED
|
@@ -147,7 +147,7 @@ export default class ascendex extends ascendexRest {
|
|
|
147
147
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
148
148
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
149
149
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
150
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
150
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
151
151
|
*/
|
|
152
152
|
await this.loadMarkets();
|
|
153
153
|
const market = this.market(symbol);
|
|
@@ -207,7 +207,7 @@ export default class ascendex extends ascendexRest {
|
|
|
207
207
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
208
208
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
209
209
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
210
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
210
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
211
211
|
*/
|
|
212
212
|
await this.loadMarkets();
|
|
213
213
|
const market = this.market(symbol);
|
|
@@ -352,7 +352,7 @@ export default class ascendex extends ascendexRest {
|
|
|
352
352
|
* @name ascendex#watchBalance
|
|
353
353
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
354
354
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
355
|
-
* @returns {object} a [balance structure]{@link https://
|
|
355
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
356
356
|
*/
|
|
357
357
|
await this.loadMarkets();
|
|
358
358
|
const [type, query] = this.handleMarketTypeAndParams('watchBalance', undefined, params);
|
|
@@ -480,7 +480,7 @@ export default class ascendex extends ascendexRest {
|
|
|
480
480
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
481
481
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
482
482
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
483
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
483
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
484
484
|
*/
|
|
485
485
|
await this.loadMarkets();
|
|
486
486
|
let market = undefined;
|
package/js/src/pro/binance.js
CHANGED
|
@@ -143,7 +143,7 @@ export default class binance extends binanceRest {
|
|
|
143
143
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
144
144
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
145
145
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
146
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
146
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
147
147
|
*/
|
|
148
148
|
//
|
|
149
149
|
// todo add support for <levels>-snapshots (depth)
|
|
@@ -545,7 +545,7 @@ export default class binance extends binanceRest {
|
|
|
545
545
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
546
546
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
547
547
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
548
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
548
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
549
549
|
*/
|
|
550
550
|
await this.loadMarkets();
|
|
551
551
|
const market = this.market(symbol);
|
|
@@ -938,7 +938,7 @@ export default class binance extends binanceRest {
|
|
|
938
938
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
939
939
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
940
940
|
* @param {string} [params.name] stream to use can be ticker or bookTicker
|
|
941
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
941
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
942
942
|
*/
|
|
943
943
|
await this.loadMarkets();
|
|
944
944
|
const market = this.market(symbol);
|
|
@@ -973,7 +973,7 @@ export default class binance extends binanceRest {
|
|
|
973
973
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
|
|
974
974
|
* @param {string[]} symbols unified symbol of the market to fetch the ticker for
|
|
975
975
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
976
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
976
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
977
977
|
*/
|
|
978
978
|
await this.loadMarkets();
|
|
979
979
|
symbols = this.marketSymbols(symbols, undefined, true, true, true);
|
|
@@ -1393,7 +1393,7 @@ export default class binance extends binanceRest {
|
|
|
1393
1393
|
* @param {string|undefined} [params.type] 'future', 'delivery', 'savings', 'funding', or 'spot'
|
|
1394
1394
|
* @param {string|undefined} [params.marginMode] 'cross' or 'isolated', for margin trading, uses this.options.defaultMarginMode if not passed, defaults to undefined/None/null
|
|
1395
1395
|
* @param {string[]|undefined} [params.symbols] unified market symbols, only used in isolated margin mode
|
|
1396
|
-
* @returns {object} a [balance structure]{@link https://
|
|
1396
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
1397
1397
|
*/
|
|
1398
1398
|
await this.loadMarkets();
|
|
1399
1399
|
const url = this.urls['api']['ws']['ws'];
|
|
@@ -1470,7 +1470,7 @@ export default class binance extends binanceRest {
|
|
|
1470
1470
|
* @name binance#watchBalance
|
|
1471
1471
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
1472
1472
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
1473
|
-
* @returns {object} a [balance structure]{@link https://
|
|
1473
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
1474
1474
|
*/
|
|
1475
1475
|
await this.loadMarkets();
|
|
1476
1476
|
await this.authenticate(params);
|
|
@@ -1638,7 +1638,7 @@ export default class binance extends binanceRest {
|
|
|
1638
1638
|
* @param {float|undefined} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1639
1639
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
1640
1640
|
* @param {boolean} params.test test order, default false
|
|
1641
|
-
* @returns {object} an [order structure]{@link https://
|
|
1641
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1642
1642
|
*/
|
|
1643
1643
|
await this.loadMarkets();
|
|
1644
1644
|
this.checkIsSpot('createOrderWs', symbol, params);
|
|
@@ -1772,7 +1772,7 @@ export default class binance extends binanceRest {
|
|
|
1772
1772
|
* @param {float} amount how much of the currency you want to trade in units of the base currency
|
|
1773
1773
|
* @param {float|undefined} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1774
1774
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
1775
|
-
* @returns {object} an [order structure]{@link https://
|
|
1775
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1776
1776
|
*/
|
|
1777
1777
|
await this.loadMarkets();
|
|
1778
1778
|
this.checkIsSpot('editOrderWs', symbol, params);
|
|
@@ -1876,7 +1876,7 @@ export default class binance extends binanceRest {
|
|
|
1876
1876
|
* @param {string} symbol unified market symbol, default is undefined
|
|
1877
1877
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
1878
1878
|
* @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.
|
|
1879
|
-
* @returns {object} an list of [order structures]{@link https://
|
|
1879
|
+
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1880
1880
|
*/
|
|
1881
1881
|
await this.loadMarkets();
|
|
1882
1882
|
if (symbol === undefined) {
|
|
@@ -1918,7 +1918,7 @@ export default class binance extends binanceRest {
|
|
|
1918
1918
|
* @description cancel all open orders in a market
|
|
1919
1919
|
* @param {string} symbol unified market symbol of the market to cancel orders in
|
|
1920
1920
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
1921
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
1921
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1922
1922
|
*/
|
|
1923
1923
|
await this.loadMarkets();
|
|
1924
1924
|
const url = this.urls['api']['ws']['ws'];
|
|
@@ -1948,7 +1948,7 @@ export default class binance extends binanceRest {
|
|
|
1948
1948
|
* @description fetches information on an order made by the user
|
|
1949
1949
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1950
1950
|
* @param {object} params extra parameters specific to the binance api endpoint
|
|
1951
|
-
* @returns {object} An [order structure]{@link https://
|
|
1951
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1952
1952
|
*/
|
|
1953
1953
|
await this.loadMarkets();
|
|
1954
1954
|
if (symbol === undefined) {
|
|
@@ -1995,7 +1995,7 @@ export default class binance extends binanceRest {
|
|
|
1995
1995
|
* @param {int} [params.startTime] earliest time in ms to retrieve orders for
|
|
1996
1996
|
* @param {int} [params.endTime] latest time in ms to retrieve orders for
|
|
1997
1997
|
* @param {int} [params.limit] the maximum number of order structures to retrieve
|
|
1998
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
1998
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1999
1999
|
*/
|
|
2000
2000
|
await this.loadMarkets();
|
|
2001
2001
|
if (symbol === undefined) {
|
|
@@ -2032,7 +2032,7 @@ export default class binance extends binanceRest {
|
|
|
2032
2032
|
* @param {int|undefined} [since] the earliest time in ms to fetch open orders for
|
|
2033
2033
|
* @param {int|undefined} [limit] the maximum number of open orders structures to retrieve
|
|
2034
2034
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
2035
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
2035
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2036
2036
|
*/
|
|
2037
2037
|
await this.loadMarkets();
|
|
2038
2038
|
this.checkIsSpot('fetchOpenOrdersWs', symbol);
|
|
@@ -2067,7 +2067,7 @@ export default class binance extends binanceRest {
|
|
|
2067
2067
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
2068
2068
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
2069
2069
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
2070
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
2070
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2071
2071
|
*/
|
|
2072
2072
|
await this.loadMarkets();
|
|
2073
2073
|
let messageHash = 'orders';
|
|
@@ -2545,7 +2545,7 @@ export default class binance extends binanceRest {
|
|
|
2545
2545
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
2546
2546
|
* @param {int} [params.endTime] the latest time in ms to fetch trades for
|
|
2547
2547
|
* @param {int} [params.fromId] first trade Id to fetch
|
|
2548
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
2548
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
2549
2549
|
*/
|
|
2550
2550
|
await this.loadMarkets();
|
|
2551
2551
|
if (symbol === undefined) {
|
|
@@ -2620,7 +2620,7 @@ export default class binance extends binanceRest {
|
|
|
2620
2620
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
2621
2621
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
2622
2622
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
2623
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
2623
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure
|
|
2624
2624
|
*/
|
|
2625
2625
|
await this.loadMarkets();
|
|
2626
2626
|
let type = undefined;
|
package/js/src/pro/bingx.js
CHANGED
|
@@ -484,7 +484,7 @@ export default class bingx extends bingxRest {
|
|
|
484
484
|
* @param {int} [since] the earliest time in ms to trades orders for
|
|
485
485
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
486
486
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
487
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
487
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure
|
|
488
488
|
*/
|
|
489
489
|
await this.loadMarkets();
|
|
490
490
|
await this.authenticate();
|
package/js/src/pro/bitfinex.js
CHANGED
|
@@ -64,7 +64,7 @@ export default class bitfinex extends bitfinexRest {
|
|
|
64
64
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
65
65
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
66
66
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
67
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
67
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
68
68
|
*/
|
|
69
69
|
await this.loadMarkets();
|
|
70
70
|
symbol = this.symbol(symbol);
|
|
@@ -81,7 +81,7 @@ export default class bitfinex extends bitfinexRest {
|
|
|
81
81
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
82
82
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
83
83
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
84
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
84
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
85
85
|
*/
|
|
86
86
|
return await this.subscribe('ticker', symbol, params);
|
|
87
87
|
}
|
|
@@ -256,7 +256,7 @@ export default class bitfinex extends bitfinexRest {
|
|
|
256
256
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
257
257
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
258
258
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
259
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
259
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
260
260
|
*/
|
|
261
261
|
if (limit !== undefined) {
|
|
262
262
|
if ((limit !== 25) && (limit !== 100)) {
|
|
@@ -463,7 +463,7 @@ export default class bitfinex extends bitfinexRest {
|
|
|
463
463
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
464
464
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
465
465
|
* @param {object} [params] extra parameters specific to the bitfinex api endpoint
|
|
466
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
466
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
467
467
|
*/
|
|
468
468
|
await this.loadMarkets();
|
|
469
469
|
await this.authenticate();
|
|
@@ -20,7 +20,7 @@ export default class bitfinex2 extends bitfinex2Rest {
|
|
|
20
20
|
handleChecksum(client: Client, message: any, subscription: any): void;
|
|
21
21
|
watchBalance(params?: {}): Promise<any>;
|
|
22
22
|
handleBalance(client: Client, message: any, subscription: any): void;
|
|
23
|
-
parseWsBalance(balance: any): import("../base/types.js").
|
|
23
|
+
parseWsBalance(balance: any): import("../base/types.js").Account;
|
|
24
24
|
handleSystemStatus(client: Client, message: any): any;
|
|
25
25
|
handleSubscriptionStatus(client: Client, message: any): any;
|
|
26
26
|
authenticate(params?: {}): Promise<any>;
|
package/js/src/pro/bitfinex2.js
CHANGED
|
@@ -196,7 +196,7 @@ export default class bitfinex2 extends bitfinex2Rest {
|
|
|
196
196
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
197
197
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
198
198
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
199
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
199
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
200
200
|
*/
|
|
201
201
|
const trades = await this.subscribe('trades', symbol, params);
|
|
202
202
|
if (this.newUpdates) {
|
|
@@ -213,7 +213,7 @@ export default class bitfinex2 extends bitfinex2Rest {
|
|
|
213
213
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
214
214
|
* @param {int} [limit] the maximum number of trade structures to retrieve
|
|
215
215
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
216
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
216
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure
|
|
217
217
|
*/
|
|
218
218
|
await this.loadMarkets();
|
|
219
219
|
let messageHash = 'myTrade';
|
|
@@ -234,7 +234,7 @@ export default class bitfinex2 extends bitfinex2Rest {
|
|
|
234
234
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
235
235
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
236
236
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
237
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
237
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
238
238
|
*/
|
|
239
239
|
return await this.subscribe('ticker', symbol, params);
|
|
240
240
|
}
|
|
@@ -524,7 +524,7 @@ export default class bitfinex2 extends bitfinex2Rest {
|
|
|
524
524
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
525
525
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
526
526
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
527
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
527
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
528
528
|
*/
|
|
529
529
|
if (limit !== undefined) {
|
|
530
530
|
if ((limit !== 25) && (limit !== 100)) {
|
|
@@ -690,7 +690,7 @@ export default class bitfinex2 extends bitfinex2Rest {
|
|
|
690
690
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
691
691
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
692
692
|
* @param {str} [params.type] spot or contract if not provided this.options['defaultType'] is used
|
|
693
|
-
* @returns {object} a [balance structure]{@link https://
|
|
693
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
694
694
|
*/
|
|
695
695
|
await this.loadMarkets();
|
|
696
696
|
const balanceType = this.safeString(params, 'wallet', 'exchange'); // exchange, margin
|
|
@@ -887,7 +887,7 @@ export default class bitfinex2 extends bitfinex2Rest {
|
|
|
887
887
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
888
888
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
889
889
|
* @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
|
|
890
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
890
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure
|
|
891
891
|
*/
|
|
892
892
|
await this.loadMarkets();
|
|
893
893
|
let messageHash = 'orders';
|
package/js/src/pro/bitget.js
CHANGED
|
@@ -132,7 +132,7 @@ export default class bitget extends bitgetRest {
|
|
|
132
132
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
133
133
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
134
134
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
135
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
135
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
136
136
|
*/
|
|
137
137
|
await this.loadMarkets();
|
|
138
138
|
const market = this.market(symbol);
|
|
@@ -153,7 +153,7 @@ export default class bitget extends bitgetRest {
|
|
|
153
153
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
|
|
154
154
|
* @param {string[]} symbols unified symbol of the market to fetch the ticker for
|
|
155
155
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
156
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
156
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
157
157
|
*/
|
|
158
158
|
await this.loadMarkets();
|
|
159
159
|
symbols = this.marketSymbols(symbols, undefined, false);
|
|
@@ -456,7 +456,7 @@ export default class bitget extends bitgetRest {
|
|
|
456
456
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
457
457
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
458
458
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
459
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
459
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
460
460
|
*/
|
|
461
461
|
await this.loadMarkets();
|
|
462
462
|
const market = this.market(symbol);
|
|
@@ -630,7 +630,7 @@ export default class bitget extends bitgetRest {
|
|
|
630
630
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
631
631
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
632
632
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
633
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
633
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
634
634
|
*/
|
|
635
635
|
await this.loadMarkets();
|
|
636
636
|
const market = this.market(symbol);
|
|
@@ -945,7 +945,7 @@ export default class bitget extends bitgetRest {
|
|
|
945
945
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
946
946
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
947
947
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
948
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
948
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure
|
|
949
949
|
*/
|
|
950
950
|
await this.loadMarkets();
|
|
951
951
|
let market = undefined;
|
|
@@ -1268,7 +1268,7 @@ export default class bitget extends bitgetRest {
|
|
|
1268
1268
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1269
1269
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
1270
1270
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
1271
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
1271
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1272
1272
|
*/
|
|
1273
1273
|
// only contracts stream provides the trade info consistently in between order updates
|
|
1274
1274
|
// the spot stream only provides on limit orders updates so we can't support it for spot
|
|
@@ -1420,7 +1420,7 @@ export default class bitget extends bitgetRest {
|
|
|
1420
1420
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
1421
1421
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
1422
1422
|
* @param {str} [params.type] spot or contract if not provided this.options['defaultType'] is used
|
|
1423
|
-
* @returns {object} a [balance structure]{@link https://
|
|
1423
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
1424
1424
|
*/
|
|
1425
1425
|
let type = undefined;
|
|
1426
1426
|
[type, params] = this.handleMarketTypeAndParams('watchOrders', undefined, params);
|
package/js/src/pro/bitmart.js
CHANGED
|
@@ -90,7 +90,7 @@ export default class bitmart extends bitmartRest {
|
|
|
90
90
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
91
91
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
92
92
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
93
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
93
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
94
94
|
*/
|
|
95
95
|
await this.loadMarkets();
|
|
96
96
|
symbol = this.symbol(symbol);
|
|
@@ -107,7 +107,7 @@ export default class bitmart extends bitmartRest {
|
|
|
107
107
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
108
108
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
109
109
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
110
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
110
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
111
111
|
*/
|
|
112
112
|
return await this.subscribe('ticker', symbol, params);
|
|
113
113
|
}
|
|
@@ -120,9 +120,11 @@ export default class bitmart extends bitmartRest {
|
|
|
120
120
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
121
121
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
122
122
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
123
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
123
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
124
124
|
*/
|
|
125
|
-
|
|
125
|
+
if (symbol === undefined) {
|
|
126
|
+
throw new ArgumentsRequired(this.id + ' watchOrders() requires a symbol argument');
|
|
127
|
+
}
|
|
126
128
|
await this.loadMarkets();
|
|
127
129
|
const market = this.market(symbol);
|
|
128
130
|
symbol = market['symbol'];
|
|
@@ -385,7 +387,7 @@ export default class bitmart extends bitmartRest {
|
|
|
385
387
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
386
388
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
387
389
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
388
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
390
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
389
391
|
*/
|
|
390
392
|
const options = this.safeValue(this.options, 'watchOrderBook', {});
|
|
391
393
|
const depth = this.safeString(options, 'depth', 'depth50');
|