ccxt 4.1.55 → 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/CONTRIBUTING.md +1 -1
- package/README.md +6 -6
- package/build.sh +30 -8
- package/dist/ccxt.browser.js +5592 -4907
- package/dist/ccxt.browser.min.js +13 -13
- 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 +17 -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 +129 -94
- 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 +101 -78
- 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 +135 -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 +92 -84
- package/dist/cjs/src/p2b.js +80 -83
- 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/bitbank.d.ts +1 -0
- package/js/src/abstract/bybit.d.ts +1 -0
- package/js/src/abstract/cryptocom.d.ts +0 -20
- package/js/src/abstract/htx.d.ts +3 -0
- package/js/src/abstract/huobi.d.ts +3 -0
- package/js/src/abstract/huobipro.d.ts +3 -0
- package/js/src/abstract/okex.d.ts +3 -1
- package/js/src/abstract/okex5.d.ts +3 -1
- package/js/src/abstract/okx.d.ts +3 -1
- 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 +17 -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 +129 -94
- 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 +101 -78
- 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 +135 -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 +92 -84
- package/js/src/p2b.d.ts +8 -7
- package/js/src/p2b.js +80 -82
- 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 +2 -2
- package/js/src/bitstamp1.d.ts +0 -28
- package/js/src/bitstamp1.js +0 -430
- package/js/src/lbank2.d.ts +0 -90
- package/js/src/lbank2.js +0 -2779
package/js/src/pro/bitmex.js
CHANGED
|
@@ -59,7 +59,7 @@ export default class bitmex extends bitmexRest {
|
|
|
59
59
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
60
60
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
61
61
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
62
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
62
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
63
63
|
*/
|
|
64
64
|
await this.loadMarkets();
|
|
65
65
|
const market = this.market(symbol);
|
|
@@ -323,7 +323,7 @@ export default class bitmex extends bitmexRest {
|
|
|
323
323
|
* @name bitmex#watchBalance
|
|
324
324
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
325
325
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
326
|
-
* @returns {object} a [balance structure]{@link https://
|
|
326
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
327
327
|
*/
|
|
328
328
|
await this.loadMarkets();
|
|
329
329
|
await this.authenticate();
|
|
@@ -534,7 +534,7 @@ export default class bitmex extends bitmexRest {
|
|
|
534
534
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
535
535
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
536
536
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
537
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
537
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
538
538
|
*/
|
|
539
539
|
await this.loadMarkets();
|
|
540
540
|
const market = this.market(symbol);
|
|
@@ -603,7 +603,7 @@ export default class bitmex extends bitmexRest {
|
|
|
603
603
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
604
604
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
605
605
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
606
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
606
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
607
607
|
*/
|
|
608
608
|
await this.loadMarkets();
|
|
609
609
|
await this.authenticate();
|
|
@@ -818,7 +818,7 @@ export default class bitmex extends bitmexRest {
|
|
|
818
818
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
819
819
|
* @param {int} [limit] the maximum number of trade structures to retrieve
|
|
820
820
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
821
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
821
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure
|
|
822
822
|
*/
|
|
823
823
|
await this.loadMarkets();
|
|
824
824
|
await this.authenticate();
|
|
@@ -934,7 +934,7 @@ export default class bitmex extends bitmexRest {
|
|
|
934
934
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
935
935
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
936
936
|
* @param {object} [params] extra parameters specific to the bitmex api endpoint
|
|
937
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
937
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
938
938
|
*/
|
|
939
939
|
let table = undefined;
|
|
940
940
|
if (limit === undefined) {
|
package/js/src/pro/bitopro.js
CHANGED
|
@@ -59,7 +59,7 @@ export default class bitopro extends bitoproRest {
|
|
|
59
59
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
60
60
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
61
61
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
62
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
62
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
63
63
|
*/
|
|
64
64
|
if (limit !== undefined) {
|
|
65
65
|
if ((limit !== 5) && (limit !== 10) && (limit !== 20) && (limit !== 50) && (limit !== 100) && (limit !== 500) && (limit !== 1000)) {
|
|
@@ -125,7 +125,7 @@ export default class bitopro extends bitoproRest {
|
|
|
125
125
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
126
126
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
127
127
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
128
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
128
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
129
129
|
*/
|
|
130
130
|
await this.loadMarkets();
|
|
131
131
|
const market = this.market(symbol);
|
|
@@ -182,7 +182,7 @@ export default class bitopro extends bitoproRest {
|
|
|
182
182
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
183
183
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
184
184
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
185
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
185
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
186
186
|
*/
|
|
187
187
|
await this.loadMarkets();
|
|
188
188
|
const market = this.market(symbol);
|
|
@@ -260,7 +260,7 @@ export default class bitopro extends bitoproRest {
|
|
|
260
260
|
* @name bitopro#watchBalance
|
|
261
261
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
262
262
|
* @param {object} [params] extra parameters specific to the bitopro api endpoint
|
|
263
|
-
* @returns {object} a [balance structure]{@link https://
|
|
263
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
264
264
|
*/
|
|
265
265
|
this.checkRequiredCredentials();
|
|
266
266
|
await this.loadMarkets();
|
package/js/src/pro/bitpanda.js
CHANGED
|
@@ -83,7 +83,7 @@ export default class bitpanda extends bitpandaRest {
|
|
|
83
83
|
* @see https://developers.bitpanda.com/exchange/#account-history-channel
|
|
84
84
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
85
85
|
* @param {object} [params] extra parameters specific to the bitpanda api endpoint
|
|
86
|
-
* @returns {object} a [balance structure]{@link https://
|
|
86
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
87
87
|
*/
|
|
88
88
|
await this.authenticate(params);
|
|
89
89
|
const url = this.urls['api']['ws'];
|
|
@@ -143,7 +143,7 @@ export default class bitpanda extends bitpandaRest {
|
|
|
143
143
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
144
144
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
145
145
|
* @param {object} [params] extra parameters specific to the bitpanda api endpoint
|
|
146
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
146
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
147
147
|
*/
|
|
148
148
|
await this.loadMarkets();
|
|
149
149
|
const market = this.market(symbol);
|
|
@@ -169,7 +169,7 @@ export default class bitpanda extends bitpandaRest {
|
|
|
169
169
|
* @description watches price tickers, a statistical calculation with the information for all markets or those specified.
|
|
170
170
|
* @param {string} symbols unified symbols of the markets to fetch the ticker for
|
|
171
171
|
* @param {object} [params] extra parameters specific to the bitpanda api endpoint
|
|
172
|
-
* @returns {object} an array of [ticker structure]{@link https://
|
|
172
|
+
* @returns {object} an array of [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
173
173
|
*/
|
|
174
174
|
await this.loadMarkets();
|
|
175
175
|
symbols = this.marketSymbols(symbols);
|
|
@@ -267,7 +267,7 @@ export default class bitpanda extends bitpandaRest {
|
|
|
267
267
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
268
268
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
269
269
|
* @param {object} [params] extra parameters specific to the bitpanda api endpoint
|
|
270
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
270
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
271
271
|
*/
|
|
272
272
|
await this.loadMarkets();
|
|
273
273
|
let messageHash = 'myTrades';
|
|
@@ -310,7 +310,7 @@ export default class bitpanda extends bitpandaRest {
|
|
|
310
310
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
311
311
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
312
312
|
* @param {object} [params] extra parameters specific to the bitpanda api endpoint
|
|
313
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
313
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
314
314
|
*/
|
|
315
315
|
await this.loadMarkets();
|
|
316
316
|
const market = this.market(symbol);
|
|
@@ -429,7 +429,7 @@ export default class bitpanda extends bitpandaRest {
|
|
|
429
429
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
430
430
|
* @param {object} [params] extra parameters specific to the bitpanda api endpoint
|
|
431
431
|
* @param {string} [params.channel] can listen to orders using ACCOUNT_HISTORY or TRADING
|
|
432
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
432
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
433
433
|
*/
|
|
434
434
|
await this.loadMarkets();
|
|
435
435
|
let messageHash = 'orders';
|
package/js/src/pro/bitrue.js
CHANGED
|
@@ -61,7 +61,7 @@ export default class bitrue extends bitrueRest {
|
|
|
61
61
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
62
62
|
* @see https://github.com/Bitrue-exchange/Spot-official-api-docs#balance-update
|
|
63
63
|
* @param {object} [params] extra parameters specific to the bitrue api endpoint
|
|
64
|
-
* @returns {object} a [balance structure]{@link https://
|
|
64
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
65
65
|
*/
|
|
66
66
|
const url = await this.authenticate();
|
|
67
67
|
const messageHash = 'balance';
|
|
@@ -176,7 +176,7 @@ export default class bitrue extends bitrueRest {
|
|
|
176
176
|
* @param {int} [since] timestamp in ms of the earliest order
|
|
177
177
|
* @param {int} [limit] the maximum amount of orders to return
|
|
178
178
|
* @param {object} [params] extra parameters specific to the bitrue api endpoint
|
|
179
|
-
* @returns {object} A dictionary of [order structure]{@link https://
|
|
179
|
+
* @returns {object} A dictionary of [order structure]{@link https://docs.ccxt.com/#/?id=order-structure} indexed by market symbols
|
|
180
180
|
*/
|
|
181
181
|
await this.loadMarkets();
|
|
182
182
|
if (symbol !== undefined) {
|
package/js/src/pro/bitstamp.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
// ---------------------------------------------------------------------------
|
|
8
8
|
import bitstampRest from '../bitstamp.js';
|
|
9
|
-
import { AuthenticationError } from '../base/errors.js';
|
|
9
|
+
import { ArgumentsRequired, AuthenticationError } from '../base/errors.js';
|
|
10
10
|
import { ArrayCache, ArrayCacheBySymbolById } from '../base/ws/Cache.js';
|
|
11
11
|
// ---------------------------------------------------------------------------
|
|
12
12
|
export default class bitstamp extends bitstampRest {
|
|
@@ -52,7 +52,7 @@ export default class bitstamp extends bitstampRest {
|
|
|
52
52
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
53
53
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
54
54
|
* @param {object} [params] extra parameters specific to the bitstamp api endpoint
|
|
55
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
55
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
56
56
|
*/
|
|
57
57
|
await this.loadMarkets();
|
|
58
58
|
const market = this.market(symbol);
|
|
@@ -164,7 +164,7 @@ export default class bitstamp extends bitstampRest {
|
|
|
164
164
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
165
165
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
166
166
|
* @param {object} [params] extra parameters specific to the bitstamp api endpoint
|
|
167
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
167
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
168
168
|
*/
|
|
169
169
|
await this.loadMarkets();
|
|
170
170
|
const market = this.market(symbol);
|
|
@@ -271,9 +271,11 @@ export default class bitstamp extends bitstampRest {
|
|
|
271
271
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
272
272
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
273
273
|
* @param {object} [params] extra parameters specific to the bitstamp api endpoint
|
|
274
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
274
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
275
275
|
*/
|
|
276
|
-
|
|
276
|
+
if (symbol === undefined) {
|
|
277
|
+
throw new ArgumentsRequired(this.id + ' watchOrders() requires a symbol argument');
|
|
278
|
+
}
|
|
277
279
|
await this.loadMarkets();
|
|
278
280
|
const market = this.market(symbol);
|
|
279
281
|
symbol = market['symbol'];
|
package/js/src/pro/bittrex.js
CHANGED
|
@@ -218,7 +218,7 @@ export default class bittrex extends bittrexRest {
|
|
|
218
218
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
219
219
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
220
220
|
* @param {object} [params] extra parameters specific to the bittrex api endpoint
|
|
221
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
221
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
222
222
|
*/
|
|
223
223
|
await this.loadMarkets();
|
|
224
224
|
if (symbol !== undefined) {
|
|
@@ -274,7 +274,7 @@ export default class bittrex extends bittrexRest {
|
|
|
274
274
|
* @name bittrex#watchBalance
|
|
275
275
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
276
276
|
* @param {object} [params] extra parameters specific to the bittrex api endpoint
|
|
277
|
-
* @returns {object} a [balance structure]{@link https://
|
|
277
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
278
278
|
*/
|
|
279
279
|
await this.loadMarkets();
|
|
280
280
|
const authentication = await this.authenticate();
|
|
@@ -343,7 +343,7 @@ export default class bittrex extends bittrexRest {
|
|
|
343
343
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
344
344
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
345
345
|
* @param {object} [params] extra parameters specific to the bittrex api endpoint
|
|
346
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
346
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
347
347
|
*/
|
|
348
348
|
await this.loadMarkets();
|
|
349
349
|
const negotiation = await this.negotiate();
|
|
@@ -464,7 +464,7 @@ export default class bittrex extends bittrexRest {
|
|
|
464
464
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
465
465
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
466
466
|
* @param {object} [params] extra parameters specific to the bittrex api endpoint
|
|
467
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
467
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
468
468
|
*/
|
|
469
469
|
await this.loadMarkets();
|
|
470
470
|
symbol = this.symbol(symbol);
|
|
@@ -530,7 +530,7 @@ export default class bittrex extends bittrexRest {
|
|
|
530
530
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
531
531
|
* @param {int} [limit] the maximum number of trade structures to retrieve
|
|
532
532
|
* @param {object} [params] extra parameters specific to the bittrex api endpoint
|
|
533
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
533
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure
|
|
534
534
|
*/
|
|
535
535
|
await this.loadMarkets();
|
|
536
536
|
if (symbol !== undefined) {
|
|
@@ -588,7 +588,7 @@ export default class bittrex extends bittrexRest {
|
|
|
588
588
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
589
589
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
590
590
|
* @param {object} [params] extra parameters specific to the bittrex api endpoint
|
|
591
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
591
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
592
592
|
*/
|
|
593
593
|
limit = (limit === undefined) ? 25 : limit; // 25 by default
|
|
594
594
|
if ((limit !== 1) && (limit !== 25) && (limit !== 500)) {
|
package/js/src/pro/bitvavo.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
// ---------------------------------------------------------------------------
|
|
8
8
|
import bitvavoRest from '../bitvavo.js';
|
|
9
|
-
import { AuthenticationError } from '../base/errors.js';
|
|
9
|
+
import { ArgumentsRequired, AuthenticationError } from '../base/errors.js';
|
|
10
10
|
import { ArrayCache, ArrayCacheByTimestamp, ArrayCacheBySymbolById } from '../base/ws/Cache.js';
|
|
11
11
|
import { sha256 } from '../static_dependencies/noble-hashes/sha256.js';
|
|
12
12
|
// ---------------------------------------------------------------------------
|
|
@@ -60,7 +60,7 @@ export default class bitvavo extends bitvavoRest {
|
|
|
60
60
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
61
61
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
62
62
|
* @param {object} [params] extra parameters specific to the bitvavo api endpoint
|
|
63
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
63
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
64
64
|
*/
|
|
65
65
|
return await this.watchPublic('ticker24h', symbol, params);
|
|
66
66
|
}
|
|
@@ -109,7 +109,7 @@ export default class bitvavo extends bitvavoRest {
|
|
|
109
109
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
110
110
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
111
111
|
* @param {object} [params] extra parameters specific to the bitvavo api endpoint
|
|
112
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
112
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
113
113
|
*/
|
|
114
114
|
await this.loadMarkets();
|
|
115
115
|
symbol = this.symbol(symbol);
|
|
@@ -232,7 +232,7 @@ export default class bitvavo extends bitvavoRest {
|
|
|
232
232
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
233
233
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
234
234
|
* @param {object} [params] extra parameters specific to the bitvavo api endpoint
|
|
235
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
235
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
236
236
|
*/
|
|
237
237
|
await this.loadMarkets();
|
|
238
238
|
const market = this.market(symbol);
|
|
@@ -423,9 +423,11 @@ export default class bitvavo extends bitvavoRest {
|
|
|
423
423
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
424
424
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
425
425
|
* @param {object} [params] extra parameters specific to the bitvavo api endpoint
|
|
426
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
426
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
427
427
|
*/
|
|
428
|
-
|
|
428
|
+
if (symbol === undefined) {
|
|
429
|
+
throw new ArgumentsRequired(this.id + ' watchOrders() requires a symbol argument');
|
|
430
|
+
}
|
|
429
431
|
await this.loadMarkets();
|
|
430
432
|
await this.authenticate();
|
|
431
433
|
const market = this.market(symbol);
|
|
@@ -458,9 +460,11 @@ export default class bitvavo extends bitvavoRest {
|
|
|
458
460
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
459
461
|
* @param {int} [limit] the maximum number of trade structures to retrieve
|
|
460
462
|
* @param {object} [params] extra parameters specific to the bitvavo api endpoint
|
|
461
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
463
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=ortradeder-structure
|
|
462
464
|
*/
|
|
463
|
-
|
|
465
|
+
if (symbol === undefined) {
|
|
466
|
+
throw new ArgumentsRequired(this.id + ' watchMyTrades() requires a symbol argument');
|
|
467
|
+
}
|
|
464
468
|
await this.loadMarkets();
|
|
465
469
|
await this.authenticate();
|
|
466
470
|
const market = this.market(symbol);
|
|
@@ -58,7 +58,7 @@ export default class blockchaincom extends blockchaincomRest {
|
|
|
58
58
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
59
59
|
* @see https://exchange.blockchain.com/api/#balances
|
|
60
60
|
* @param {object} [params] extra parameters specific to the blockchaincom api endpoint
|
|
61
|
-
* @returns {object} a [balance structure]{@link https://
|
|
61
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
62
62
|
*/
|
|
63
63
|
await this.authenticate(params);
|
|
64
64
|
const messageHash = 'balance';
|
|
@@ -111,12 +111,12 @@ export default class blockchaincom extends blockchaincomRest {
|
|
|
111
111
|
const currencyId = this.safeString(entry, 'currency');
|
|
112
112
|
const code = this.safeCurrencyCode(currencyId);
|
|
113
113
|
const account = this.account();
|
|
114
|
-
account['free'] = this.
|
|
115
|
-
account['total'] = this.
|
|
114
|
+
account['free'] = this.safeString(entry, 'available');
|
|
115
|
+
account['total'] = this.safeString(entry, 'balance');
|
|
116
116
|
result[code] = account;
|
|
117
117
|
}
|
|
118
118
|
const messageHash = 'balance';
|
|
119
|
-
this.balance = result;
|
|
119
|
+
this.balance = this.safeBalance(result);
|
|
120
120
|
client.resolve(this.balance, messageHash);
|
|
121
121
|
}
|
|
122
122
|
async watchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
@@ -208,7 +208,7 @@ export default class blockchaincom extends blockchaincomRest {
|
|
|
208
208
|
* @see https://exchange.blockchain.com/api/#ticker
|
|
209
209
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
210
210
|
* @param {object} [params] extra parameters specific to the blockchaincom api endpoint
|
|
211
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
211
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
212
212
|
*/
|
|
213
213
|
await this.loadMarkets();
|
|
214
214
|
const market = this.market(symbol);
|
|
@@ -317,7 +317,7 @@ export default class blockchaincom extends blockchaincomRest {
|
|
|
317
317
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
318
318
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
319
319
|
* @param {object} [params] extra parameters specific to the blockchaincom api endpoint
|
|
320
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
320
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
321
321
|
*/
|
|
322
322
|
await this.loadMarkets();
|
|
323
323
|
const market = this.market(symbol);
|
|
@@ -416,7 +416,7 @@ export default class blockchaincom extends blockchaincomRest {
|
|
|
416
416
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
417
417
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
418
418
|
* @param {object} [params] extra parameters specific to the blockchaincom api endpoint
|
|
419
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
419
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
420
420
|
*/
|
|
421
421
|
await this.loadMarkets();
|
|
422
422
|
await this.authenticate();
|
|
@@ -630,7 +630,7 @@ export default class blockchaincom extends blockchaincomRest {
|
|
|
630
630
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
631
631
|
* @param {objectConstructor} [params] extra parameters specific to the blockchaincom api endpoint
|
|
632
632
|
* @param {string} [params.type] accepts l2 or l3 for level 2 or level 3 order book
|
|
633
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
633
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
634
634
|
*/
|
|
635
635
|
await this.loadMarkets();
|
|
636
636
|
const market = this.market(symbol);
|
package/js/src/pro/bybit.js
CHANGED
|
@@ -172,7 +172,7 @@ export default class bybit extends bybitRest {
|
|
|
172
172
|
* @see https://bybit-exchange.github.io/docs/v5/websocket/public/etp-ticker
|
|
173
173
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
174
174
|
* @param {object} [params] extra parameters specific to the bybit api endpoint
|
|
175
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
175
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
176
176
|
*/
|
|
177
177
|
await this.loadMarkets();
|
|
178
178
|
const market = this.market(symbol);
|
|
@@ -198,7 +198,7 @@ export default class bybit extends bybitRest {
|
|
|
198
198
|
* @see https://bybit-exchange.github.io/docs/v5/websocket/public/etp-ticker
|
|
199
199
|
* @param {string[]} symbols unified symbol of the market to fetch the ticker for
|
|
200
200
|
* @param {object} [params] extra parameters specific to the bybit api endpoint
|
|
201
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
201
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
202
202
|
*/
|
|
203
203
|
await this.loadMarkets();
|
|
204
204
|
symbols = this.marketSymbols(symbols, undefined, false);
|
|
@@ -516,7 +516,7 @@ export default class bybit extends bybitRest {
|
|
|
516
516
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
517
517
|
* @param {int} [limit] the maximum amount of order book entries to return.
|
|
518
518
|
* @param {object} [params] extra parameters specific to the bybit api endpoint
|
|
519
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
519
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
520
520
|
*/
|
|
521
521
|
await this.loadMarkets();
|
|
522
522
|
const market = this.market(symbol);
|
|
@@ -670,7 +670,7 @@ export default class bybit extends bybitRest {
|
|
|
670
670
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
671
671
|
* @param {int} [limit] the maximum number of trade structures to retrieve
|
|
672
672
|
* @param {object} [params] extra parameters specific to the bybit api endpoint
|
|
673
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
673
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure
|
|
674
674
|
*/
|
|
675
675
|
await this.loadMarkets();
|
|
676
676
|
const market = this.market(symbol);
|
|
@@ -858,7 +858,7 @@ export default class bybit extends bybitRest {
|
|
|
858
858
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
859
859
|
* @param {object} [params] extra parameters specific to the bybit api endpoint
|
|
860
860
|
* @param {boolean} [params.unifiedMargin] use unified margin account
|
|
861
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
861
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure
|
|
862
862
|
*/
|
|
863
863
|
const method = 'watchMyTrades';
|
|
864
864
|
let messageHash = 'myTrades';
|
|
@@ -1122,7 +1122,7 @@ export default class bybit extends bybitRest {
|
|
|
1122
1122
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1123
1123
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
1124
1124
|
* @param {object} [params] extra parameters specific to the bybit api endpoint
|
|
1125
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
1125
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure
|
|
1126
1126
|
*/
|
|
1127
1127
|
await this.loadMarkets();
|
|
1128
1128
|
const method = 'watchOrders';
|
|
@@ -1405,7 +1405,7 @@ export default class bybit extends bybitRest {
|
|
|
1405
1405
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
1406
1406
|
* @see https://bybit-exchange.github.io/docs/v5/websocket/private/wallet
|
|
1407
1407
|
* @param {object} [params] extra parameters specific to the bybit api endpoint
|
|
1408
|
-
* @returns {object} a [balance structure]{@link https://
|
|
1408
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
1409
1409
|
*/
|
|
1410
1410
|
await this.loadMarkets();
|
|
1411
1411
|
const method = 'watchBalance';
|
package/js/src/pro/cex.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
// ---------------------------------------------------------------------------
|
|
8
8
|
import cexRest from '../cex.js';
|
|
9
|
-
import { ExchangeError } from '../base/errors.js';
|
|
9
|
+
import { ArgumentsRequired, ExchangeError } from '../base/errors.js';
|
|
10
10
|
import { Precise } from '../base/Precise.js';
|
|
11
11
|
import { ArrayCacheBySymbolById, ArrayCacheByTimestamp, ArrayCache } from '../base/ws/Cache.js';
|
|
12
12
|
import { sha256 } from '../static_dependencies/noble-hashes/sha256.js';
|
|
@@ -50,7 +50,7 @@ export default class cex extends cexRest {
|
|
|
50
50
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
51
51
|
* @see https://cex.io/websocket-api#get-balance
|
|
52
52
|
* @param {object} [params] extra parameters specific to the cex api endpoint
|
|
53
|
-
* @returns {object} a [balance structure]{@link https://
|
|
53
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
54
54
|
*/
|
|
55
55
|
await this.authenticate(params);
|
|
56
56
|
const messageHash = 'balance';
|
|
@@ -112,7 +112,7 @@ export default class cex extends cexRest {
|
|
|
112
112
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
113
113
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
114
114
|
* @param {object} [params] extra parameters specific to the cex api endpoint
|
|
115
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
115
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
116
116
|
*/
|
|
117
117
|
await this.loadMarkets();
|
|
118
118
|
const market = this.market(symbol);
|
|
@@ -228,7 +228,7 @@ export default class cex extends cexRest {
|
|
|
228
228
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
229
229
|
* @param {object} [params] extra parameters specific to the cex api endpoint
|
|
230
230
|
* @param {string} [params.method] public or private
|
|
231
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
231
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
232
232
|
*/
|
|
233
233
|
await this.loadMarkets();
|
|
234
234
|
const market = this.market(symbol);
|
|
@@ -265,7 +265,7 @@ export default class cex extends cexRest {
|
|
|
265
265
|
* @description watches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
|
|
266
266
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
267
267
|
* @param {object} [params] extra parameters specific to the cex api endpoint
|
|
268
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
268
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
269
269
|
*/
|
|
270
270
|
await this.loadMarkets();
|
|
271
271
|
symbols = this.marketSymbols(symbols);
|
|
@@ -384,9 +384,11 @@ export default class cex extends cexRest {
|
|
|
384
384
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
385
385
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
386
386
|
* @param {object} [params] extra parameters specific to the cex api endpoint
|
|
387
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
387
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
388
388
|
*/
|
|
389
|
-
|
|
389
|
+
if (symbol === undefined) {
|
|
390
|
+
throw new ArgumentsRequired(this.id + ' watchOrders() requires a symbol argument');
|
|
391
|
+
}
|
|
390
392
|
await this.loadMarkets();
|
|
391
393
|
await this.authenticate(params);
|
|
392
394
|
const url = this.urls['api']['ws'];
|
|
@@ -420,9 +422,11 @@ export default class cex extends cexRest {
|
|
|
420
422
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
421
423
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
422
424
|
* @param {object} [params] extra parameters specific to the cex api endpoint
|
|
423
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
425
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
424
426
|
*/
|
|
425
|
-
|
|
427
|
+
if (symbol === undefined) {
|
|
428
|
+
throw new ArgumentsRequired(this.id + ' watchMyTrades() requires a symbol argument');
|
|
429
|
+
}
|
|
426
430
|
await this.loadMarkets();
|
|
427
431
|
await this.authenticate(params);
|
|
428
432
|
const url = this.urls['api']['ws'];
|
|
@@ -851,7 +855,7 @@ export default class cex extends cexRest {
|
|
|
851
855
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
852
856
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
853
857
|
* @param {object} [params] extra parameters specific to the cex api endpoint
|
|
854
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
858
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
855
859
|
*/
|
|
856
860
|
await this.loadMarkets();
|
|
857
861
|
await this.authenticate();
|
package/js/src/pro/coinbase.js
CHANGED
|
@@ -97,7 +97,7 @@ export default class coinbase extends coinbaseRest {
|
|
|
97
97
|
* @see https://docs.cloud.coinbase.com/advanced-trade-api/docs/ws-channels#ticker-channel
|
|
98
98
|
* @param {string} [symbol] unified symbol of the market to fetch the ticker for
|
|
99
99
|
* @param {object} [params] extra parameters specific to the coinbasepro api endpoint
|
|
100
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
100
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
101
101
|
*/
|
|
102
102
|
const name = 'ticker';
|
|
103
103
|
return await this.subscribe(name, symbol, params);
|
|
@@ -110,7 +110,7 @@ export default class coinbase extends coinbaseRest {
|
|
|
110
110
|
* @see https://docs.cloud.coinbase.com/advanced-trade-api/docs/ws-channels#ticker-batch-channel
|
|
111
111
|
* @param {string[]} [symbols] unified symbol of the market to fetch the ticker for
|
|
112
112
|
* @param {object} [params] extra parameters specific to the coinbasepro api endpoint
|
|
113
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
113
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
114
114
|
*/
|
|
115
115
|
if (symbols === undefined) {
|
|
116
116
|
throw new ArgumentsRequired(this.id + ' watchTickers requires a symbols argument');
|
|
@@ -251,7 +251,7 @@ export default class coinbase extends coinbaseRest {
|
|
|
251
251
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
252
252
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
253
253
|
* @param {object} [params] extra parameters specific to the coinbasepro api endpoint
|
|
254
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
254
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
255
255
|
*/
|
|
256
256
|
await this.loadMarkets();
|
|
257
257
|
symbol = this.symbol(symbol);
|
|
@@ -272,7 +272,7 @@ export default class coinbase extends coinbaseRest {
|
|
|
272
272
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
273
273
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
274
274
|
* @param {object} [params] extra parameters specific to the coinbasepro api endpoint
|
|
275
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
275
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
276
276
|
*/
|
|
277
277
|
await this.loadMarkets();
|
|
278
278
|
const name = 'user';
|
|
@@ -291,7 +291,7 @@ export default class coinbase extends coinbaseRest {
|
|
|
291
291
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
292
292
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
293
293
|
* @param {object} [params] extra parameters specific to the coinbasepro api endpoint
|
|
294
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
294
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
295
295
|
*/
|
|
296
296
|
await this.loadMarkets();
|
|
297
297
|
const name = 'level2';
|