ccxt 4.2.31 → 4.2.35
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/.gitattributes +1 -0
- package/CONTRIBUTING.md +20 -1
- package/README.md +8 -7
- package/build.sh +9 -2
- package/cleanup.sh +3 -0
- package/dist/ccxt.browser.js +741 -501
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +3 -2
- package/dist/cjs/src/ascendex.js +1 -1
- package/dist/cjs/src/base/Exchange.js +62 -20
- package/dist/cjs/src/bigone.js +21 -1
- package/dist/cjs/src/binance.js +59 -15
- package/dist/cjs/src/bingx.js +4 -3
- package/dist/cjs/src/bit2c.js +12 -0
- package/dist/cjs/src/bitfinex2.js +12 -1
- package/dist/cjs/src/bitget.js +3 -3
- package/dist/cjs/src/bitmart.js +1 -1
- package/dist/cjs/src/bitrue.js +3 -3
- package/dist/cjs/src/blockchaincom.js +1 -1
- package/dist/cjs/src/bybit.js +1 -1
- package/dist/cjs/src/coinbase.js +2 -2
- package/dist/cjs/src/coinex.js +1 -1
- package/dist/cjs/src/cryptocom.js +10 -10
- package/dist/cjs/src/gate.js +34 -29
- package/dist/cjs/src/kraken.js +39 -0
- package/dist/cjs/src/krakenfutures.js +25 -3
- package/dist/cjs/src/kucoin.js +1 -1
- package/dist/cjs/src/mexc.js +2 -1
- package/dist/cjs/src/okx.js +4 -3
- package/dist/cjs/src/phemex.js +8 -8
- package/dist/cjs/src/pro/alpaca.js +8 -4
- package/dist/cjs/src/pro/ascendex.js +1 -2
- package/dist/cjs/src/pro/binance.js +17 -13
- package/dist/cjs/src/pro/bingx.js +1 -1
- package/dist/cjs/src/pro/bitfinex.js +21 -24
- package/dist/cjs/src/pro/bitfinex2.js +13 -17
- package/dist/cjs/src/pro/bitget.js +3 -1
- package/dist/cjs/src/pro/bitmart.js +3 -8
- package/dist/cjs/src/pro/bitmex.js +4 -7
- package/dist/cjs/src/pro/bitopro.js +2 -5
- package/dist/cjs/src/pro/bitrue.js +1 -1
- package/dist/cjs/src/pro/bitstamp.js +2 -3
- package/dist/cjs/src/pro/bitvavo.js +12 -5
- package/dist/cjs/src/pro/blockchaincom.js +22 -23
- package/dist/cjs/src/pro/bybit.js +5 -5
- package/dist/cjs/src/pro/cex.js +7 -7
- package/dist/cjs/src/pro/coinbase.js +3 -2
- package/dist/cjs/src/pro/coinbasepro.js +1 -1
- package/dist/cjs/src/pro/coinex.js +15 -13
- package/dist/cjs/src/pro/currencycom.js +5 -7
- package/dist/cjs/src/pro/deribit.js +4 -4
- package/dist/cjs/src/pro/exmo.js +15 -13
- package/dist/cjs/src/pro/gate.js +1 -1
- package/dist/cjs/src/pro/gemini.js +4 -2
- package/dist/cjs/src/pro/hitbtc.js +9 -8
- package/dist/cjs/src/pro/hollaex.js +2 -2
- package/dist/cjs/src/pro/htx.js +6 -7
- package/dist/cjs/src/pro/huobijp.js +3 -5
- package/dist/cjs/src/pro/idex.js +1 -1
- package/dist/cjs/src/pro/independentreserve.js +14 -13
- package/dist/cjs/src/pro/kraken.js +10 -16
- package/dist/cjs/src/pro/krakenfutures.js +10 -6
- package/dist/cjs/src/pro/kucoin.js +10 -11
- package/dist/cjs/src/pro/kucoinfutures.js +12 -11
- package/dist/cjs/src/pro/lbank.js +10 -10
- package/dist/cjs/src/pro/luno.js +12 -14
- package/dist/cjs/src/pro/mexc.js +3 -2
- package/dist/cjs/src/pro/ndax.js +7 -13
- package/dist/cjs/src/pro/okcoin.js +7 -12
- package/dist/cjs/src/pro/okx.js +6 -11
- package/dist/cjs/src/pro/onetrading.js +16 -15
- package/dist/cjs/src/pro/p2b.js +5 -3
- package/dist/cjs/src/pro/phemex.js +16 -11
- package/dist/cjs/src/pro/poloniex.js +6 -4
- package/dist/cjs/src/pro/poloniexfutures.js +14 -9
- package/dist/cjs/src/pro/probit.js +15 -11
- package/dist/cjs/src/pro/upbit.js +8 -8
- package/dist/cjs/src/pro/wazirx.js +6 -3
- package/dist/cjs/src/pro/woo.js +8 -6
- package/dist/cjs/src/probit.js +3 -3
- package/dist/cjs/src/tokocrypto.js +2 -2
- package/dist/cjs/src/wavesexchange.js +2 -1
- package/dist/cjs/src/woo.js +1 -1
- package/dist/cjs/src/yobit.js +39 -0
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/ace.d.ts +1 -1
- package/js/src/ace.js +3 -2
- package/js/src/alpaca.d.ts +1 -1
- package/js/src/ascendex.d.ts +5 -15
- package/js/src/ascendex.js +1 -1
- package/js/src/base/Exchange.d.ts +86 -78
- package/js/src/base/Exchange.js +62 -20
- package/js/src/base/types.d.ts +90 -6
- package/js/src/bigone.d.ts +5 -15
- package/js/src/bigone.js +21 -1
- package/js/src/binance.d.ts +13 -23
- package/js/src/binance.js +59 -15
- package/js/src/bingx.d.ts +6 -16
- package/js/src/bingx.js +4 -3
- package/js/src/bit2c.d.ts +1 -1
- package/js/src/bit2c.js +12 -0
- package/js/src/bitbank.d.ts +2 -2
- package/js/src/bitbns.d.ts +1 -1
- package/js/src/bitfinex.d.ts +5 -5
- package/js/src/bitfinex2.d.ts +7 -17
- package/js/src/bitfinex2.js +12 -1
- package/js/src/bitflyer.d.ts +5 -5
- package/js/src/bitforex.d.ts +1 -1
- package/js/src/bitget.d.ts +8 -38
- package/js/src/bitget.js +3 -3
- package/js/src/bithumb.d.ts +2 -2
- package/js/src/bitmart.d.ts +10 -21
- package/js/src/bitmart.js +1 -1
- package/js/src/bitmex.d.ts +3 -3
- package/js/src/bitopro.d.ts +2 -2
- package/js/src/bitrue.d.ts +5 -15
- package/js/src/bitrue.js +3 -3
- package/js/src/bitso.d.ts +4 -4
- package/js/src/bitstamp.d.ts +2 -2
- package/js/src/bitteam.d.ts +1 -1
- package/js/src/bitvavo.d.ts +3 -3
- package/js/src/bl3p.d.ts +1 -1
- package/js/src/blockchaincom.d.ts +2 -2
- package/js/src/blockchaincom.js +1 -1
- package/js/src/btcalpha.d.ts +1 -1
- package/js/src/btcbox.d.ts +1 -1
- package/js/src/btcmarkets.d.ts +3 -3
- package/js/src/btcturk.d.ts +1 -1
- package/js/src/bybit.d.ts +8 -8
- package/js/src/bybit.js +1 -1
- package/js/src/cex.d.ts +1 -1
- package/js/src/coinbase.d.ts +6 -50
- package/js/src/coinbase.js +2 -2
- package/js/src/coinbasepro.d.ts +2 -2
- package/js/src/coincheck.d.ts +1 -1
- package/js/src/coinex.d.ts +8 -8
- package/js/src/coinex.js +1 -1
- package/js/src/coinlist.d.ts +4 -14
- package/js/src/coinmate.d.ts +2 -2
- package/js/src/coinmetro.d.ts +2 -2
- package/js/src/coinone.d.ts +1 -1
- package/js/src/coinsph.d.ts +2 -2
- package/js/src/coinspot.d.ts +1 -1
- package/js/src/cryptocom.d.ts +4 -4
- package/js/src/cryptocom.js +10 -10
- package/js/src/currencycom.d.ts +2 -2
- package/js/src/delta.d.ts +2 -2
- package/js/src/deribit.d.ts +4 -14
- package/js/src/digifinex.d.ts +10 -38
- package/js/src/exmo.d.ts +2 -2
- package/js/src/gate.d.ts +8 -18
- package/js/src/gate.js +34 -29
- package/js/src/gemini.d.ts +2 -2
- package/js/src/hitbtc.d.ts +6 -16
- package/js/src/hollaex.d.ts +2 -2
- package/js/src/htx.d.ts +11 -21
- package/js/src/huobijp.d.ts +4 -4
- package/js/src/idex.d.ts +3 -3
- package/js/src/independentreserve.d.ts +2 -2
- package/js/src/indodax.d.ts +2 -2
- package/js/src/kraken.d.ts +5 -5
- package/js/src/kraken.js +39 -0
- package/js/src/krakenfutures.d.ts +7 -7
- package/js/src/krakenfutures.js +25 -3
- package/js/src/kucoin.d.ts +8 -29
- package/js/src/kucoin.js +1 -1
- package/js/src/kucoinfutures.d.ts +4 -4
- package/js/src/kuna.d.ts +2 -2
- package/js/src/latoken.d.ts +4 -14
- package/js/src/lbank.d.ts +2 -5
- package/js/src/luno.d.ts +1 -1
- package/js/src/lykke.d.ts +2 -2
- package/js/src/mercado.d.ts +2 -2
- package/js/src/mexc.d.ts +6 -6
- package/js/src/mexc.js +2 -1
- package/js/src/ndax.d.ts +2 -2
- package/js/src/novadax.d.ts +4 -15
- package/js/src/oceanex.d.ts +1 -1
- package/js/src/okcoin.d.ts +5 -15
- package/js/src/okx.d.ts +8 -18
- package/js/src/okx.js +4 -3
- package/js/src/onetrading.d.ts +2 -2
- package/js/src/p2b.d.ts +1 -1
- package/js/src/paymium.d.ts +3 -13
- package/js/src/phemex.d.ts +5 -5
- package/js/src/phemex.js +8 -8
- package/js/src/poloniex.d.ts +4 -14
- package/js/src/poloniexfutures.d.ts +1 -1
- package/js/src/pro/alpaca.d.ts +2 -2
- package/js/src/pro/alpaca.js +8 -4
- package/js/src/pro/ascendex.d.ts +2 -2
- package/js/src/pro/ascendex.js +1 -2
- package/js/src/pro/binance.d.ts +3 -3
- package/js/src/pro/binance.js +17 -13
- package/js/src/pro/bingx.d.ts +1 -1
- package/js/src/pro/bingx.js +1 -1
- package/js/src/pro/bitfinex.d.ts +2 -2
- package/js/src/pro/bitfinex.js +21 -24
- package/js/src/pro/bitfinex2.d.ts +2 -2
- package/js/src/pro/bitfinex2.js +13 -17
- package/js/src/pro/bitget.js +3 -1
- package/js/src/pro/bitmart.d.ts +3 -3
- package/js/src/pro/bitmart.js +3 -8
- package/js/src/pro/bitmex.d.ts +1 -1
- package/js/src/pro/bitmex.js +4 -7
- package/js/src/pro/bitopro.d.ts +1 -1
- package/js/src/pro/bitopro.js +2 -5
- package/js/src/pro/bitrue.js +1 -1
- package/js/src/pro/bitstamp.d.ts +1 -1
- package/js/src/pro/bitstamp.js +2 -3
- package/js/src/pro/bitvavo.d.ts +3 -3
- package/js/src/pro/bitvavo.js +12 -5
- package/js/src/pro/blockchaincom.d.ts +8 -8
- package/js/src/pro/blockchaincom.js +22 -23
- package/js/src/pro/bybit.d.ts +2 -2
- package/js/src/pro/bybit.js +5 -5
- package/js/src/pro/cex.d.ts +1 -1
- package/js/src/pro/cex.js +7 -7
- package/js/src/pro/coinbase.d.ts +1 -1
- package/js/src/pro/coinbase.js +3 -2
- package/js/src/pro/coinbasepro.d.ts +1 -1
- package/js/src/pro/coinbasepro.js +1 -1
- package/js/src/pro/coinex.d.ts +2 -2
- package/js/src/pro/coinex.js +15 -13
- package/js/src/pro/currencycom.d.ts +1 -1
- package/js/src/pro/currencycom.js +5 -7
- package/js/src/pro/deribit.d.ts +2 -2
- package/js/src/pro/deribit.js +4 -4
- package/js/src/pro/exmo.d.ts +2 -2
- package/js/src/pro/exmo.js +15 -13
- package/js/src/pro/gate.js +1 -1
- package/js/src/pro/gemini.d.ts +1 -1
- package/js/src/pro/gemini.js +4 -2
- package/js/src/pro/hitbtc.d.ts +2 -2
- package/js/src/pro/hitbtc.js +9 -8
- package/js/src/pro/hollaex.d.ts +2 -2
- package/js/src/pro/hollaex.js +2 -2
- package/js/src/pro/htx.d.ts +2 -2
- package/js/src/pro/htx.js +6 -7
- package/js/src/pro/huobijp.d.ts +1 -1
- package/js/src/pro/huobijp.js +3 -5
- package/js/src/pro/idex.js +1 -1
- package/js/src/pro/independentreserve.d.ts +1 -1
- package/js/src/pro/independentreserve.js +14 -13
- package/js/src/pro/kraken.d.ts +2 -2
- package/js/src/pro/kraken.js +10 -16
- package/js/src/pro/krakenfutures.d.ts +1 -1
- package/js/src/pro/krakenfutures.js +10 -6
- package/js/src/pro/kucoin.d.ts +3 -3
- package/js/src/pro/kucoin.js +10 -11
- package/js/src/pro/kucoinfutures.d.ts +3 -3
- package/js/src/pro/kucoinfutures.js +12 -11
- package/js/src/pro/lbank.d.ts +1 -1
- package/js/src/pro/lbank.js +10 -10
- package/js/src/pro/luno.d.ts +2 -2
- package/js/src/pro/luno.js +12 -14
- package/js/src/pro/mexc.d.ts +2 -2
- package/js/src/pro/mexc.js +3 -2
- package/js/src/pro/ndax.d.ts +3 -3
- package/js/src/pro/ndax.js +7 -13
- package/js/src/pro/okcoin.d.ts +1 -1
- package/js/src/pro/okcoin.js +7 -12
- package/js/src/pro/okx.d.ts +1 -1
- package/js/src/pro/okx.js +6 -11
- package/js/src/pro/onetrading.d.ts +1 -1
- package/js/src/pro/onetrading.js +16 -15
- package/js/src/pro/p2b.d.ts +1 -1
- package/js/src/pro/p2b.js +5 -3
- package/js/src/pro/phemex.d.ts +3 -3
- package/js/src/pro/phemex.js +16 -11
- package/js/src/pro/poloniex.d.ts +1 -1
- package/js/src/pro/poloniex.js +6 -4
- package/js/src/pro/poloniexfutures.d.ts +4 -4
- package/js/src/pro/poloniexfutures.js +13 -10
- package/js/src/pro/probit.d.ts +1 -1
- package/js/src/pro/probit.js +14 -12
- package/js/src/pro/upbit.js +8 -8
- package/js/src/pro/wazirx.d.ts +1 -1
- package/js/src/pro/wazirx.js +6 -3
- package/js/src/pro/woo.d.ts +3 -3
- package/js/src/pro/woo.js +8 -6
- package/js/src/probit.d.ts +3 -3
- package/js/src/probit.js +3 -3
- package/js/src/timex.d.ts +1 -1
- package/js/src/tokocrypto.d.ts +3 -3
- package/js/src/tokocrypto.js +2 -2
- package/js/src/upbit.d.ts +2 -2
- package/js/src/wavesexchange.d.ts +3 -4
- package/js/src/wavesexchange.js +2 -1
- package/js/src/wazirx.d.ts +1 -1
- package/js/src/whitebit.d.ts +5 -15
- package/js/src/woo.d.ts +5 -15
- package/js/src/woo.js +1 -1
- package/js/src/yobit.d.ts +21 -6
- package/js/src/yobit.js +39 -0
- package/js/src/zaif.d.ts +2 -2
- package/js/src/zonda.d.ts +4 -14
- package/package.json +22 -8
- package/skip-tests.json +9 -1
- package/tests-manager.sh +1 -2
|
@@ -47,19 +47,20 @@ class kucoin extends kucoin$1 {
|
|
|
47
47
|
},
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
|
-
negotiate(privateChannel, params = {}) {
|
|
50
|
+
async negotiate(privateChannel, params = {}) {
|
|
51
51
|
const connectId = privateChannel ? 'private' : 'public';
|
|
52
52
|
const urls = this.safeValue(this.options, 'urls', {});
|
|
53
53
|
const spawaned = this.safeValue(urls, connectId);
|
|
54
54
|
if (spawaned !== undefined) {
|
|
55
|
-
return spawaned;
|
|
55
|
+
return await spawaned;
|
|
56
56
|
}
|
|
57
57
|
// we store an awaitable to the url
|
|
58
58
|
// so that multiple calls don't asynchronously
|
|
59
59
|
// fetch different urls and overwrite each other
|
|
60
60
|
urls[connectId] = this.spawn(this.negotiateHelper, privateChannel, params);
|
|
61
61
|
this.options['urls'] = urls;
|
|
62
|
-
|
|
62
|
+
const future = urls[connectId];
|
|
63
|
+
return await future;
|
|
63
64
|
}
|
|
64
65
|
async negotiateHelper(privateChannel, params = {}) {
|
|
65
66
|
let response = undefined;
|
|
@@ -545,7 +546,7 @@ class kucoin extends kucoin$1 {
|
|
|
545
546
|
const limit = this.safeInteger(subscription, 'limit');
|
|
546
547
|
const snapshotDelay = this.handleOption('watchOrderBook', 'snapshotDelay', 5);
|
|
547
548
|
if (cacheLength === snapshotDelay) {
|
|
548
|
-
this.spawn(this.loadOrderBook, client, messageHash, symbol, limit);
|
|
549
|
+
this.spawn(this.loadOrderBook, client, messageHash, symbol, limit, {});
|
|
549
550
|
}
|
|
550
551
|
storedOrderBook.cache.push(data);
|
|
551
552
|
return;
|
|
@@ -987,7 +988,8 @@ class kucoin extends kucoin$1 {
|
|
|
987
988
|
//
|
|
988
989
|
const topic = this.safeString(message, 'topic');
|
|
989
990
|
if (topic === '/market/ticker:all') {
|
|
990
|
-
|
|
991
|
+
this.handleTicker(client, message);
|
|
992
|
+
return;
|
|
991
993
|
}
|
|
992
994
|
const subject = this.safeString(message, 'subject');
|
|
993
995
|
const methods = {
|
|
@@ -1002,11 +1004,8 @@ class kucoin extends kucoin$1 {
|
|
|
1002
1004
|
'stopOrder': this.handleOrder,
|
|
1003
1005
|
};
|
|
1004
1006
|
const method = this.safeValue(methods, subject);
|
|
1005
|
-
if (method
|
|
1006
|
-
|
|
1007
|
-
}
|
|
1008
|
-
else {
|
|
1009
|
-
return method.call(this, client, message);
|
|
1007
|
+
if (method !== undefined) {
|
|
1008
|
+
method.call(this, client, message);
|
|
1010
1009
|
}
|
|
1011
1010
|
}
|
|
1012
1011
|
ping(client) {
|
|
@@ -1054,7 +1053,7 @@ class kucoin extends kucoin$1 {
|
|
|
1054
1053
|
};
|
|
1055
1054
|
const method = this.safeValue(methods, type);
|
|
1056
1055
|
if (method !== undefined) {
|
|
1057
|
-
|
|
1056
|
+
method.call(this, client, message);
|
|
1058
1057
|
}
|
|
1059
1058
|
}
|
|
1060
1059
|
}
|
|
@@ -57,19 +57,20 @@ class kucoinfutures extends kucoinfutures$1 {
|
|
|
57
57
|
},
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
|
-
negotiate(privateChannel, params = {}) {
|
|
60
|
+
async negotiate(privateChannel, params = {}) {
|
|
61
61
|
const connectId = privateChannel ? 'private' : 'public';
|
|
62
62
|
const urls = this.safeValue(this.options, 'urls', {});
|
|
63
63
|
const spawaned = this.safeValue(urls, connectId);
|
|
64
64
|
if (spawaned !== undefined) {
|
|
65
|
-
return spawaned;
|
|
65
|
+
return await spawaned;
|
|
66
66
|
}
|
|
67
67
|
// we store an awaitable to the url
|
|
68
68
|
// so that multiple calls don't asynchronously
|
|
69
69
|
// fetch different urls and overwrite each other
|
|
70
|
-
urls[connectId] = this.spawn(this.negotiateHelper, privateChannel, params);
|
|
70
|
+
urls[connectId] = this.spawn(this.negotiateHelper, privateChannel, params); // we have to wait here otherwsie in c# will not work
|
|
71
71
|
this.options['urls'] = urls;
|
|
72
|
-
|
|
72
|
+
const future = urls[connectId];
|
|
73
|
+
return await future;
|
|
73
74
|
}
|
|
74
75
|
async negotiateHelper(privateChannel, params = {}) {
|
|
75
76
|
let response = undefined;
|
|
@@ -582,6 +583,9 @@ class kucoinfutures extends kucoinfutures$1 {
|
|
|
582
583
|
const messageHash = 'orderbook:' + symbol;
|
|
583
584
|
const storedOrderBook = this.safeValue(this.orderbooks, symbol);
|
|
584
585
|
const nonce = this.safeInteger(storedOrderBook, 'nonce');
|
|
586
|
+
if (storedOrderBook === undefined) {
|
|
587
|
+
return; // this shouldn't be needed, but for some reason sometimes this runs before handleOrderBookSubscription in c#
|
|
588
|
+
}
|
|
585
589
|
const deltaEnd = this.safeInteger(data, 'sequence');
|
|
586
590
|
if (nonce === undefined) {
|
|
587
591
|
const cacheLength = storedOrderBook.cache.length;
|
|
@@ -600,7 +604,7 @@ class kucoinfutures extends kucoinfutures$1 {
|
|
|
600
604
|
const limit = this.safeInteger(subscription, 'limit');
|
|
601
605
|
const snapshotDelay = this.handleOption('watchOrderBook', 'snapshotDelay', 5);
|
|
602
606
|
if (cacheLength === snapshotDelay) {
|
|
603
|
-
this.spawn(this.loadOrderBook, client, messageHash, symbol, limit);
|
|
607
|
+
this.spawn(this.loadOrderBook, client, messageHash, symbol, limit, {});
|
|
604
608
|
}
|
|
605
609
|
storedOrderBook.cache.push(data);
|
|
606
610
|
return;
|
|
@@ -928,11 +932,8 @@ class kucoinfutures extends kucoinfutures$1 {
|
|
|
928
932
|
'position.adjustRiskLimit': this.handlePosition,
|
|
929
933
|
};
|
|
930
934
|
const method = this.safeValue(methods, subject);
|
|
931
|
-
if (method
|
|
932
|
-
|
|
933
|
-
}
|
|
934
|
-
else {
|
|
935
|
-
return method.call(this, client, message);
|
|
935
|
+
if (method !== undefined) {
|
|
936
|
+
method.call(this, client, message);
|
|
936
937
|
}
|
|
937
938
|
}
|
|
938
939
|
ping(client) {
|
|
@@ -981,7 +982,7 @@ class kucoinfutures extends kucoinfutures$1 {
|
|
|
981
982
|
};
|
|
982
983
|
const method = this.safeValue(methods, type);
|
|
983
984
|
if (method !== undefined) {
|
|
984
|
-
|
|
985
|
+
method.call(this, client, message);
|
|
985
986
|
}
|
|
986
987
|
}
|
|
987
988
|
}
|
|
@@ -776,17 +776,17 @@ class lbank extends lbank$1 {
|
|
|
776
776
|
const orderBook = this.safeValue(message, 'depth', message);
|
|
777
777
|
const datetime = this.safeString(message, 'TS');
|
|
778
778
|
const timestamp = this.parse8601(datetime);
|
|
779
|
-
let
|
|
780
|
-
if (
|
|
781
|
-
|
|
782
|
-
this.orderbooks[symbol] =
|
|
779
|
+
let orderbook = this.safeValue(this.orderbooks, symbol);
|
|
780
|
+
if (orderbook === undefined) {
|
|
781
|
+
orderbook = this.orderBook({});
|
|
782
|
+
this.orderbooks[symbol] = orderbook;
|
|
783
783
|
}
|
|
784
784
|
const snapshot = this.parseOrderBook(orderBook, symbol, timestamp, 'bids', 'asks');
|
|
785
|
-
|
|
785
|
+
orderbook.reset(snapshot);
|
|
786
786
|
let messageHash = 'orderbook:' + symbol;
|
|
787
|
-
client.resolve(
|
|
787
|
+
client.resolve(orderbook, messageHash);
|
|
788
788
|
messageHash = 'fetchOrderbook:' + symbol;
|
|
789
|
-
client.resolve(
|
|
789
|
+
client.resolve(orderbook, messageHash);
|
|
790
790
|
}
|
|
791
791
|
handleErrorMessage(client, message) {
|
|
792
792
|
//
|
|
@@ -814,7 +814,8 @@ class lbank extends lbank$1 {
|
|
|
814
814
|
handleMessage(client, message) {
|
|
815
815
|
const status = this.safeString(message, 'status');
|
|
816
816
|
if (status === 'error') {
|
|
817
|
-
|
|
817
|
+
this.handleErrorMessage(client, message);
|
|
818
|
+
return;
|
|
818
819
|
}
|
|
819
820
|
const type = this.safeString2(message, 'type', 'action');
|
|
820
821
|
if (type === 'ping') {
|
|
@@ -830,9 +831,8 @@ class lbank extends lbank$1 {
|
|
|
830
831
|
};
|
|
831
832
|
const handler = this.safeValue(handlers, type);
|
|
832
833
|
if (handler !== undefined) {
|
|
833
|
-
|
|
834
|
+
handler.call(this, client, message);
|
|
834
835
|
}
|
|
835
|
-
return message;
|
|
836
836
|
}
|
|
837
837
|
async authenticate(params = {}) {
|
|
838
838
|
// when we implement more private streams, we need to refactor the authentication
|
package/dist/cjs/src/pro/luno.js
CHANGED
|
@@ -191,24 +191,24 @@ class luno extends luno$1 {
|
|
|
191
191
|
const symbol = subscription['symbol'];
|
|
192
192
|
const messageHash = 'orderbook:' + symbol;
|
|
193
193
|
const timestamp = this.safeString(message, 'timestamp');
|
|
194
|
-
let
|
|
195
|
-
if (
|
|
196
|
-
|
|
197
|
-
this.orderbooks[symbol] =
|
|
194
|
+
let orderbook = this.safeValue(this.orderbooks, symbol);
|
|
195
|
+
if (orderbook === undefined) {
|
|
196
|
+
orderbook = this.indexedOrderBook({});
|
|
197
|
+
this.orderbooks[symbol] = orderbook;
|
|
198
198
|
}
|
|
199
199
|
const asks = this.safeValue(message, 'asks');
|
|
200
200
|
if (asks !== undefined) {
|
|
201
201
|
const snapshot = this.customParseOrderBook(message, symbol, timestamp, 'bids', 'asks', 'price', 'volume', 'id');
|
|
202
|
-
|
|
202
|
+
orderbook.reset(snapshot);
|
|
203
203
|
}
|
|
204
204
|
else {
|
|
205
|
-
this.handleDelta(
|
|
206
|
-
|
|
207
|
-
|
|
205
|
+
this.handleDelta(orderbook, message);
|
|
206
|
+
orderbook['timestamp'] = timestamp;
|
|
207
|
+
orderbook['datetime'] = this.iso8601(timestamp);
|
|
208
208
|
}
|
|
209
209
|
const nonce = this.safeInteger(message, 'sequence');
|
|
210
|
-
|
|
211
|
-
client.resolve(
|
|
210
|
+
orderbook['nonce'] = nonce;
|
|
211
|
+
client.resolve(orderbook, messageHash);
|
|
212
212
|
}
|
|
213
213
|
customParseOrderBook(orderbook, symbol, timestamp = undefined, bidsKey = 'bids', asksKey = 'asks', priceKey = 'price', amountKey = 'volume', countOrIdKey = 2) {
|
|
214
214
|
const bids = this.parseBidsAsks(this.safeValue(orderbook, bidsKey, []), priceKey, amountKey, countOrIdKey);
|
|
@@ -300,10 +300,9 @@ class luno extends luno$1 {
|
|
|
300
300
|
const deleteUpdate = this.safeValue(message, 'delete_update');
|
|
301
301
|
if (deleteUpdate !== undefined) {
|
|
302
302
|
const orderId = this.safeString(deleteUpdate, 'order_id');
|
|
303
|
-
asksOrderSide.storeArray(0, 0, orderId);
|
|
304
|
-
bidsOrderSide.storeArray(0, 0, orderId);
|
|
303
|
+
asksOrderSide.storeArray([0, 0, orderId]);
|
|
304
|
+
bidsOrderSide.storeArray([0, 0, orderId]);
|
|
305
305
|
}
|
|
306
|
-
return message;
|
|
307
306
|
}
|
|
308
307
|
handleMessage(client, message) {
|
|
309
308
|
if (message === '') {
|
|
@@ -315,7 +314,6 @@ class luno extends luno$1 {
|
|
|
315
314
|
const handler = handlers[j];
|
|
316
315
|
handler.call(this, client, message, subscriptions[0]);
|
|
317
316
|
}
|
|
318
|
-
return message;
|
|
319
317
|
}
|
|
320
318
|
}
|
|
321
319
|
|
package/dist/cjs/src/pro/mexc.js
CHANGED
|
@@ -1106,7 +1106,7 @@ class mexc extends mexc$1 {
|
|
|
1106
1106
|
//
|
|
1107
1107
|
const msg = this.safeString(message, 'msg');
|
|
1108
1108
|
if (msg === 'PONG') {
|
|
1109
|
-
|
|
1109
|
+
this.handlePong(client, message);
|
|
1110
1110
|
}
|
|
1111
1111
|
else if (msg.indexOf('@') > -1) {
|
|
1112
1112
|
const parts = msg.split('@');
|
|
@@ -1129,7 +1129,8 @@ class mexc extends mexc$1 {
|
|
|
1129
1129
|
return;
|
|
1130
1130
|
}
|
|
1131
1131
|
if ('msg' in message) {
|
|
1132
|
-
|
|
1132
|
+
this.handleSubscriptionStatus(client, message);
|
|
1133
|
+
return;
|
|
1133
1134
|
}
|
|
1134
1135
|
const c = this.safeString(message, 'c');
|
|
1135
1136
|
let channel = undefined;
|
package/dist/cjs/src/pro/ndax.js
CHANGED
|
@@ -385,13 +385,13 @@ class ndax extends ndax$1 {
|
|
|
385
385
|
const firstBidAsk = this.safeValue(payload, 0, []);
|
|
386
386
|
const marketId = this.safeString(firstBidAsk, 7);
|
|
387
387
|
if (marketId === undefined) {
|
|
388
|
-
return
|
|
388
|
+
return;
|
|
389
389
|
}
|
|
390
390
|
const market = this.safeMarket(marketId);
|
|
391
391
|
const symbol = market['symbol'];
|
|
392
392
|
const orderbook = this.safeValue(this.orderbooks, symbol);
|
|
393
393
|
if (orderbook === undefined) {
|
|
394
|
-
return
|
|
394
|
+
return;
|
|
395
395
|
}
|
|
396
396
|
let timestamp = undefined;
|
|
397
397
|
let nonce = undefined;
|
|
@@ -485,11 +485,8 @@ class ndax extends ndax$1 {
|
|
|
485
485
|
const subscription = this.safeValue(subscriptionsById, id);
|
|
486
486
|
if (subscription !== undefined) {
|
|
487
487
|
const method = this.safeValue(subscription, 'method');
|
|
488
|
-
if (method
|
|
489
|
-
|
|
490
|
-
}
|
|
491
|
-
else {
|
|
492
|
-
return method.call(this, client, message, subscription);
|
|
488
|
+
if (method !== undefined) {
|
|
489
|
+
method.call(this, client, message, subscription);
|
|
493
490
|
}
|
|
494
491
|
}
|
|
495
492
|
}
|
|
@@ -518,7 +515,7 @@ class ndax extends ndax$1 {
|
|
|
518
515
|
//
|
|
519
516
|
const payload = this.safeString(message, 'o');
|
|
520
517
|
if (payload === undefined) {
|
|
521
|
-
return
|
|
518
|
+
return;
|
|
522
519
|
}
|
|
523
520
|
message['o'] = JSON.parse(payload);
|
|
524
521
|
const methods = {
|
|
@@ -533,11 +530,8 @@ class ndax extends ndax$1 {
|
|
|
533
530
|
};
|
|
534
531
|
const event = this.safeString(message, 'n');
|
|
535
532
|
const method = this.safeValue(methods, event);
|
|
536
|
-
if (method
|
|
537
|
-
|
|
538
|
-
}
|
|
539
|
-
else {
|
|
540
|
-
return method.call(this, client, message);
|
|
533
|
+
if (method !== undefined) {
|
|
534
|
+
method.call(this, client, message);
|
|
541
535
|
}
|
|
542
536
|
}
|
|
543
537
|
}
|
|
@@ -475,7 +475,7 @@ class okcoin extends okcoin$1 {
|
|
|
475
475
|
};
|
|
476
476
|
this.spawn(this.watch, url, messageHash, request, messageHash, future);
|
|
477
477
|
}
|
|
478
|
-
return
|
|
478
|
+
return future;
|
|
479
479
|
}
|
|
480
480
|
async watchBalance(params = {}) {
|
|
481
481
|
/**
|
|
@@ -708,7 +708,8 @@ class okcoin extends okcoin$1 {
|
|
|
708
708
|
// }
|
|
709
709
|
//
|
|
710
710
|
if (message === 'pong') {
|
|
711
|
-
|
|
711
|
+
this.handlePong(client, message);
|
|
712
|
+
return;
|
|
712
713
|
}
|
|
713
714
|
const table = this.safeString(message, 'table');
|
|
714
715
|
if (table === undefined) {
|
|
@@ -721,11 +722,8 @@ class okcoin extends okcoin$1 {
|
|
|
721
722
|
'subscribe': this.handleSubscriptionStatus,
|
|
722
723
|
};
|
|
723
724
|
const method = this.safeValue(methods, event);
|
|
724
|
-
if (method
|
|
725
|
-
|
|
726
|
-
}
|
|
727
|
-
else {
|
|
728
|
-
return method.call(this, client, message);
|
|
725
|
+
if (method !== undefined) {
|
|
726
|
+
method.call(this, client, message);
|
|
729
727
|
}
|
|
730
728
|
}
|
|
731
729
|
}
|
|
@@ -747,11 +745,8 @@ class okcoin extends okcoin$1 {
|
|
|
747
745
|
if (name.indexOf('candle') >= 0) {
|
|
748
746
|
method = this.handleOHLCV;
|
|
749
747
|
}
|
|
750
|
-
if (method
|
|
751
|
-
|
|
752
|
-
}
|
|
753
|
-
else {
|
|
754
|
-
return method.call(this, client, message);
|
|
748
|
+
if (method !== undefined) {
|
|
749
|
+
method.call(this, client, message);
|
|
755
750
|
}
|
|
756
751
|
}
|
|
757
752
|
}
|
package/dist/cjs/src/pro/okx.js
CHANGED
|
@@ -755,7 +755,7 @@ class okx extends okx$1 {
|
|
|
755
755
|
const message = this.extend(request, params);
|
|
756
756
|
this.watch(url, messageHash, message, messageHash);
|
|
757
757
|
}
|
|
758
|
-
return future;
|
|
758
|
+
return await future;
|
|
759
759
|
}
|
|
760
760
|
async watchBalance(params = {}) {
|
|
761
761
|
/**
|
|
@@ -1561,7 +1561,8 @@ class okx extends okx$1 {
|
|
|
1561
1561
|
//
|
|
1562
1562
|
//
|
|
1563
1563
|
if (message === 'pong') {
|
|
1564
|
-
|
|
1564
|
+
this.handlePong(client, message);
|
|
1565
|
+
return;
|
|
1565
1566
|
}
|
|
1566
1567
|
// const table = this.safeString (message, 'table');
|
|
1567
1568
|
// if (table === undefined) {
|
|
@@ -1580,11 +1581,8 @@ class okx extends okx$1 {
|
|
|
1580
1581
|
'mass-cancel': this.handleCancelAllOrders,
|
|
1581
1582
|
};
|
|
1582
1583
|
const method = this.safeValue(methods, event);
|
|
1583
|
-
if (method
|
|
1584
|
-
|
|
1585
|
-
}
|
|
1586
|
-
else {
|
|
1587
|
-
return method.call(this, client, message);
|
|
1584
|
+
if (method !== undefined) {
|
|
1585
|
+
method.call(this, client, message);
|
|
1588
1586
|
}
|
|
1589
1587
|
}
|
|
1590
1588
|
else {
|
|
@@ -1612,12 +1610,9 @@ class okx extends okx$1 {
|
|
|
1612
1610
|
if (channel.indexOf('candle') === 0) {
|
|
1613
1611
|
this.handleOHLCV(client, message);
|
|
1614
1612
|
}
|
|
1615
|
-
else {
|
|
1616
|
-
return message;
|
|
1617
|
-
}
|
|
1618
1613
|
}
|
|
1619
1614
|
else {
|
|
1620
|
-
|
|
1615
|
+
method.call(this, client, message);
|
|
1621
1616
|
}
|
|
1622
1617
|
}
|
|
1623
1618
|
}
|
|
@@ -362,26 +362,26 @@ class onetrading extends onetrading$1 {
|
|
|
362
362
|
const dateTime = this.safeString(message, 'time');
|
|
363
363
|
const timestamp = this.parse8601(dateTime);
|
|
364
364
|
const channel = 'book:' + symbol;
|
|
365
|
-
let
|
|
366
|
-
if (
|
|
367
|
-
|
|
365
|
+
let orderbook = this.safeValue(this.orderbooks, symbol);
|
|
366
|
+
if (orderbook === undefined) {
|
|
367
|
+
orderbook = this.orderBook({});
|
|
368
368
|
}
|
|
369
369
|
if (type === 'ORDER_BOOK_SNAPSHOT') {
|
|
370
370
|
const snapshot = this.parseOrderBook(message, symbol, timestamp, 'bids', 'asks');
|
|
371
|
-
|
|
371
|
+
orderbook.reset(snapshot);
|
|
372
372
|
}
|
|
373
373
|
else if (type === 'ORDER_BOOK_UPDATE') {
|
|
374
374
|
const changes = this.safeValue(message, 'changes', []);
|
|
375
|
-
this.handleDeltas(
|
|
375
|
+
this.handleDeltas(orderbook, changes);
|
|
376
376
|
}
|
|
377
377
|
else {
|
|
378
378
|
throw new errors.NotSupported(this.id + ' watchOrderBook() did not recognize message type ' + type);
|
|
379
379
|
}
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
this.orderbooks[symbol] =
|
|
384
|
-
client.resolve(
|
|
380
|
+
orderbook['nonce'] = timestamp;
|
|
381
|
+
orderbook['timestamp'] = timestamp;
|
|
382
|
+
orderbook['datetime'] = this.iso8601(timestamp);
|
|
383
|
+
this.orderbooks[symbol] = orderbook;
|
|
384
|
+
client.resolve(orderbook, channel);
|
|
385
385
|
}
|
|
386
386
|
handleDelta(orderbook, delta) {
|
|
387
387
|
//
|
|
@@ -967,13 +967,14 @@ class onetrading extends onetrading$1 {
|
|
|
967
967
|
if (updateType === 'ORDER_CLOSED' && filled === 0) {
|
|
968
968
|
status = 'canceled';
|
|
969
969
|
}
|
|
970
|
-
|
|
970
|
+
const orderObject = {
|
|
971
971
|
'id': orderId,
|
|
972
972
|
'symbol': symbol,
|
|
973
973
|
'status': status,
|
|
974
974
|
'timestamp': this.parse8601(datetime),
|
|
975
975
|
'datetime': datetime,
|
|
976
|
-
}
|
|
976
|
+
};
|
|
977
|
+
orders.append(orderObject);
|
|
977
978
|
}
|
|
978
979
|
else {
|
|
979
980
|
const parsed = this.parseOrder(update);
|
|
@@ -1210,7 +1211,8 @@ class onetrading extends onetrading$1 {
|
|
|
1210
1211
|
handleMessage(client, message) {
|
|
1211
1212
|
const error = this.safeValue(message, 'error');
|
|
1212
1213
|
if (error !== undefined) {
|
|
1213
|
-
|
|
1214
|
+
this.handleErrorMessage(client, message);
|
|
1215
|
+
return;
|
|
1214
1216
|
}
|
|
1215
1217
|
const type = this.safeValue(message, 'type');
|
|
1216
1218
|
const handlers = {
|
|
@@ -1241,9 +1243,8 @@ class onetrading extends onetrading$1 {
|
|
|
1241
1243
|
};
|
|
1242
1244
|
const handler = this.safeValue(handlers, type);
|
|
1243
1245
|
if (handler !== undefined) {
|
|
1244
|
-
|
|
1246
|
+
handler.call(this, client, message);
|
|
1245
1247
|
}
|
|
1246
|
-
throw new errors.NotSupported(this.id + ' no handler found for this message ' + this.json(message));
|
|
1247
1248
|
}
|
|
1248
1249
|
handlePricePointUpdates(client, message) {
|
|
1249
1250
|
//
|
package/dist/cjs/src/pro/p2b.js
CHANGED
|
@@ -362,7 +362,8 @@ class p2b extends p2b$1 {
|
|
|
362
362
|
const bid = this.safeValue(bids, i);
|
|
363
363
|
const price = this.safeNumber(bid, 0);
|
|
364
364
|
const amount = this.safeNumber(bid, 1);
|
|
365
|
-
orderbook['bids']
|
|
365
|
+
const bookSide = orderbook['bids'];
|
|
366
|
+
bookSide.store(price, amount);
|
|
366
367
|
}
|
|
367
368
|
}
|
|
368
369
|
if (asks !== undefined) {
|
|
@@ -370,7 +371,8 @@ class p2b extends p2b$1 {
|
|
|
370
371
|
const ask = this.safeValue(asks, i);
|
|
371
372
|
const price = this.safeNumber(ask, 0);
|
|
372
373
|
const amount = this.safeNumber(ask, 1);
|
|
373
|
-
orderbook['asks']
|
|
374
|
+
const bookside = orderbook['asks'];
|
|
375
|
+
bookside.store(price, amount);
|
|
374
376
|
}
|
|
375
377
|
}
|
|
376
378
|
orderbook['symbol'] = symbol;
|
|
@@ -395,7 +397,7 @@ class p2b extends p2b$1 {
|
|
|
395
397
|
};
|
|
396
398
|
const endpoint = this.safeValue(methods, method);
|
|
397
399
|
if (endpoint !== undefined) {
|
|
398
|
-
|
|
400
|
+
endpoint.call(this, client, message);
|
|
399
401
|
}
|
|
400
402
|
}
|
|
401
403
|
handleErrorMessage(client, message) {
|
|
@@ -630,13 +630,13 @@ class phemex extends phemex$1 {
|
|
|
630
630
|
}
|
|
631
631
|
return this.filterBySinceLimit(ohlcv, since, limit, 0, true);
|
|
632
632
|
}
|
|
633
|
-
|
|
633
|
+
customHandleDelta(bookside, delta, market = undefined) {
|
|
634
634
|
const bidAsk = this.customParseBidAsk(delta, 0, 1, market);
|
|
635
635
|
bookside.storeArray(bidAsk);
|
|
636
636
|
}
|
|
637
|
-
|
|
637
|
+
customHandleDeltas(bookside, deltas, market = undefined) {
|
|
638
638
|
for (let i = 0; i < deltas.length; i++) {
|
|
639
|
-
this.
|
|
639
|
+
this.customHandleDelta(bookside, deltas[i], market);
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
642
|
handleOrderBook(client, message) {
|
|
@@ -706,8 +706,8 @@ class phemex extends phemex$1 {
|
|
|
706
706
|
const changes = this.safeValue2(message, 'book', 'orderbook_p', {});
|
|
707
707
|
const asks = this.safeValue(changes, 'asks', []);
|
|
708
708
|
const bids = this.safeValue(changes, 'bids', []);
|
|
709
|
-
this.
|
|
710
|
-
this.
|
|
709
|
+
this.customHandleDeltas(orderbook['asks'], asks, market);
|
|
710
|
+
this.customHandleDeltas(orderbook['bids'], bids, market);
|
|
711
711
|
orderbook['nonce'] = nonce;
|
|
712
712
|
orderbook['timestamp'] = timestamp;
|
|
713
713
|
orderbook['datetime'] = this.iso8601(timestamp);
|
|
@@ -1403,21 +1403,26 @@ class phemex extends phemex$1 {
|
|
|
1403
1403
|
const method = client.subscriptions[id];
|
|
1404
1404
|
delete client.subscriptions[id];
|
|
1405
1405
|
if (method !== true) {
|
|
1406
|
-
|
|
1406
|
+
method.call(this, client, message);
|
|
1407
|
+
return;
|
|
1407
1408
|
}
|
|
1408
1409
|
}
|
|
1409
1410
|
const methodName = this.safeString(message, 'method', '');
|
|
1410
1411
|
if (('market24h' in message) || ('spot_market24h' in message) || (methodName.indexOf('perp_market24h_pack_p') >= 0)) {
|
|
1411
|
-
|
|
1412
|
+
this.handleTicker(client, message);
|
|
1413
|
+
return;
|
|
1412
1414
|
}
|
|
1413
1415
|
else if (('trades' in message) || ('trades_p' in message)) {
|
|
1414
|
-
|
|
1416
|
+
this.handleTrades(client, message);
|
|
1417
|
+
return;
|
|
1415
1418
|
}
|
|
1416
1419
|
else if (('kline' in message) || ('kline_p' in message)) {
|
|
1417
|
-
|
|
1420
|
+
this.handleOHLCV(client, message);
|
|
1421
|
+
return;
|
|
1418
1422
|
}
|
|
1419
1423
|
else if (('book' in message) || ('orderbook_p' in message)) {
|
|
1420
|
-
|
|
1424
|
+
this.handleOrderBook(client, message);
|
|
1425
|
+
return;
|
|
1421
1426
|
}
|
|
1422
1427
|
if (('orders' in message) || ('orders_p' in message)) {
|
|
1423
1428
|
const orders = this.safeValue2(message, 'orders', 'orders_p', {});
|
|
@@ -1504,7 +1509,7 @@ class phemex extends phemex$1 {
|
|
|
1504
1509
|
future = this.watch(url, messageHash, message);
|
|
1505
1510
|
client.subscriptions[messageHash] = future;
|
|
1506
1511
|
}
|
|
1507
|
-
return
|
|
1512
|
+
return future;
|
|
1508
1513
|
}
|
|
1509
1514
|
}
|
|
1510
1515
|
|
|
@@ -1039,7 +1039,8 @@ class poloniex extends poloniex$1 {
|
|
|
1039
1039
|
const bid = this.safeValue(bids, j);
|
|
1040
1040
|
const price = this.safeNumber(bid, 0);
|
|
1041
1041
|
const amount = this.safeNumber(bid, 1);
|
|
1042
|
-
orderbook['bids']
|
|
1042
|
+
const bidsSide = orderbook['bids'];
|
|
1043
|
+
bidsSide.store(price, amount);
|
|
1043
1044
|
}
|
|
1044
1045
|
}
|
|
1045
1046
|
if (asks !== undefined) {
|
|
@@ -1047,7 +1048,8 @@ class poloniex extends poloniex$1 {
|
|
|
1047
1048
|
const ask = this.safeValue(asks, j);
|
|
1048
1049
|
const price = this.safeNumber(ask, 0);
|
|
1049
1050
|
const amount = this.safeNumber(ask, 1);
|
|
1050
|
-
orderbook['asks']
|
|
1051
|
+
const asksSide = orderbook['asks'];
|
|
1052
|
+
asksSide.store(price, amount);
|
|
1051
1053
|
}
|
|
1052
1054
|
}
|
|
1053
1055
|
orderbook['symbol'] = symbol;
|
|
@@ -1181,14 +1183,14 @@ class poloniex extends poloniex$1 {
|
|
|
1181
1183
|
this.handleErrorMessage(client, item);
|
|
1182
1184
|
}
|
|
1183
1185
|
else {
|
|
1184
|
-
|
|
1186
|
+
this.handleOrderRequest(client, message);
|
|
1185
1187
|
}
|
|
1186
1188
|
}
|
|
1187
1189
|
else {
|
|
1188
1190
|
const data = this.safeValue(message, 'data', []);
|
|
1189
1191
|
const dataLength = data.length;
|
|
1190
1192
|
if (dataLength > 0) {
|
|
1191
|
-
|
|
1193
|
+
method.call(this, client, message);
|
|
1192
1194
|
}
|
|
1193
1195
|
}
|
|
1194
1196
|
}
|