ccxt 4.2.30 → 4.2.34
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 +9 -9
- package/build.sh +9 -2
- package/cleanup.sh +3 -0
- package/dist/ccxt.browser.js +1136 -561
- 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 +66 -24
- package/dist/cjs/src/bigone.js +21 -1
- package/dist/cjs/src/binance.js +6 -5
- package/dist/cjs/src/bingx.js +4 -3
- package/dist/cjs/src/bit2c.js +12 -0
- package/dist/cjs/src/bitfinex2.js +415 -41
- package/dist/cjs/src/bitforex.js +3 -0
- 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 +12 -2
- package/dist/cjs/src/coinex.js +1 -1
- package/dist/cjs/src/cryptocom.js +10 -10
- package/dist/cjs/src/deribit.js +1 -0
- package/dist/cjs/src/gate.js +34 -29
- package/dist/cjs/src/htx.js +1 -1
- package/dist/cjs/src/kraken.js +42 -1
- package/dist/cjs/src/krakenfutures.js +3 -0
- package/dist/cjs/src/kucoin.js +1 -1
- package/dist/cjs/src/lbank.js +27 -26
- package/dist/cjs/src/mexc.js +2 -1
- package/dist/cjs/src/okx.js +20 -5
- package/dist/cjs/src/phemex.js +8 -8
- package/dist/cjs/src/poloniexfutures.js +3 -0
- 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 +14 -10
- 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/timex.js +1 -1
- package/dist/cjs/src/tokocrypto.js +2 -2
- package/dist/cjs/src/wavesexchange.js +2 -1
- package/dist/cjs/src/whitebit.js +1 -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/abstract/coinbase.d.ts +10 -0
- package/js/src/abstract/okx.d.ts +12 -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 +88 -79
- package/js/src/base/Exchange.js +66 -24
- 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 +6 -5
- 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 +11 -16
- package/js/src/bitfinex2.js +415 -41
- package/js/src/bitflyer.d.ts +5 -5
- package/js/src/bitforex.d.ts +1 -1
- package/js/src/bitforex.js +3 -0
- 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 +12 -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/deribit.js +1 -0
- 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/htx.js +1 -1
- 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 +42 -1
- package/js/src/krakenfutures.d.ts +7 -7
- package/js/src/krakenfutures.js +3 -0
- 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 +3 -6
- package/js/src/lbank.js +27 -26
- 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 +20 -5
- 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/poloniexfutures.js +3 -0
- 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 +14 -10
- 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/timex.js +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/whitebit.js +1 -1
- 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
|
@@ -339,7 +339,6 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
339
339
|
stored.append(parsed);
|
|
340
340
|
}
|
|
341
341
|
client.resolve(stored, messageHash);
|
|
342
|
-
return message;
|
|
343
342
|
}
|
|
344
343
|
parseWsTrade(trade, market = undefined) {
|
|
345
344
|
//
|
|
@@ -591,8 +590,9 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
591
590
|
const deltas = message[1];
|
|
592
591
|
for (let i = 0; i < deltas.length; i++) {
|
|
593
592
|
const delta = deltas[i];
|
|
594
|
-
const
|
|
595
|
-
const
|
|
593
|
+
const delta2 = delta[2];
|
|
594
|
+
const size = (delta2 < 0) ? -delta2 : delta2;
|
|
595
|
+
const side = (delta2 < 0) ? 'asks' : 'bids';
|
|
596
596
|
const bookside = orderbook[side];
|
|
597
597
|
const idString = this.safeString(delta, 0);
|
|
598
598
|
const price = this.safeFloat(delta, 1);
|
|
@@ -620,8 +620,9 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
620
620
|
const orderbookItem = this.orderbooks[symbol];
|
|
621
621
|
if (isRaw) {
|
|
622
622
|
const price = this.safeString(deltas, 1);
|
|
623
|
-
const
|
|
624
|
-
const
|
|
623
|
+
const deltas2 = deltas[2];
|
|
624
|
+
const size = (deltas2 < 0) ? -deltas2 : deltas2;
|
|
625
|
+
const side = (deltas2 < 0) ? 'asks' : 'bids';
|
|
625
626
|
const bookside = orderbookItem[side];
|
|
626
627
|
// price = 0 means that you have to remove the order from your book
|
|
627
628
|
const amount = Precise["default"].stringGt(price, '0') ? size : '0';
|
|
@@ -669,7 +670,8 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
669
670
|
}
|
|
670
671
|
if (ask !== undefined) {
|
|
671
672
|
stringArray.push(this.numberToString(asks[i][idToCheck]));
|
|
672
|
-
|
|
673
|
+
const aski1 = asks[i][1];
|
|
674
|
+
stringArray.push(this.numberToString(-aski1));
|
|
673
675
|
}
|
|
674
676
|
}
|
|
675
677
|
const payload = stringArray.join(':');
|
|
@@ -1101,7 +1103,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1101
1103
|
//
|
|
1102
1104
|
if (Array.isArray(message)) {
|
|
1103
1105
|
if (message[1] === 'hb') {
|
|
1104
|
-
return
|
|
1106
|
+
return; // skip heartbeats within subscription channels for now
|
|
1105
1107
|
}
|
|
1106
1108
|
const subscription = this.safeValue(client.subscriptions, channelId, {});
|
|
1107
1109
|
const channel = this.safeString(subscription, 'channel');
|
|
@@ -1129,11 +1131,8 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1129
1131
|
else {
|
|
1130
1132
|
method = this.safeValue2(publicMethods, name, channel);
|
|
1131
1133
|
}
|
|
1132
|
-
if (method
|
|
1133
|
-
|
|
1134
|
-
}
|
|
1135
|
-
else {
|
|
1136
|
-
return method.call(this, client, message, subscription);
|
|
1134
|
+
if (method !== undefined) {
|
|
1135
|
+
method.call(this, client, message, subscription);
|
|
1137
1136
|
}
|
|
1138
1137
|
}
|
|
1139
1138
|
else {
|
|
@@ -1145,11 +1144,8 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1145
1144
|
'auth': this.handleAuthenticationMessage,
|
|
1146
1145
|
};
|
|
1147
1146
|
const method = this.safeValue(methods, event);
|
|
1148
|
-
if (method
|
|
1149
|
-
|
|
1150
|
-
}
|
|
1151
|
-
else {
|
|
1152
|
-
return method.call(this, client, message);
|
|
1147
|
+
if (method !== undefined) {
|
|
1148
|
+
method.call(this, client, message);
|
|
1153
1149
|
}
|
|
1154
1150
|
}
|
|
1155
1151
|
}
|
|
@@ -95,7 +95,9 @@ class bitget extends bitget$1 {
|
|
|
95
95
|
else {
|
|
96
96
|
instType = 'SPOT';
|
|
97
97
|
}
|
|
98
|
-
|
|
98
|
+
let instypeAux = undefined;
|
|
99
|
+
[instypeAux, params] = this.handleOptionAndParams(params, 'getInstType', 'instType', instType);
|
|
100
|
+
instType = instypeAux;
|
|
99
101
|
return [instType, params];
|
|
100
102
|
}
|
|
101
103
|
async watchTicker(symbol, params = {}) {
|
|
@@ -816,7 +816,6 @@ class bitmart extends bitmart$1 {
|
|
|
816
816
|
messageHash += ':' + this.safeString(data[0], 'symbol');
|
|
817
817
|
}
|
|
818
818
|
client.resolve(stored, messageHash);
|
|
819
|
-
return message;
|
|
820
819
|
}
|
|
821
820
|
parseWsTrade(trade, market = undefined) {
|
|
822
821
|
// spot
|
|
@@ -918,7 +917,6 @@ class bitmart extends bitmart$1 {
|
|
|
918
917
|
client.resolve(ticker, 'tickers::swap');
|
|
919
918
|
this.resolveMessageHashesForSymbol(client, symbol, ticker, 'tickers::');
|
|
920
919
|
}
|
|
921
|
-
return message;
|
|
922
920
|
}
|
|
923
921
|
resolveMessageHashesForSymbol(client, symbol, result, prexif) {
|
|
924
922
|
const prefixSeparator = '::';
|
|
@@ -1452,11 +1450,8 @@ class bitmart extends bitmart$1 {
|
|
|
1452
1450
|
'subscribe': this.handleSubscriptionStatus,
|
|
1453
1451
|
};
|
|
1454
1452
|
const method = this.safeValue(methods, event);
|
|
1455
|
-
if (method
|
|
1456
|
-
|
|
1457
|
-
}
|
|
1458
|
-
else {
|
|
1459
|
-
return method.call(this, client, message);
|
|
1453
|
+
if (method !== undefined) {
|
|
1454
|
+
method.call(this, client, message);
|
|
1460
1455
|
}
|
|
1461
1456
|
}
|
|
1462
1457
|
}
|
|
@@ -1476,7 +1471,7 @@ class bitmart extends bitmart$1 {
|
|
|
1476
1471
|
const key = keys[i];
|
|
1477
1472
|
if (channel.indexOf(key) >= 0) {
|
|
1478
1473
|
const method = this.safeValue(methods, key);
|
|
1479
|
-
|
|
1474
|
+
method.call(this, client, message);
|
|
1480
1475
|
}
|
|
1481
1476
|
}
|
|
1482
1477
|
}
|
|
@@ -1524,7 +1524,7 @@ class bitmex extends bitmex$1 {
|
|
|
1524
1524
|
//
|
|
1525
1525
|
// { "error": "Rate limit exceeded, retry in 29 seconds." }
|
|
1526
1526
|
//
|
|
1527
|
-
const error = this.
|
|
1527
|
+
const error = this.safeString(message, 'error');
|
|
1528
1528
|
if (error !== undefined) {
|
|
1529
1529
|
const request = this.safeValue(message, 'request', {});
|
|
1530
1530
|
const args = this.safeValue(request, 'args', []);
|
|
@@ -1535,7 +1535,7 @@ class bitmex extends bitmex$1 {
|
|
|
1535
1535
|
const broadKey = this.findBroadlyMatchedKey(broad, error);
|
|
1536
1536
|
let exception = undefined;
|
|
1537
1537
|
if (broadKey === undefined) {
|
|
1538
|
-
exception = new errors.ExchangeError(error);
|
|
1538
|
+
exception = new errors.ExchangeError(error); // c# requirement for now
|
|
1539
1539
|
}
|
|
1540
1540
|
else {
|
|
1541
1541
|
exception = new broad[broadKey](error);
|
|
@@ -1603,14 +1603,11 @@ class bitmex extends bitmex$1 {
|
|
|
1603
1603
|
const request = this.safeValue(message, 'request', {});
|
|
1604
1604
|
const op = this.safeValue(request, 'op');
|
|
1605
1605
|
if (op === 'authKeyExpires') {
|
|
1606
|
-
|
|
1607
|
-
}
|
|
1608
|
-
else {
|
|
1609
|
-
return message;
|
|
1606
|
+
this.handleAuthenticationMessage(client, message);
|
|
1610
1607
|
}
|
|
1611
1608
|
}
|
|
1612
1609
|
else {
|
|
1613
|
-
|
|
1610
|
+
method.call(this, client, message);
|
|
1614
1611
|
}
|
|
1615
1612
|
}
|
|
1616
1613
|
}
|
|
@@ -464,11 +464,8 @@ class bitopro extends bitopro$1 {
|
|
|
464
464
|
};
|
|
465
465
|
const event = this.safeString(message, 'event');
|
|
466
466
|
const method = this.safeValue(methods, event);
|
|
467
|
-
if (method
|
|
468
|
-
|
|
469
|
-
}
|
|
470
|
-
else {
|
|
471
|
-
return method.call(this, client, message);
|
|
467
|
+
if (method !== undefined) {
|
|
468
|
+
method.call(this, client, message);
|
|
472
469
|
}
|
|
473
470
|
}
|
|
474
471
|
}
|
|
@@ -498,10 +498,10 @@ class bitstamp extends bitstamp$1 {
|
|
|
498
498
|
//
|
|
499
499
|
const event = this.safeString(message, 'event');
|
|
500
500
|
if (event === 'bts:subscription_succeeded') {
|
|
501
|
-
|
|
501
|
+
this.handleSubscriptionStatus(client, message);
|
|
502
502
|
}
|
|
503
503
|
else {
|
|
504
|
-
|
|
504
|
+
this.handleSubject(client, message);
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
507
|
async authenticate(params = {}) {
|
|
@@ -524,7 +524,6 @@ class bitstamp extends bitstamp$1 {
|
|
|
524
524
|
this.options['expiresIn'] = this.sum(time, validity);
|
|
525
525
|
this.options['userId'] = userId;
|
|
526
526
|
this.options['wsSessionToken'] = sessionToken;
|
|
527
|
-
return response;
|
|
528
527
|
}
|
|
529
528
|
}
|
|
530
529
|
}
|
|
@@ -412,7 +412,7 @@ class bitvavo extends bitvavo$1 {
|
|
|
412
412
|
//
|
|
413
413
|
const response = this.safeValue(message, 'response');
|
|
414
414
|
if (response === undefined) {
|
|
415
|
-
return
|
|
415
|
+
return;
|
|
416
416
|
}
|
|
417
417
|
const marketId = this.safeString(response, 'market');
|
|
418
418
|
const symbol = this.safeSymbol(marketId, undefined, '-');
|
|
@@ -1194,7 +1194,7 @@ class bitvavo extends bitvavo$1 {
|
|
|
1194
1194
|
}
|
|
1195
1195
|
return message;
|
|
1196
1196
|
}
|
|
1197
|
-
authenticate(params = {}) {
|
|
1197
|
+
async authenticate(params = {}) {
|
|
1198
1198
|
const url = this.urls['api']['ws'];
|
|
1199
1199
|
const client = this.client(url);
|
|
1200
1200
|
const messageHash = 'authenticated';
|
|
@@ -1339,9 +1339,16 @@ class bitvavo extends bitvavo$1 {
|
|
|
1339
1339
|
'getCandles': this.handleFetchOHLCV,
|
|
1340
1340
|
'getMarkets': this.handleMarkets,
|
|
1341
1341
|
};
|
|
1342
|
-
const event = this.
|
|
1343
|
-
|
|
1344
|
-
if (method
|
|
1342
|
+
const event = this.safeString(message, 'event');
|
|
1343
|
+
let method = this.safeValue(methods, event);
|
|
1344
|
+
if (method === undefined) {
|
|
1345
|
+
const action = this.safeString(message, 'action');
|
|
1346
|
+
method = this.safeValue(methods, action);
|
|
1347
|
+
if (method !== undefined) {
|
|
1348
|
+
method.call(this, client, message);
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
else {
|
|
1345
1352
|
method.call(this, client, message);
|
|
1346
1353
|
}
|
|
1347
1354
|
}
|
|
@@ -99,7 +99,7 @@ class blockchaincom extends blockchaincom$1 {
|
|
|
99
99
|
//
|
|
100
100
|
const event = this.safeString(message, 'event');
|
|
101
101
|
if (event === 'subscribed') {
|
|
102
|
-
return
|
|
102
|
+
return;
|
|
103
103
|
}
|
|
104
104
|
const result = { 'info': message };
|
|
105
105
|
const balances = this.safeValue(message, 'balances', []);
|
|
@@ -169,11 +169,9 @@ class blockchaincom extends blockchaincom$1 {
|
|
|
169
169
|
// }
|
|
170
170
|
//
|
|
171
171
|
const event = this.safeString(message, 'event');
|
|
172
|
-
if (event === '
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
else if (event === 'rejected') {
|
|
176
|
-
throw new errors.ExchangeError(this.id + ' ' + this.json(message));
|
|
172
|
+
if (event === 'rejected') {
|
|
173
|
+
const jsonMessage = this.json(message);
|
|
174
|
+
throw new errors.ExchangeError(this.id + ' ' + jsonMessage);
|
|
177
175
|
}
|
|
178
176
|
else if (event === 'updated') {
|
|
179
177
|
const marketId = this.safeString(message, 'symbol');
|
|
@@ -193,7 +191,7 @@ class blockchaincom extends blockchaincom$1 {
|
|
|
193
191
|
stored.append(ohlcv);
|
|
194
192
|
client.resolve(stored, messageHash);
|
|
195
193
|
}
|
|
196
|
-
else {
|
|
194
|
+
else if (event !== 'subscribed') {
|
|
197
195
|
throw new errors.NotSupported(this.id + ' ' + this.json(message));
|
|
198
196
|
}
|
|
199
197
|
}
|
|
@@ -255,7 +253,7 @@ class blockchaincom extends blockchaincom$1 {
|
|
|
255
253
|
const symbol = market['symbol'];
|
|
256
254
|
let ticker = undefined;
|
|
257
255
|
if (event === 'subscribed') {
|
|
258
|
-
return
|
|
256
|
+
return;
|
|
259
257
|
}
|
|
260
258
|
else if (event === 'snapshot') {
|
|
261
259
|
ticker = this.parseTicker(message, market);
|
|
@@ -354,7 +352,7 @@ class blockchaincom extends blockchaincom$1 {
|
|
|
354
352
|
//
|
|
355
353
|
const event = this.safeString(message, 'event');
|
|
356
354
|
if (event !== 'updated') {
|
|
357
|
-
return
|
|
355
|
+
return;
|
|
358
356
|
}
|
|
359
357
|
const marketId = this.safeString(message, 'symbol');
|
|
360
358
|
const symbol = this.safeSymbol(marketId);
|
|
@@ -516,7 +514,7 @@ class blockchaincom extends blockchaincom$1 {
|
|
|
516
514
|
this.orders = new Cache.ArrayCacheBySymbolById(limit);
|
|
517
515
|
}
|
|
518
516
|
if (event === 'subscribed') {
|
|
519
|
-
return
|
|
517
|
+
return;
|
|
520
518
|
}
|
|
521
519
|
else if (event === 'rejected') {
|
|
522
520
|
throw new errors.ExchangeError(this.id + ' ' + this.json(message));
|
|
@@ -686,30 +684,30 @@ class blockchaincom extends blockchaincom$1 {
|
|
|
686
684
|
const messageHash = 'orderbook:' + symbol + ':' + type;
|
|
687
685
|
const datetime = this.safeString(message, 'timestamp');
|
|
688
686
|
const timestamp = this.parse8601(datetime);
|
|
689
|
-
let
|
|
690
|
-
if (
|
|
691
|
-
|
|
692
|
-
this.orderbooks[symbol] =
|
|
687
|
+
let orderbook = this.safeValue(this.orderbooks, symbol);
|
|
688
|
+
if (orderbook === undefined) {
|
|
689
|
+
orderbook = this.countedOrderBook({});
|
|
690
|
+
this.orderbooks[symbol] = orderbook;
|
|
693
691
|
}
|
|
694
692
|
if (event === 'subscribed') {
|
|
695
|
-
return
|
|
693
|
+
return;
|
|
696
694
|
}
|
|
697
695
|
else if (event === 'snapshot') {
|
|
698
696
|
const snapshot = this.parseOrderBook(message, symbol, timestamp, 'bids', 'asks', 'px', 'qty', 'num');
|
|
699
|
-
|
|
697
|
+
orderbook.reset(snapshot);
|
|
700
698
|
}
|
|
701
699
|
else if (event === 'updated') {
|
|
702
700
|
const asks = this.safeValue(message, 'asks', []);
|
|
703
701
|
const bids = this.safeValue(message, 'bids', []);
|
|
704
|
-
this.handleDeltas(
|
|
705
|
-
this.handleDeltas(
|
|
706
|
-
|
|
707
|
-
|
|
702
|
+
this.handleDeltas(orderbook['asks'], asks);
|
|
703
|
+
this.handleDeltas(orderbook['bids'], bids);
|
|
704
|
+
orderbook['timestamp'] = timestamp;
|
|
705
|
+
orderbook['datetime'] = datetime;
|
|
708
706
|
}
|
|
709
707
|
else {
|
|
710
708
|
throw new errors.NotSupported(this.id + ' watchOrderBook() does not support ' + event + ' yet');
|
|
711
709
|
}
|
|
712
|
-
client.resolve(
|
|
710
|
+
client.resolve(orderbook, messageHash);
|
|
713
711
|
}
|
|
714
712
|
handleDelta(bookside, delta) {
|
|
715
713
|
const bookArray = this.parseBidAsk(delta, 'px', 'qty', 'num');
|
|
@@ -750,7 +748,8 @@ class blockchaincom extends blockchaincom$1 {
|
|
|
750
748
|
};
|
|
751
749
|
const handler = this.safeValue(handlers, channel);
|
|
752
750
|
if (handler !== undefined) {
|
|
753
|
-
|
|
751
|
+
handler.call(this, client, message);
|
|
752
|
+
return;
|
|
754
753
|
}
|
|
755
754
|
throw new errors.NotSupported(this.id + ' received an unsupported message: ' + this.json(message));
|
|
756
755
|
}
|
|
@@ -772,7 +771,7 @@ class blockchaincom extends blockchaincom$1 {
|
|
|
772
771
|
future.resolve(true);
|
|
773
772
|
}
|
|
774
773
|
}
|
|
775
|
-
authenticate(params = {}) {
|
|
774
|
+
async authenticate(params = {}) {
|
|
776
775
|
const url = this.urls['api']['ws'];
|
|
777
776
|
const client = this.client(url);
|
|
778
777
|
const messageHash = 'authenticated';
|
|
@@ -906,7 +906,7 @@ class bybit extends bybit$1 {
|
|
|
906
906
|
* @name bybit#watchPositions
|
|
907
907
|
* @see https://bybit-exchange.github.io/docs/v5/websocket/private/position
|
|
908
908
|
* @description watch all open positions
|
|
909
|
-
* @param {string[]
|
|
909
|
+
* @param {string[]} [symbols] list of unified market symbols
|
|
910
910
|
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
911
911
|
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure}
|
|
912
912
|
*/
|
|
@@ -939,7 +939,7 @@ class bybit extends bybit$1 {
|
|
|
939
939
|
}
|
|
940
940
|
setPositionsCache(client, symbols = undefined) {
|
|
941
941
|
if (this.positions !== undefined) {
|
|
942
|
-
return
|
|
942
|
+
return;
|
|
943
943
|
}
|
|
944
944
|
const fetchPositionsSnapshot = this.handleOption('watchPositions', 'fetchPositionsSnapshot', true);
|
|
945
945
|
if (fetchPositionsSnapshot) {
|
|
@@ -1072,7 +1072,7 @@ class bybit extends bybit$1 {
|
|
|
1072
1072
|
}
|
|
1073
1073
|
return this.filterBySymbolSinceLimit(orders, symbol, since, limit, true);
|
|
1074
1074
|
}
|
|
1075
|
-
handleOrder(client, message
|
|
1075
|
+
handleOrder(client, message) {
|
|
1076
1076
|
//
|
|
1077
1077
|
// spot
|
|
1078
1078
|
// {
|
|
@@ -1638,7 +1638,7 @@ class bybit extends bybit$1 {
|
|
|
1638
1638
|
const authenticated = this.safeValue(client.subscriptions, messageHash);
|
|
1639
1639
|
if (authenticated === undefined) {
|
|
1640
1640
|
const expiresInt = this.milliseconds() + 10000;
|
|
1641
|
-
const expires =
|
|
1641
|
+
const expires = this.numberToString(expiresInt);
|
|
1642
1642
|
const path = 'GET/realtime';
|
|
1643
1643
|
const auth = path + expires;
|
|
1644
1644
|
const signature = this.hmac(this.encode(auth), this.encode(this.secret), sha256.sha256, 'hex');
|
|
@@ -1651,7 +1651,7 @@ class bybit extends bybit$1 {
|
|
|
1651
1651
|
const message = this.extend(request, params);
|
|
1652
1652
|
this.watch(url, messageHash, message, messageHash);
|
|
1653
1653
|
}
|
|
1654
|
-
return future;
|
|
1654
|
+
return await future;
|
|
1655
1655
|
}
|
|
1656
1656
|
handleErrorMessage(client, message) {
|
|
1657
1657
|
//
|
package/dist/cjs/src/pro/cex.js
CHANGED
|
@@ -960,15 +960,15 @@ class cex extends cex$1 {
|
|
|
960
960
|
const messageHash = 'orderbook:' + symbol;
|
|
961
961
|
const timestamp = this.safeInteger2(data, 'timestamp_ms', 'timestamp');
|
|
962
962
|
const incrementalId = this.safeNumber(data, 'id');
|
|
963
|
-
const
|
|
963
|
+
const orderbook = this.orderBook({});
|
|
964
964
|
const snapshot = this.parseOrderBook(data, symbol, timestamp, 'bids', 'asks');
|
|
965
965
|
snapshot['nonce'] = incrementalId;
|
|
966
|
-
|
|
966
|
+
orderbook.reset(snapshot);
|
|
967
967
|
this.options['orderbook'][symbol] = {
|
|
968
968
|
'incrementalId': incrementalId,
|
|
969
969
|
};
|
|
970
|
-
this.orderbooks[symbol] =
|
|
971
|
-
client.resolve(
|
|
970
|
+
this.orderbooks[symbol] = orderbook;
|
|
971
|
+
client.resolve(orderbook, messageHash);
|
|
972
972
|
}
|
|
973
973
|
pairToSymbol(pair) {
|
|
974
974
|
const parts = pair.split(':');
|
|
@@ -1434,7 +1434,8 @@ class cex extends cex$1 {
|
|
|
1434
1434
|
handleMessage(client, message) {
|
|
1435
1435
|
const ok = this.safeString(message, 'ok');
|
|
1436
1436
|
if (ok === 'error') {
|
|
1437
|
-
|
|
1437
|
+
this.handleErrorMessage(client, message);
|
|
1438
|
+
return;
|
|
1438
1439
|
}
|
|
1439
1440
|
const event = this.safeString(message, 'e');
|
|
1440
1441
|
const handlers = {
|
|
@@ -1462,9 +1463,8 @@ class cex extends cex$1 {
|
|
|
1462
1463
|
};
|
|
1463
1464
|
const handler = this.safeValue(handlers, event);
|
|
1464
1465
|
if (handler !== undefined) {
|
|
1465
|
-
|
|
1466
|
+
handler.call(this, client, message);
|
|
1466
1467
|
}
|
|
1467
|
-
return message;
|
|
1468
1468
|
}
|
|
1469
1469
|
handleAuthenticationMessage(client, message) {
|
|
1470
1470
|
//
|
|
@@ -461,7 +461,8 @@ class coinbase extends coinbase$1 {
|
|
|
461
461
|
const side = this.safeString(this.options['sides'], sideId);
|
|
462
462
|
const price = this.safeNumber(trade, 'price_level');
|
|
463
463
|
const amount = this.safeNumber(trade, 'new_quantity');
|
|
464
|
-
orderbook[side]
|
|
464
|
+
const orderbookSide = orderbook[side];
|
|
465
|
+
orderbookSide.store(price, amount);
|
|
465
466
|
}
|
|
466
467
|
}
|
|
467
468
|
handleOrderBook(client, message) {
|
|
@@ -554,7 +555,7 @@ class coinbase extends coinbase$1 {
|
|
|
554
555
|
throw new errors.ExchangeError(errorMessage);
|
|
555
556
|
}
|
|
556
557
|
const method = this.safeValue(methods, channel);
|
|
557
|
-
|
|
558
|
+
method.call(this, client, message);
|
|
558
559
|
}
|
|
559
560
|
}
|
|
560
561
|
|
|
@@ -653,29 +653,29 @@ class coinex extends coinex$1 {
|
|
|
653
653
|
//
|
|
654
654
|
const params = this.safeValue(message, 'params', []);
|
|
655
655
|
const fullOrderBook = this.safeValue(params, 0);
|
|
656
|
-
let
|
|
656
|
+
let orderbook = this.safeValue(params, 1);
|
|
657
657
|
const marketId = this.safeString(params, 2);
|
|
658
658
|
const defaultType = this.safeString(this.options, 'defaultType');
|
|
659
659
|
const market = this.safeMarket(marketId, undefined, undefined, defaultType);
|
|
660
660
|
const symbol = market['symbol'];
|
|
661
661
|
const name = 'orderbook';
|
|
662
662
|
const messageHash = name + ':' + symbol;
|
|
663
|
-
const timestamp = this.safeInteger(
|
|
663
|
+
const timestamp = this.safeInteger(orderbook, 'time');
|
|
664
664
|
const currentOrderBook = this.safeValue(this.orderbooks, symbol);
|
|
665
665
|
if (fullOrderBook) {
|
|
666
|
-
const snapshot = this.parseOrderBook(
|
|
666
|
+
const snapshot = this.parseOrderBook(orderbook, symbol, timestamp);
|
|
667
667
|
if (currentOrderBook === undefined) {
|
|
668
|
-
|
|
669
|
-
this.orderbooks[symbol] =
|
|
668
|
+
orderbook = this.orderBook(snapshot);
|
|
669
|
+
this.orderbooks[symbol] = orderbook;
|
|
670
670
|
}
|
|
671
671
|
else {
|
|
672
|
-
|
|
673
|
-
|
|
672
|
+
orderbook = this.orderbooks[symbol];
|
|
673
|
+
orderbook.reset(snapshot);
|
|
674
674
|
}
|
|
675
675
|
}
|
|
676
676
|
else {
|
|
677
|
-
const asks = this.safeValue(
|
|
678
|
-
const bids = this.safeValue(
|
|
677
|
+
const asks = this.safeValue(orderbook, 'asks', []);
|
|
678
|
+
const bids = this.safeValue(orderbook, 'bids', []);
|
|
679
679
|
this.handleDeltas(currentOrderBook['asks'], asks);
|
|
680
680
|
this.handleDeltas(currentOrderBook['bids'], bids);
|
|
681
681
|
currentOrderBook['nonce'] = timestamp;
|
|
@@ -996,9 +996,10 @@ class coinex extends coinex$1 {
|
|
|
996
996
|
};
|
|
997
997
|
const handler = this.safeValue(handlers, method);
|
|
998
998
|
if (handler !== undefined) {
|
|
999
|
-
|
|
999
|
+
handler.call(this, client, message);
|
|
1000
|
+
return;
|
|
1000
1001
|
}
|
|
1001
|
-
|
|
1002
|
+
this.handleSubscriptionStatus(client, message);
|
|
1002
1003
|
}
|
|
1003
1004
|
handleAuthenticationMessage(client, message) {
|
|
1004
1005
|
//
|
|
@@ -1022,7 +1023,8 @@ class coinex extends coinex$1 {
|
|
|
1022
1023
|
if (subscription !== undefined) {
|
|
1023
1024
|
const futureIndex = this.safeString(subscription, 'future');
|
|
1024
1025
|
if (futureIndex === 'ohlcv') {
|
|
1025
|
-
|
|
1026
|
+
this.handleOHLCV(client, message);
|
|
1027
|
+
return;
|
|
1026
1028
|
}
|
|
1027
1029
|
const future = this.safeValue(client.futures, futureIndex);
|
|
1028
1030
|
if (future !== undefined) {
|
|
@@ -1031,7 +1033,7 @@ class coinex extends coinex$1 {
|
|
|
1031
1033
|
delete client.subscriptions[id];
|
|
1032
1034
|
}
|
|
1033
1035
|
}
|
|
1034
|
-
authenticate(params = {}) {
|
|
1036
|
+
async authenticate(params = {}) {
|
|
1035
1037
|
let type = undefined;
|
|
1036
1038
|
[type, params] = this.handleMarketTypeAndParams('authenticate', undefined, params);
|
|
1037
1039
|
const url = this.urls['api']['ws'][type];
|
|
@@ -532,10 +532,11 @@ class currencycom extends currencycom$1 {
|
|
|
532
532
|
};
|
|
533
533
|
const method = this.safeValue(methods, subscriptionDestination);
|
|
534
534
|
if (method === undefined) {
|
|
535
|
-
return
|
|
535
|
+
return;
|
|
536
536
|
}
|
|
537
537
|
else {
|
|
538
|
-
|
|
538
|
+
method.call(this, client, message, subscription);
|
|
539
|
+
return;
|
|
539
540
|
}
|
|
540
541
|
}
|
|
541
542
|
}
|
|
@@ -550,11 +551,8 @@ class currencycom extends currencycom$1 {
|
|
|
550
551
|
'ping': this.handlePong,
|
|
551
552
|
};
|
|
552
553
|
const method = this.safeValue(methods, destination);
|
|
553
|
-
if (method
|
|
554
|
-
|
|
555
|
-
}
|
|
556
|
-
else {
|
|
557
|
-
return method.call(this, client, message);
|
|
554
|
+
if (method !== undefined) {
|
|
555
|
+
method.call(this, client, message);
|
|
558
556
|
}
|
|
559
557
|
}
|
|
560
558
|
}
|
|
@@ -757,16 +757,16 @@ class deribit extends deribit$1 {
|
|
|
757
757
|
};
|
|
758
758
|
const handler = this.safeValue(handlers, channelId);
|
|
759
759
|
if (handler !== undefined) {
|
|
760
|
-
|
|
760
|
+
handler.call(this, client, message);
|
|
761
|
+
return;
|
|
761
762
|
}
|
|
762
763
|
throw new errors.NotSupported(this.id + ' no handler found for this message ' + this.json(message));
|
|
763
764
|
}
|
|
764
765
|
const result = this.safeValue(message, 'result', {});
|
|
765
766
|
const accessToken = this.safeString(result, 'access_token');
|
|
766
767
|
if (accessToken !== undefined) {
|
|
767
|
-
|
|
768
|
+
this.handleAuthenticationMessage(client, message);
|
|
768
769
|
}
|
|
769
|
-
return message;
|
|
770
770
|
}
|
|
771
771
|
handleAuthenticationMessage(client, message) {
|
|
772
772
|
//
|
|
@@ -790,7 +790,7 @@ class deribit extends deribit$1 {
|
|
|
790
790
|
client.resolve(message, messageHash);
|
|
791
791
|
return message;
|
|
792
792
|
}
|
|
793
|
-
authenticate(params = {}) {
|
|
793
|
+
async authenticate(params = {}) {
|
|
794
794
|
const url = this.urls['api']['ws'];
|
|
795
795
|
const client = this.client(url);
|
|
796
796
|
const time = this.milliseconds();
|