ccxt 4.5.55 → 4.5.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/README.md +215 -10
- package/dist/ccxt.browser.min.js +10 -10
- package/dist/cjs/ccxt.js +6 -11
- package/dist/cjs/src/aftermath.js +10 -5
- package/dist/cjs/src/alpaca.js +2 -2
- package/dist/cjs/src/apex.js +26 -17
- package/dist/cjs/src/arkham.js +10 -7
- package/dist/cjs/src/ascendex.js +8 -5
- package/dist/cjs/src/aster.js +7 -4
- package/dist/cjs/src/backpack.js +4 -4
- package/dist/cjs/src/base/Exchange.js +72 -35
- package/dist/cjs/src/base/functions/io.js +25 -0
- package/dist/cjs/src/base/functions.js +1 -0
- package/dist/cjs/src/bigone.js +10 -7
- package/dist/cjs/src/binance.js +196 -198
- package/dist/cjs/src/bingx.js +7 -7
- package/dist/cjs/src/bitfinex.js +71 -58
- package/dist/cjs/src/bitflyer.js +2 -1
- package/dist/cjs/src/bitget.js +16 -5
- package/dist/cjs/src/bitmart.js +18 -10
- package/dist/cjs/src/bitmex.js +8 -5
- package/dist/cjs/src/bitopro.js +2 -2
- package/dist/cjs/src/bitrue.js +4 -3
- package/dist/cjs/src/bitso.js +7 -4
- package/dist/cjs/src/bitstamp.js +7 -4
- package/dist/cjs/src/bitteam.js +1 -1
- package/dist/cjs/src/bittrade.js +2 -2
- package/dist/cjs/src/bitvavo.js +457 -34
- package/dist/cjs/src/blofin.js +28 -4
- package/dist/cjs/src/bullish.js +6 -5
- package/dist/cjs/src/bybit.js +19 -17
- package/dist/cjs/src/bybiteu.js +1 -0
- package/dist/cjs/src/bydfi.js +1 -1
- package/dist/cjs/src/cex.js +3 -3
- package/dist/cjs/src/coinbase.js +75 -65
- package/dist/cjs/src/coinbaseexchange.js +4 -3
- package/dist/cjs/src/coinbaseinternational.js +17 -10
- package/dist/cjs/src/coinex.js +79 -77
- package/dist/cjs/src/coinmetro.js +1 -1
- package/dist/cjs/src/coinsph.js +5 -5
- package/dist/cjs/src/cryptocom.js +52 -54
- package/dist/cjs/src/cryptomus.js +43 -39
- package/dist/cjs/src/deepcoin.js +9 -5
- package/dist/cjs/src/delta.js +53 -53
- package/dist/cjs/src/deribit.js +35 -35
- package/dist/cjs/src/derive.js +31 -31
- package/dist/cjs/src/digifinex.js +45 -45
- package/dist/cjs/src/exmo.js +104 -122
- package/dist/cjs/src/extended.js +3497 -0
- package/dist/cjs/src/foxbit.js +72 -76
- package/dist/cjs/src/gate.js +53 -53
- package/dist/cjs/src/gemini.js +45 -45
- package/dist/cjs/src/grvt.js +17 -11
- package/dist/cjs/src/hashkey.js +56 -58
- package/dist/cjs/src/hibachi.js +1 -1
- package/dist/cjs/src/hitbtc.js +5 -14
- package/dist/cjs/src/hollaex.js +51 -54
- package/dist/cjs/src/htx.js +84 -72
- package/dist/cjs/src/hyperliquid.js +60 -55
- package/dist/cjs/src/indodax.js +4 -3
- package/dist/cjs/src/kraken.js +71 -71
- package/dist/cjs/src/krakenfutures.js +2 -1
- package/dist/cjs/src/kucoin.js +3 -2
- package/dist/cjs/src/latoken.js +30 -32
- package/dist/cjs/src/lbank.js +64 -60
- package/dist/cjs/src/lighter.js +36 -38
- package/dist/cjs/src/luno.js +36 -44
- package/dist/cjs/src/mercado.js +2 -1
- package/dist/cjs/src/mexc.js +72 -63
- package/dist/cjs/src/modetrade.js +51 -53
- package/dist/cjs/src/ndax.js +35 -37
- package/dist/cjs/src/okx.js +23 -5
- package/dist/cjs/src/onetrading.js +21 -23
- package/dist/cjs/src/p2b.js +8 -4
- package/dist/cjs/src/paradex.js +3 -2
- package/dist/cjs/src/phemex.js +47 -47
- package/dist/cjs/src/poloniex.js +19 -13
- package/dist/cjs/src/pro/alpaca.js +1 -1
- package/dist/cjs/src/pro/apex.js +11 -2
- package/dist/cjs/src/pro/arkham.js +1 -1
- package/dist/cjs/src/pro/aster.js +10 -9
- package/dist/cjs/src/pro/backpack.js +1 -1
- package/dist/cjs/src/pro/binance.js +6 -6
- package/dist/cjs/src/pro/bingx.js +7 -2
- package/dist/cjs/src/pro/bitget.js +1 -1
- package/dist/cjs/src/pro/bithumb.js +1 -1
- package/dist/cjs/src/pro/bitmart.js +10 -0
- package/dist/cjs/src/pro/bitmex.js +1 -1
- package/dist/cjs/src/pro/bitstamp.js +1 -1
- package/dist/cjs/src/pro/blockchaincom.js +1 -1
- package/dist/cjs/src/pro/bybit.js +1 -1
- package/dist/cjs/src/pro/cex.js +1 -1
- package/dist/cjs/src/pro/coinex.js +1 -1
- package/dist/cjs/src/pro/coinone.js +1 -1
- package/dist/cjs/src/pro/cryptocom.js +3 -1
- package/dist/cjs/src/pro/dydx.js +1 -1
- package/dist/cjs/src/pro/exmo.js +1 -1
- package/dist/cjs/src/pro/extended.js +865 -0
- package/dist/cjs/src/pro/gate.js +1 -1
- package/dist/cjs/src/pro/grvt.js +8 -0
- package/dist/cjs/src/pro/htx.js +4 -4
- package/dist/cjs/src/pro/independentreserve.js +1 -1
- package/dist/cjs/src/pro/krakenfutures.js +16 -4
- package/dist/cjs/src/pro/kucoin.js +1 -1
- package/dist/cjs/src/pro/luno.js +3 -3
- package/dist/cjs/src/pro/modetrade.js +3 -3
- package/dist/cjs/src/pro/okx.js +4 -4
- package/dist/cjs/src/pro/onetrading.js +1 -1
- package/dist/cjs/src/pro/toobit.js +1 -1
- package/dist/cjs/src/pro/weex.js +1 -1
- package/dist/cjs/src/pro/woo.js +4 -4
- package/dist/cjs/src/pro/woofipro.js +3 -3
- package/dist/cjs/src/pro/xt.js +1 -1
- package/dist/cjs/src/static_dependencies/starknet/utils/hash/classHash.js +7 -7
- package/dist/cjs/src/tokocrypto.js +1 -1
- package/dist/cjs/src/toobit.js +3 -3
- package/dist/cjs/src/upbit.js +3 -3
- package/dist/cjs/src/weex.js +57 -62
- package/dist/cjs/src/whitebit.js +61 -63
- package/dist/cjs/src/woo.js +66 -55
- package/dist/cjs/src/woofipro.js +54 -48
- package/dist/cjs/src/xt.js +3 -2
- package/dist/cjs/src/yobit.js +4 -2
- package/dist/cjs/src/zebpay.js +73 -75
- package/js/ccxt.d.ts +8 -14
- package/js/ccxt.js +6 -10
- package/js/src/abstract/bitvavo.d.ts +15 -7
- package/js/src/abstract/extended.d.ts +58 -0
- package/js/src/abstract/mexc.d.ts +1 -0
- package/js/src/aftermath.js +10 -5
- package/js/src/alpaca.js +2 -2
- package/js/src/apex.d.ts +1 -1
- package/js/src/apex.js +26 -17
- package/js/src/arkham.js +10 -7
- package/js/src/ascendex.js +8 -5
- package/js/src/aster.js +7 -4
- package/js/src/backpack.js +4 -4
- package/js/src/base/Exchange.d.ts +10 -6
- package/js/src/base/Exchange.js +72 -35
- package/js/src/base/functions/io.d.ts +7 -0
- package/js/src/base/functions/io.js +24 -0
- package/js/src/bigone.js +10 -7
- package/js/src/binance.d.ts +2 -0
- package/js/src/binance.js +200 -202
- package/js/src/bingx.js +7 -7
- package/js/src/bitfinex.d.ts +2 -0
- package/js/src/bitfinex.js +71 -58
- package/js/src/bitflyer.js +2 -1
- package/js/src/bitget.js +16 -5
- package/js/src/bitmart.js +18 -10
- package/js/src/bitmex.js +8 -5
- package/js/src/bitopro.js +2 -2
- package/js/src/bitrue.js +4 -3
- package/js/src/bitso.js +7 -4
- package/js/src/bitstamp.js +7 -4
- package/js/src/bitteam.js +1 -1
- package/js/src/bittrade.js +2 -2
- package/js/src/bitvavo.d.ts +114 -21
- package/js/src/bitvavo.js +457 -34
- package/js/src/blofin.d.ts +1 -0
- package/js/src/blofin.js +28 -4
- package/js/src/bullish.js +6 -5
- package/js/src/bybit.d.ts +1 -1
- package/js/src/bybit.js +19 -17
- package/js/src/bybiteu.js +1 -0
- package/js/src/bydfi.js +1 -1
- package/js/src/cex.js +3 -3
- package/js/src/coinbase.d.ts +63 -56
- package/js/src/coinbase.js +75 -65
- package/js/src/coinbaseexchange.js +4 -3
- package/js/src/coinbaseinternational.d.ts +1 -1
- package/js/src/coinbaseinternational.js +17 -10
- package/js/src/coinex.d.ts +2 -1
- package/js/src/coinex.js +79 -77
- package/js/src/coinmetro.d.ts +1 -1
- package/js/src/coinmetro.js +1 -1
- package/js/src/coinsph.js +5 -5
- package/js/src/cryptocom.d.ts +1 -0
- package/js/src/cryptocom.js +52 -54
- package/js/src/cryptomus.d.ts +2 -1
- package/js/src/cryptomus.js +43 -39
- package/js/src/deepcoin.js +9 -5
- package/js/src/delta.d.ts +1 -0
- package/js/src/delta.js +53 -53
- package/js/src/deribit.d.ts +1 -0
- package/js/src/deribit.js +35 -35
- package/js/src/derive.d.ts +1 -0
- package/js/src/derive.js +31 -31
- package/js/src/digifinex.d.ts +1 -0
- package/js/src/digifinex.js +45 -45
- package/js/src/exmo.d.ts +1 -0
- package/js/src/exmo.js +104 -122
- package/js/src/extended.d.ts +554 -0
- package/js/src/extended.js +3490 -0
- package/js/src/foxbit.d.ts +1 -0
- package/js/src/foxbit.js +72 -76
- package/js/src/gate.d.ts +1 -0
- package/js/src/gate.js +53 -53
- package/js/src/gemini.d.ts +2 -1
- package/js/src/gemini.js +45 -45
- package/js/src/grvt.d.ts +1 -1
- package/js/src/grvt.js +17 -11
- package/js/src/hashkey.d.ts +1 -0
- package/js/src/hashkey.js +56 -58
- package/js/src/hibachi.d.ts +1 -1
- package/js/src/hibachi.js +1 -1
- package/js/src/hitbtc.d.ts +0 -1
- package/js/src/hitbtc.js +5 -14
- package/js/src/hollaex.d.ts +1 -0
- package/js/src/hollaex.js +51 -54
- package/js/src/htx.d.ts +1 -0
- package/js/src/htx.js +84 -72
- package/js/src/hyperliquid.d.ts +5 -4
- package/js/src/hyperliquid.js +60 -55
- package/js/src/indodax.js +4 -3
- package/js/src/kraken.d.ts +2 -1
- package/js/src/kraken.js +71 -71
- package/js/src/krakenfutures.js +2 -1
- package/js/src/kucoin.js +3 -2
- package/js/src/latoken.d.ts +1 -0
- package/js/src/latoken.js +30 -32
- package/js/src/lbank.d.ts +1 -0
- package/js/src/lbank.js +64 -60
- package/js/src/lighter.d.ts +2 -1
- package/js/src/lighter.js +36 -38
- package/js/src/luno.d.ts +1 -0
- package/js/src/luno.js +36 -44
- package/js/src/mercado.js +2 -1
- package/js/src/mexc.d.ts +4 -3
- package/js/src/mexc.js +72 -63
- package/js/src/modetrade.d.ts +1 -0
- package/js/src/modetrade.js +51 -53
- package/js/src/ndax.d.ts +1 -0
- package/js/src/ndax.js +35 -37
- package/js/src/okx.js +23 -5
- package/js/src/onetrading.d.ts +2 -1
- package/js/src/onetrading.js +21 -23
- package/js/src/p2b.js +8 -4
- package/js/src/paradex.js +3 -2
- package/js/src/phemex.d.ts +1 -0
- package/js/src/phemex.js +47 -47
- package/js/src/poloniex.js +19 -13
- package/js/src/pro/alpaca.js +1 -1
- package/js/src/pro/apex.js +11 -2
- package/js/src/pro/arkham.js +1 -1
- package/js/src/pro/aster.js +10 -9
- package/js/src/pro/backpack.js +1 -1
- package/js/src/pro/binance.d.ts +1 -1
- package/js/src/pro/binance.js +6 -6
- package/js/src/pro/bingx.js +7 -2
- package/js/src/pro/bitget.js +1 -1
- package/js/src/pro/bithumb.js +1 -1
- package/js/src/pro/bitmart.js +10 -0
- package/js/src/pro/bitmex.js +1 -1
- package/js/src/pro/bitstamp.js +1 -1
- package/js/src/pro/blockchaincom.js +1 -1
- package/js/src/pro/bybit.js +1 -1
- package/js/src/pro/cex.js +1 -1
- package/js/src/pro/coinex.js +1 -1
- package/js/src/pro/coinone.js +1 -1
- package/js/src/pro/cryptocom.js +3 -1
- package/js/src/pro/dydx.js +1 -1
- package/js/src/pro/exmo.js +1 -1
- package/js/src/pro/extended.d.ts +126 -0
- package/js/src/pro/extended.js +858 -0
- package/js/src/pro/gate.js +1 -1
- package/js/src/pro/grvt.js +8 -0
- package/js/src/pro/htx.d.ts +4 -4
- package/js/src/pro/htx.js +4 -4
- package/js/src/pro/independentreserve.js +1 -1
- package/js/src/pro/krakenfutures.d.ts +4 -4
- package/js/src/pro/krakenfutures.js +16 -4
- package/js/src/pro/kucoin.js +1 -1
- package/js/src/pro/luno.d.ts +1 -1
- package/js/src/pro/luno.js +3 -3
- package/js/src/pro/modetrade.d.ts +3 -3
- package/js/src/pro/modetrade.js +3 -3
- package/js/src/pro/okx.d.ts +4 -4
- package/js/src/pro/okx.js +4 -4
- package/js/src/pro/onetrading.js +1 -1
- package/js/src/pro/toobit.js +1 -1
- package/js/src/pro/weex.js +1 -1
- package/js/src/pro/woo.d.ts +4 -4
- package/js/src/pro/woo.js +4 -4
- package/js/src/pro/woofipro.d.ts +3 -3
- package/js/src/pro/woofipro.js +3 -3
- package/js/src/pro/xt.js +1 -1
- package/js/src/tokocrypto.js +1 -1
- package/js/src/toobit.d.ts +1 -1
- package/js/src/toobit.js +3 -3
- package/js/src/upbit.js +3 -3
- package/js/src/weex.d.ts +1 -0
- package/js/src/weex.js +57 -62
- package/js/src/whitebit.d.ts +1 -0
- package/js/src/whitebit.js +61 -63
- package/js/src/woo.d.ts +1 -0
- package/js/src/woo.js +66 -55
- package/js/src/woofipro.d.ts +1 -0
- package/js/src/woofipro.js +54 -48
- package/js/src/xt.js +3 -2
- package/js/src/yobit.js +4 -2
- package/js/src/zebpay.d.ts +2 -1
- package/js/src/zebpay.js +73 -75
- package/package.json +25 -11
- package/dist/cjs/src/gateio.js +0 -18
- package/dist/cjs/src/oxfun.js +0 -2931
- package/dist/cjs/src/pro/gateio.js +0 -18
- package/dist/cjs/src/pro/oxfun.js +0 -1113
- package/js/src/abstract/gateio.d.ts +0 -346
- package/js/src/abstract/gateio.js +0 -5
- package/js/src/abstract/oxfun.d.ts +0 -37
- package/js/src/gateio.d.ts +0 -4
- package/js/src/gateio.js +0 -11
- package/js/src/oxfun.d.ts +0 -442
- package/js/src/oxfun.js +0 -2924
- package/js/src/pro/gateio.d.ts +0 -4
- package/js/src/pro/gateio.js +0 -11
- package/js/src/pro/oxfun.d.ts +0 -234
- package/js/src/pro/oxfun.js +0 -1106
- /package/dist/cjs/src/abstract/{oxfun.js → extended.js} +0 -0
- /package/js/src/abstract/{oxfun.js → extended.js} +0 -0
package/js/src/paradex.js
CHANGED
|
@@ -622,6 +622,7 @@ export default class paradex extends Exchange {
|
|
|
622
622
|
else {
|
|
623
623
|
expiry = undefined;
|
|
624
624
|
}
|
|
625
|
+
const expireDatetime = (expiry === 0) ? undefined : this.iso8601(expiry);
|
|
625
626
|
return this.safeMarketStructure({
|
|
626
627
|
'id': marketId,
|
|
627
628
|
'symbol': symbol,
|
|
@@ -645,7 +646,7 @@ export default class paradex extends Exchange {
|
|
|
645
646
|
'maker': makerFee,
|
|
646
647
|
'contractSize': this.parseNumber('1'),
|
|
647
648
|
'expiry': expiry,
|
|
648
|
-
'expiryDatetime':
|
|
649
|
+
'expiryDatetime': expireDatetime,
|
|
649
650
|
'strike': this.parseNumber(strikePrice),
|
|
650
651
|
'optionType': this.safeStringLower(market, 'option_type'),
|
|
651
652
|
'precision': {
|
|
@@ -1491,7 +1492,7 @@ export default class paradex extends Exchange {
|
|
|
1491
1492
|
'GTC': 'GTC',
|
|
1492
1493
|
'POST_ONLY': 'PO',
|
|
1493
1494
|
};
|
|
1494
|
-
return this.safeString(timeInForces, timeInForce
|
|
1495
|
+
return this.safeString(timeInForces, timeInForce);
|
|
1495
1496
|
}
|
|
1496
1497
|
parseOrderStatus(status) {
|
|
1497
1498
|
if (status !== undefined) {
|
package/js/src/phemex.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export default class phemex extends Exchange {
|
|
|
26
26
|
* @returns {object} an associative dictionary of currencies
|
|
27
27
|
*/
|
|
28
28
|
fetchCurrencies(params?: {}): Promise<Currencies>;
|
|
29
|
+
parseCurrency(rawCurrency: Dict): Currency;
|
|
29
30
|
customParseBidAsk(bidask: any, priceKey?: number, amountKey?: number, market?: Market): number[];
|
|
30
31
|
customParseOrderBook(orderbook: any, symbol: any, timestamp?: any, bidsKey?: string, asksKey?: string, priceKey?: number, amountKey?: number, market?: Market): any;
|
|
31
32
|
/**
|
package/js/src/phemex.js
CHANGED
|
@@ -726,6 +726,7 @@ export default class phemex extends Exchange {
|
|
|
726
726
|
// "1.0"
|
|
727
727
|
contractSize = this.parseNumber(contractSizeString);
|
|
728
728
|
}
|
|
729
|
+
const isLinear = !inverse;
|
|
729
730
|
return this.safeMarketStructure({
|
|
730
731
|
'id': id,
|
|
731
732
|
'symbol': base + '/' + quote + ':' + settle,
|
|
@@ -743,7 +744,7 @@ export default class phemex extends Exchange {
|
|
|
743
744
|
'option': false,
|
|
744
745
|
'active': status === 'Listed',
|
|
745
746
|
'contract': true,
|
|
746
|
-
'linear':
|
|
747
|
+
'linear': isLinear,
|
|
747
748
|
'inverse': inverse,
|
|
748
749
|
'taker': this.parseNumber(this.fromEn(takerFeeRateEr, ratioScale)),
|
|
749
750
|
'maker': this.parseNumber(this.fromEn(makerFeeRateEr, ratioScale)),
|
|
@@ -1138,50 +1139,48 @@ export default class phemex extends Exchange {
|
|
|
1138
1139
|
// }
|
|
1139
1140
|
const data = this.safeValue(response, 'data', {});
|
|
1140
1141
|
const currencies = this.safeValue(data, 'currencies', []);
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
},
|
|
1174
|
-
'withdraw': {
|
|
1175
|
-
'min': undefined,
|
|
1176
|
-
'max': undefined,
|
|
1177
|
-
},
|
|
1142
|
+
return this.parseCurrencies(currencies);
|
|
1143
|
+
}
|
|
1144
|
+
parseCurrency(rawCurrency) {
|
|
1145
|
+
const id = this.safeString(rawCurrency, 'currency');
|
|
1146
|
+
const code = this.safeCurrencyCode(id);
|
|
1147
|
+
const valueScaleString = this.safeString(rawCurrency, 'valueScale');
|
|
1148
|
+
const valueScale = parseInt(valueScaleString);
|
|
1149
|
+
const minValueEv = this.safeString(rawCurrency, 'minValueEv');
|
|
1150
|
+
const maxValueEv = this.safeString(rawCurrency, 'maxValueEv');
|
|
1151
|
+
let minAmount = undefined;
|
|
1152
|
+
let maxAmount = undefined;
|
|
1153
|
+
let precision = undefined;
|
|
1154
|
+
if (valueScale !== undefined) {
|
|
1155
|
+
const precisionString = this.parsePrecision(valueScaleString);
|
|
1156
|
+
precision = this.parseNumber(precisionString);
|
|
1157
|
+
minAmount = this.parseNumber(Precise.stringMul(minValueEv, precisionString));
|
|
1158
|
+
maxAmount = this.parseNumber(Precise.stringMul(maxValueEv, precisionString));
|
|
1159
|
+
}
|
|
1160
|
+
return this.safeCurrencyStructure({
|
|
1161
|
+
'id': id,
|
|
1162
|
+
'info': rawCurrency,
|
|
1163
|
+
'code': code,
|
|
1164
|
+
'name': this.safeString(rawCurrency, 'name'),
|
|
1165
|
+
'active': this.safeString(rawCurrency, 'status') === 'Listed',
|
|
1166
|
+
'deposit': undefined,
|
|
1167
|
+
'withdraw': undefined,
|
|
1168
|
+
'fee': undefined,
|
|
1169
|
+
'precision': precision,
|
|
1170
|
+
'limits': {
|
|
1171
|
+
'amount': {
|
|
1172
|
+
'min': minAmount,
|
|
1173
|
+
'max': maxAmount,
|
|
1178
1174
|
},
|
|
1179
|
-
'
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1175
|
+
'withdraw': {
|
|
1176
|
+
'min': undefined,
|
|
1177
|
+
'max': undefined,
|
|
1178
|
+
},
|
|
1179
|
+
},
|
|
1180
|
+
'valueScale': valueScale,
|
|
1181
|
+
'networks': undefined,
|
|
1182
|
+
'type': 'crypto',
|
|
1183
|
+
});
|
|
1185
1184
|
}
|
|
1186
1185
|
customParseBidAsk(bidask, priceKey = 0, amountKey = 1, market = undefined) {
|
|
1187
1186
|
if (market === undefined) {
|
|
@@ -3805,7 +3804,7 @@ export default class phemex extends Exchange {
|
|
|
3805
3804
|
'txid': txid,
|
|
3806
3805
|
'timestamp': timestamp,
|
|
3807
3806
|
'datetime': this.iso8601(timestamp),
|
|
3808
|
-
'network': this.networkIdToCode(networkId),
|
|
3807
|
+
'network': this.networkIdToCode(networkId, code),
|
|
3809
3808
|
'address': address,
|
|
3810
3809
|
'addressTo': address,
|
|
3811
3810
|
'addressFrom': undefined,
|
|
@@ -4662,11 +4661,12 @@ export default class phemex extends Exchange {
|
|
|
4662
4661
|
for (let i = 0; i < riskLimits.length; i++) {
|
|
4663
4662
|
const tier = riskLimits[i];
|
|
4664
4663
|
const maxNotional = this.safeInteger(tier, 'limit');
|
|
4664
|
+
const minNotionalResponse = minNotional; // java req
|
|
4665
4665
|
tiers.push({
|
|
4666
4666
|
'tier': this.sum(i, 1),
|
|
4667
4667
|
'symbol': this.safeSymbol(marketId, market),
|
|
4668
4668
|
'currency': market['settle'],
|
|
4669
|
-
'minNotional':
|
|
4669
|
+
'minNotional': minNotionalResponse,
|
|
4670
4670
|
'maxNotional': maxNotional,
|
|
4671
4671
|
'maintenanceMarginRate': this.safeString(tier, 'maintenanceMargin'),
|
|
4672
4672
|
'maxLeverage': undefined,
|
|
@@ -5077,7 +5077,7 @@ export default class phemex extends Exchange {
|
|
|
5077
5077
|
[networkCode, params] = this.handleNetworkCodeAndParams(params);
|
|
5078
5078
|
let networkId = undefined;
|
|
5079
5079
|
if (networkCode !== undefined) {
|
|
5080
|
-
networkId = this.networkCodeToId(networkCode);
|
|
5080
|
+
networkId = this.networkCodeToId(networkCode, code);
|
|
5081
5081
|
}
|
|
5082
5082
|
const stableCoins = this.safeValue(this.options, 'stableCoins');
|
|
5083
5083
|
if (networkId === undefined) {
|
package/js/src/poloniex.js
CHANGED
|
@@ -917,6 +917,7 @@ export default class poloniex extends Exchange {
|
|
|
917
917
|
if (alias !== undefined) {
|
|
918
918
|
type = 'future';
|
|
919
919
|
}
|
|
920
|
+
const marketType = (type === 'future') ? 'future' : 'swap';
|
|
920
921
|
return {
|
|
921
922
|
'id': id,
|
|
922
923
|
'symbol': symbol,
|
|
@@ -926,7 +927,7 @@ export default class poloniex extends Exchange {
|
|
|
926
927
|
'baseId': baseId,
|
|
927
928
|
'quoteId': quoteId,
|
|
928
929
|
'settleId': settleId,
|
|
929
|
-
'type':
|
|
930
|
+
'type': marketType,
|
|
930
931
|
'spot': false,
|
|
931
932
|
'margin': false,
|
|
932
933
|
'swap': type === 'swap',
|
|
@@ -2772,14 +2773,23 @@ export default class poloniex extends Exchange {
|
|
|
2772
2773
|
async withdraw(code, amount, address, tag = undefined, params = {}) {
|
|
2773
2774
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
2774
2775
|
this.checkAddress(address);
|
|
2775
|
-
const
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2776
|
+
const currency = this.currency(code);
|
|
2777
|
+
const request = {
|
|
2778
|
+
'coin': currency['id'],
|
|
2779
|
+
'amount': this.currencyToPrecision(code, amount),
|
|
2780
|
+
'address': address,
|
|
2781
|
+
};
|
|
2782
|
+
let networkCode = undefined;
|
|
2783
|
+
[networkCode, params] = this.handleNetworkCodeAndParams(params);
|
|
2784
|
+
if (networkCode === undefined) {
|
|
2785
|
+
// we need to know the network to find out the currency-junction
|
|
2786
|
+
throw new ArgumentsRequired(this.id + ' withdraw requires a network parameter for ' + code + '.');
|
|
2787
|
+
}
|
|
2788
|
+
request['network'] = this.networkCodeToId(networkCode, code);
|
|
2779
2789
|
if (tag !== undefined) {
|
|
2780
2790
|
request['paymentId'] = tag;
|
|
2781
2791
|
}
|
|
2782
|
-
const response = await this.
|
|
2792
|
+
const response = await this.privatePostV2WalletsWithdraw(this.extend(request, params));
|
|
2783
2793
|
//
|
|
2784
2794
|
// {
|
|
2785
2795
|
// "response": "Withdrew 1.00000000 USDT.",
|
|
@@ -2787,11 +2797,7 @@ export default class poloniex extends Exchange {
|
|
|
2787
2797
|
// "withdrawalNumber": 13449869
|
|
2788
2798
|
// }
|
|
2789
2799
|
//
|
|
2790
|
-
|
|
2791
|
-
'response': response,
|
|
2792
|
-
'withdrawNetworkEntry': networkEntry,
|
|
2793
|
-
};
|
|
2794
|
-
return this.parseTransaction(withdrawResponse, currency);
|
|
2800
|
+
return this.parseTransaction(response, currency);
|
|
2795
2801
|
}
|
|
2796
2802
|
async fetchTransactionsHelper(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2797
2803
|
await this.loadMarkets();
|
|
@@ -3004,7 +3010,7 @@ export default class poloniex extends Exchange {
|
|
|
3004
3010
|
for (let j = 0; j < childChains.length; j++) {
|
|
3005
3011
|
let networkId = childChains[j];
|
|
3006
3012
|
networkId = networkId.replace(code, '');
|
|
3007
|
-
const networkCode = this.networkIdToCode(networkId);
|
|
3013
|
+
const networkCode = this.networkIdToCode(networkId, currency['code']);
|
|
3008
3014
|
const networkInfo = this.safeValue(response, networkId);
|
|
3009
3015
|
const networkObject = {};
|
|
3010
3016
|
const withdrawFee = this.safeNumber(networkInfo, 'withdrawalFee');
|
|
@@ -3040,7 +3046,7 @@ export default class poloniex extends Exchange {
|
|
|
3040
3046
|
};
|
|
3041
3047
|
depositWithdrawFee['withdraw'] = withdrawResult;
|
|
3042
3048
|
depositWithdrawFee['deposit'] = depositResult;
|
|
3043
|
-
const networkCode = this.networkIdToCode(networkId);
|
|
3049
|
+
const networkCode = this.networkIdToCode(networkId, this.safeString(currency, 'code'));
|
|
3044
3050
|
depositWithdrawFee['networks'][networkCode] = {
|
|
3045
3051
|
'withdraw': withdrawResult,
|
|
3046
3052
|
'deposit': depositResult,
|
package/js/src/pro/alpaca.js
CHANGED
|
@@ -262,7 +262,7 @@ export default class alpaca extends alpacaRest {
|
|
|
262
262
|
client.resolve(orderbook, messageHash);
|
|
263
263
|
}
|
|
264
264
|
handleDelta(bookside, delta) {
|
|
265
|
-
const bidAsk = this.
|
|
265
|
+
const bidAsk = this.parseOrderBookBidAsk(delta, 'p', 's');
|
|
266
266
|
bookside.storeArray(bidAsk);
|
|
267
267
|
}
|
|
268
268
|
handleDeltas(bookside, deltas) {
|
package/js/src/pro/apex.js
CHANGED
|
@@ -336,7 +336,7 @@ export default class apex extends apexRest {
|
|
|
336
336
|
client.resolve(orderbook, messageHash);
|
|
337
337
|
}
|
|
338
338
|
handleDelta(bookside, delta) {
|
|
339
|
-
const bidAsk = this.
|
|
339
|
+
const bidAsk = this.parseOrderBookBidAsk(delta, 0, 1);
|
|
340
340
|
bookside.storeArray(bidAsk);
|
|
341
341
|
}
|
|
342
342
|
handleDeltas(bookside, deltas) {
|
|
@@ -762,7 +762,7 @@ export default class apex extends apexRest {
|
|
|
762
762
|
async loadPositionsSnapshot(client, messageHash) {
|
|
763
763
|
// as only one ws channel gives positions for all types, for snapshot must load all positions
|
|
764
764
|
const fetchFunctions = [
|
|
765
|
-
this.fetchPositions(
|
|
765
|
+
this.fetchPositions(),
|
|
766
766
|
];
|
|
767
767
|
const promises = await Promise.all(fetchFunctions);
|
|
768
768
|
this.positions = new ArrayCacheBySymbolBySide();
|
|
@@ -932,6 +932,15 @@ export default class apex extends apexRest {
|
|
|
932
932
|
const ret_msg = this.safeString(message, 'ret_msg');
|
|
933
933
|
const request = this.safeValue(message, 'request', {});
|
|
934
934
|
const op = this.safeString(request, 'op');
|
|
935
|
+
// Benign re-subscribe notice (same shape as bitmart 90008 /
|
|
936
|
+
// krakenfutures "Already subscribed"): the original subscription
|
|
937
|
+
// is still active and delivering data on this socket. Without
|
|
938
|
+
// this short-circuit the catch-clause's `client.reject(error,
|
|
939
|
+
// messageHash)` rejects every in-flight future on the connection
|
|
940
|
+
// because apex doesn't echo a `reqId` on these warnings.
|
|
941
|
+
if (ret_msg !== undefined && ret_msg.indexOf('already subscribed') >= 0) {
|
|
942
|
+
return false;
|
|
943
|
+
}
|
|
935
944
|
if (op === 'auth') {
|
|
936
945
|
throw new AuthenticationError('Authentication failed: ' + ret_msg);
|
|
937
946
|
}
|
package/js/src/pro/arkham.js
CHANGED
|
@@ -292,7 +292,7 @@ export default class arkham extends arkhamRest {
|
|
|
292
292
|
client.resolve(this.orderbooks[symbol], messageHash);
|
|
293
293
|
}
|
|
294
294
|
handleDelta(bookside, delta) {
|
|
295
|
-
const bidAsk = this.
|
|
295
|
+
const bidAsk = this.parseOrderBookBidAsk(delta, 'price', 'size');
|
|
296
296
|
bookside.storeArray(bidAsk);
|
|
297
297
|
}
|
|
298
298
|
/**
|
package/js/src/pro/aster.js
CHANGED
|
@@ -372,13 +372,11 @@ export default class aster extends asterRest {
|
|
|
372
372
|
}
|
|
373
373
|
parseWsTicker(message, marketType) {
|
|
374
374
|
const event = this.safeString(message, 'e');
|
|
375
|
-
const part = event.split('@');
|
|
376
|
-
const channel = this.safeString(part, 1);
|
|
377
375
|
const marketId = this.safeString(message, 's');
|
|
378
376
|
const timestamp = this.safeInteger(message, 'E');
|
|
379
377
|
const market = this.safeMarket(marketId, undefined, undefined, marketType);
|
|
380
378
|
const last = this.safeString(message, 'c');
|
|
381
|
-
if (
|
|
379
|
+
if (event === 'markPriceUpdate') {
|
|
382
380
|
return this.safeTicker({
|
|
383
381
|
'symbol': market['symbol'],
|
|
384
382
|
'timestamp': timestamp,
|
|
@@ -1198,7 +1196,12 @@ export default class aster extends asterRest {
|
|
|
1198
1196
|
return;
|
|
1199
1197
|
}
|
|
1200
1198
|
try {
|
|
1201
|
-
|
|
1199
|
+
if (type === 'spot') {
|
|
1200
|
+
await this.sapiPrivatePutV3ListenKey(); // extend the expiry
|
|
1201
|
+
}
|
|
1202
|
+
else {
|
|
1203
|
+
await this.fapiPrivatePutV3ListenKey(); // extend the expiry
|
|
1204
|
+
}
|
|
1202
1205
|
}
|
|
1203
1206
|
catch (error) {
|
|
1204
1207
|
const url = this.urls['api']['ws']['private'][type] + '/' + listenKey;
|
|
@@ -1875,13 +1878,11 @@ export default class aster extends asterRest {
|
|
|
1875
1878
|
const messageInner = this.safeDict(message, 'data', message); // can be either wrapped in 'data' or full object itself
|
|
1876
1879
|
const event = this.safeString(messageInner, 'e');
|
|
1877
1880
|
const methods = {
|
|
1878
|
-
'
|
|
1881
|
+
'24hrTicker': this.handleTicker,
|
|
1879
1882
|
'aggTrade': this.handleTrade,
|
|
1880
|
-
'
|
|
1881
|
-
'depth10': this.handleOrderBook,
|
|
1882
|
-
'depth20': this.handleOrderBook,
|
|
1883
|
+
'depthUpdate': this.handleOrderBook,
|
|
1883
1884
|
'kline': this.handleOHLCV,
|
|
1884
|
-
'
|
|
1885
|
+
'markPriceUpdate': this.handleTicker,
|
|
1885
1886
|
'bookTicker': this.handleBidAsk,
|
|
1886
1887
|
'outboundAccountPosition': this.handleBalance,
|
|
1887
1888
|
'ACCOUNT_UPDATE': this.handleBalanceAndPosition,
|
package/js/src/pro/backpack.js
CHANGED
|
@@ -889,7 +889,7 @@ export default class backpack extends backpackRest {
|
|
|
889
889
|
}
|
|
890
890
|
handleBidAsks(bookSide, bidAsks) {
|
|
891
891
|
for (let i = 0; i < bidAsks.length; i++) {
|
|
892
|
-
const bidAsk = this.
|
|
892
|
+
const bidAsk = this.parseOrderBookBidAsk(bidAsks[i]);
|
|
893
893
|
bookSide.storeArray(bidAsk);
|
|
894
894
|
}
|
|
895
895
|
}
|
package/js/src/pro/binance.d.ts
CHANGED
|
@@ -597,7 +597,7 @@ export default class binance extends binanceRest {
|
|
|
597
597
|
/**
|
|
598
598
|
* @name binance#ensureUserDataStreamWsSubscribeSignature
|
|
599
599
|
* @description watches best bid & ask for symbols
|
|
600
|
-
* @param
|
|
600
|
+
* @param {string} [marketType] only supports 'spot'
|
|
601
601
|
* @see {@link https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/user-data-stream-requests#subscribe-to-user-data-stream-through-signature-subscription-user_data Binance User Data Stream Documentation}
|
|
602
602
|
* @returns Promise<number> The subscription ID for the user data stream
|
|
603
603
|
*/
|
package/js/src/pro/binance.js
CHANGED
|
@@ -1499,7 +1499,7 @@ export default class binance extends binanceRest {
|
|
|
1499
1499
|
}
|
|
1500
1500
|
const isSpot = (type === 'spot');
|
|
1501
1501
|
let timezone = undefined;
|
|
1502
|
-
[timezone, params] = this.handleParamString(params, 'timezone'
|
|
1502
|
+
[timezone, params] = this.handleParamString(params, 'timezone');
|
|
1503
1503
|
const isUtc8 = (timezone !== undefined) && ((timezone === '+08:00') || Precise.stringEq(timezone, '8'));
|
|
1504
1504
|
const rawHashes = [];
|
|
1505
1505
|
const messageHashes = [];
|
|
@@ -1564,7 +1564,7 @@ export default class binance extends binanceRest {
|
|
|
1564
1564
|
}
|
|
1565
1565
|
const isSpot = (type === 'spot');
|
|
1566
1566
|
let timezone = undefined;
|
|
1567
|
-
[timezone, params] = this.handleParamString(params, 'timezone'
|
|
1567
|
+
[timezone, params] = this.handleParamString(params, 'timezone');
|
|
1568
1568
|
const isUtc8 = (timezone !== undefined) && ((timezone === '+08:00') || Precise.stringEq(timezone, '8'));
|
|
1569
1569
|
const rawHashes = [];
|
|
1570
1570
|
const subMessageHashes = [];
|
|
@@ -2239,7 +2239,7 @@ export default class binance extends binanceRest {
|
|
|
2239
2239
|
// "status":200,
|
|
2240
2240
|
// "result":{
|
|
2241
2241
|
// "symbol":"BTCUSDT",
|
|
2242
|
-
// "price":"73178.
|
|
2242
|
+
// "price":"73178.60",
|
|
2243
2243
|
// "time":1712527052374
|
|
2244
2244
|
// }
|
|
2245
2245
|
// }
|
|
@@ -2402,7 +2402,7 @@ export default class binance extends binanceRest {
|
|
|
2402
2402
|
/**
|
|
2403
2403
|
* @name binance#ensureUserDataStreamWsSubscribeSignature
|
|
2404
2404
|
* @description watches best bid & ask for symbols
|
|
2405
|
-
* @param
|
|
2405
|
+
* @param {string} [marketType] only supports 'spot'
|
|
2406
2406
|
* @see {@link https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/user-data-stream-requests#subscribe-to-user-data-stream-through-signature-subscription-user_data Binance User Data Stream Documentation}
|
|
2407
2407
|
* @returns Promise<number> The subscription ID for the user data stream
|
|
2408
2408
|
*/
|
|
@@ -3674,8 +3674,8 @@ export default class binance extends binanceRest {
|
|
|
3674
3674
|
await this.loadMarkets();
|
|
3675
3675
|
const market = this.market(symbol);
|
|
3676
3676
|
const type = this.getMarketType('fetchOpenOrdersWs', market, params);
|
|
3677
|
-
if (type !== 'spot'
|
|
3678
|
-
throw new BadRequest(this.id + ' fetchOpenOrdersWs only supports spot
|
|
3677
|
+
if (type !== 'spot') {
|
|
3678
|
+
throw new BadRequest(this.id + ' fetchOpenOrdersWs only supports spot markets');
|
|
3679
3679
|
}
|
|
3680
3680
|
const url = this.urls['api']['ws']['ws-api'][type];
|
|
3681
3681
|
const requestId = this.requestId(url);
|
package/js/src/pro/bingx.js
CHANGED
|
@@ -691,7 +691,9 @@ export default class bingx extends bingxRest {
|
|
|
691
691
|
// const limit = [ 5, 10, 20, 50, 100 ]
|
|
692
692
|
const subscriptionHash = dataType;
|
|
693
693
|
const subscription = client.subscriptions[subscriptionHash];
|
|
694
|
-
|
|
694
|
+
// see handleOHLCV — subscription.limit may be missing for non-orderbook callers;
|
|
695
|
+
// default to a reasonable depth instead of throwing NPE in the Java port.
|
|
696
|
+
const limit = this.safeInteger(subscription, 'limit', 100);
|
|
695
697
|
this.orderbooks[symbol] = this.orderBook({}, limit);
|
|
696
698
|
}
|
|
697
699
|
orderbook = this.orderbooks[symbol];
|
|
@@ -837,7 +839,10 @@ export default class bingx extends bingxRest {
|
|
|
837
839
|
if (this.safeValue(this.ohlcvs[symbol], rawTimeframe) === undefined) {
|
|
838
840
|
const subscriptionHash = dataType;
|
|
839
841
|
const subscription = client.subscriptions[subscriptionHash];
|
|
840
|
-
|
|
842
|
+
// subscription.limit is only set when watchOHLCV registers the subscription;
|
|
843
|
+
// when handleMessage routes a non-OHLCV-originated subscription here (or the
|
|
844
|
+
// subscription dict was reset on reconnect), fall back to the OHLCVLimit option.
|
|
845
|
+
const limit = this.safeInteger(subscription, 'limit', this.safeInteger(this.options, 'OHLCVLimit', 1000));
|
|
841
846
|
this.ohlcvs[symbol][unifiedTimeframe] = new ArrayCacheByTimestamp(limit);
|
|
842
847
|
}
|
|
843
848
|
const stored = this.ohlcvs[symbol][unifiedTimeframe];
|
package/js/src/pro/bitget.js
CHANGED
|
@@ -943,7 +943,7 @@ export default class bitget extends bitgetRest {
|
|
|
943
943
|
client.reject(error, messageHash);
|
|
944
944
|
}
|
|
945
945
|
handleDelta(bookside, delta) {
|
|
946
|
-
const bidAsk = this.
|
|
946
|
+
const bidAsk = this.parseOrderBookBidAsk(delta, 0, 1);
|
|
947
947
|
// we store the string representations in the orderbook for checksum calculation
|
|
948
948
|
// this simplifies the code for generating checksums as we do not need to do any complex number transformations
|
|
949
949
|
bidAsk.push(delta);
|
package/js/src/pro/bithumb.js
CHANGED
|
@@ -247,7 +247,7 @@ export default class bithumb extends bithumbRest {
|
|
|
247
247
|
//
|
|
248
248
|
const sideId = this.safeString(delta, 'orderType');
|
|
249
249
|
const side = (sideId === 'bid') ? 'bids' : 'asks';
|
|
250
|
-
const bidAsk = this.
|
|
250
|
+
const bidAsk = this.parseOrderBookBidAsk(delta, 'price', 'quantity');
|
|
251
251
|
const orderbookSide = orderbook[side];
|
|
252
252
|
orderbookSide.storeArray(bidAsk);
|
|
253
253
|
}
|
package/js/src/pro/bitmart.js
CHANGED
|
@@ -1869,6 +1869,16 @@ export default class bitmart extends bitmartRest {
|
|
|
1869
1869
|
//
|
|
1870
1870
|
const errorCode = this.safeString(message, 'errorCode');
|
|
1871
1871
|
const error = this.safeString(message, 'error');
|
|
1872
|
+
// Duplicate-subscription notice errorCode 90008: bitmart's WS rejects
|
|
1873
|
+
// a re-subscribe attempt on a topic that's already active on this
|
|
1874
|
+
// connection, but the original subscription keeps delivering data —
|
|
1875
|
+
// so treat it as benign. Without this short-circuit, the generic
|
|
1876
|
+
// client.reject below kills every unrelated in-flight future —
|
|
1877
|
+
// e.g. a watchOHLCV waiting on its kline subscription gets rejected
|
|
1878
|
+
// by an orderbook 90008 raised on the same socket.
|
|
1879
|
+
if (errorCode === '90008') {
|
|
1880
|
+
return false;
|
|
1881
|
+
}
|
|
1872
1882
|
try {
|
|
1873
1883
|
if (errorCode !== undefined || error !== undefined) {
|
|
1874
1884
|
const feedback = this.id + ' ' + this.json(message);
|
package/js/src/pro/bitmex.js
CHANGED
|
@@ -1592,7 +1592,7 @@ export default class bitmex extends bitmexRest {
|
|
|
1592
1592
|
if (!(marketId in numUpdatesByMarketId)) {
|
|
1593
1593
|
numUpdatesByMarketId[marketId] = 0;
|
|
1594
1594
|
}
|
|
1595
|
-
numUpdatesByMarketId[marketId] = this.sum(numUpdatesByMarketId, 1);
|
|
1595
|
+
numUpdatesByMarketId[marketId] = this.sum(numUpdatesByMarketId[marketId], 1);
|
|
1596
1596
|
const market = this.safeMarket(marketId);
|
|
1597
1597
|
const symbol = market['symbol'];
|
|
1598
1598
|
const orderbook = this.orderbooks[symbol];
|
package/js/src/pro/bitstamp.js
CHANGED
|
@@ -130,7 +130,7 @@ export default class bitstamp extends bitstampRest {
|
|
|
130
130
|
}
|
|
131
131
|
handleBidAsks(bookSide, bidAsks) {
|
|
132
132
|
for (let i = 0; i < bidAsks.length; i++) {
|
|
133
|
-
const bidAsk = this.
|
|
133
|
+
const bidAsk = this.parseOrderBookBidAsk(bidAsks[i]);
|
|
134
134
|
bookSide.storeArray(bidAsk);
|
|
135
135
|
}
|
|
136
136
|
}
|
|
@@ -706,7 +706,7 @@ export default class blockchaincom extends blockchaincomRest {
|
|
|
706
706
|
client.resolve(orderbook, messageHash);
|
|
707
707
|
}
|
|
708
708
|
handleDelta(bookside, delta) {
|
|
709
|
-
const bookArray = this.
|
|
709
|
+
const bookArray = this.parseOrderBookBidAsk(delta, 'px', 'qty', 'num');
|
|
710
710
|
bookside.storeArray(bookArray);
|
|
711
711
|
}
|
|
712
712
|
handleDeltas(bookside, deltas) {
|
package/js/src/pro/bybit.js
CHANGED
|
@@ -1019,7 +1019,7 @@ export default class bybit extends bybitRest {
|
|
|
1019
1019
|
}
|
|
1020
1020
|
}
|
|
1021
1021
|
handleDelta(bookside, delta) {
|
|
1022
|
-
const bidAsk = this.
|
|
1022
|
+
const bidAsk = this.parseOrderBookBidAsk(delta, 0, 1);
|
|
1023
1023
|
bookside.storeArray(bidAsk);
|
|
1024
1024
|
}
|
|
1025
1025
|
handleDeltas(bookside, deltas) {
|
package/js/src/pro/cex.js
CHANGED
|
@@ -1029,7 +1029,7 @@ export default class cex extends cexRest {
|
|
|
1029
1029
|
client.resolve(storedOrderBook, messageHash);
|
|
1030
1030
|
}
|
|
1031
1031
|
handleDelta(bookside, delta) {
|
|
1032
|
-
const bidAsk = this.
|
|
1032
|
+
const bidAsk = this.parseOrderBookBidAsk(delta, 0, 1);
|
|
1033
1033
|
bookside.storeArray(bidAsk);
|
|
1034
1034
|
}
|
|
1035
1035
|
handleDeltas(bookside, deltas) {
|
package/js/src/pro/coinex.js
CHANGED
|
@@ -809,7 +809,7 @@ export default class coinex extends coinexRest {
|
|
|
809
809
|
return await this.watchOrderBookForSymbols([symbol], limit, params);
|
|
810
810
|
}
|
|
811
811
|
handleDelta(bookside, delta) {
|
|
812
|
-
const bidAsk = this.
|
|
812
|
+
const bidAsk = this.parseOrderBookBidAsk(delta, 0, 1);
|
|
813
813
|
bookside.storeArray(bidAsk);
|
|
814
814
|
}
|
|
815
815
|
handleDeltas(bookside, deltas) {
|
package/js/src/pro/coinone.js
CHANGED
|
@@ -121,7 +121,7 @@ export default class coinone extends coinoneRest {
|
|
|
121
121
|
client.resolve(orderbook, messageHash);
|
|
122
122
|
}
|
|
123
123
|
handleDelta(bookside, delta) {
|
|
124
|
-
const bidAsk = this.
|
|
124
|
+
const bidAsk = this.parseOrderBookBidAsk(delta, 'price', 'qty');
|
|
125
125
|
bookside.storeArray(bidAsk);
|
|
126
126
|
}
|
|
127
127
|
/**
|
package/js/src/pro/cryptocom.js
CHANGED
|
@@ -1034,7 +1034,9 @@ export default class cryptocom extends cryptocomRest {
|
|
|
1034
1034
|
}
|
|
1035
1035
|
client.resolve(this.balance, messageHash);
|
|
1036
1036
|
const messageHashRequest = this.safeString(message, 'id');
|
|
1037
|
-
|
|
1037
|
+
if (messageHashRequest !== undefined) {
|
|
1038
|
+
client.resolve(this.balance, messageHashRequest);
|
|
1039
|
+
}
|
|
1038
1040
|
}
|
|
1039
1041
|
/**
|
|
1040
1042
|
* @method
|
package/js/src/pro/dydx.js
CHANGED
|
@@ -240,7 +240,7 @@ export default class dydx extends dydxRest {
|
|
|
240
240
|
bookside.store(price, amount);
|
|
241
241
|
}
|
|
242
242
|
else {
|
|
243
|
-
const bidAsk = this.
|
|
243
|
+
const bidAsk = this.parseOrderBookBidAsk(delta, 'price', 'size');
|
|
244
244
|
bookside.storeArray(bidAsk);
|
|
245
245
|
}
|
|
246
246
|
}
|
package/js/src/pro/exmo.js
CHANGED
|
@@ -561,7 +561,7 @@ export default class exmo extends exmoRest {
|
|
|
561
561
|
client.resolve(orderbook, messageHash);
|
|
562
562
|
}
|
|
563
563
|
handleDelta(bookside, delta) {
|
|
564
|
-
const bidAsk = this.
|
|
564
|
+
const bidAsk = this.parseOrderBookBidAsk(delta, 0, 1);
|
|
565
565
|
bookside.storeArray(bidAsk);
|
|
566
566
|
}
|
|
567
567
|
handleDeltas(bookside, deltas) {
|