tardis-dev 18.10.1 → 18.11.0
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 +2 -0
- package/dist/handy.d.ts +2 -3
- package/dist/handy.d.ts.map +1 -1
- package/dist/handy.js +3 -12
- package/dist/handy.js.map +1 -1
- package/dist/mappers/ascendex.js +4 -4
- package/dist/mappers/ascendex.js.map +1 -1
- package/dist/mappers/aster.js +5 -8
- package/dist/mappers/aster.js.map +1 -1
- package/dist/mappers/backpack.d.ts.map +1 -1
- package/dist/mappers/backpack.js +16 -25
- package/dist/mappers/backpack.js.map +1 -1
- package/dist/mappers/binance.js +6 -6
- package/dist/mappers/binance.js.map +1 -1
- package/dist/mappers/binancedex.js +3 -3
- package/dist/mappers/binancedex.js.map +1 -1
- package/dist/mappers/binanceeuropeanoptions.js +11 -33
- package/dist/mappers/binanceeuropeanoptions.js.map +1 -1
- package/dist/mappers/bitfinex.js +5 -9
- package/dist/mappers/bitfinex.js.map +1 -1
- package/dist/mappers/bitflyer.js +3 -3
- package/dist/mappers/bitflyer.js.map +1 -1
- package/dist/mappers/bitget.js +9 -14
- package/dist/mappers/bitget.js.map +1 -1
- package/dist/mappers/bithumb.js +2 -2
- package/dist/mappers/bithumb.js.map +1 -1
- package/dist/mappers/bitmex.js +5 -5
- package/dist/mappers/bitmex.js.map +1 -1
- package/dist/mappers/bitnomial.js +2 -2
- package/dist/mappers/bitnomial.js.map +1 -1
- package/dist/mappers/bitstamp.js +3 -3
- package/dist/mappers/bitstamp.js.map +1 -1
- package/dist/mappers/bitvavo.js +12 -11
- package/dist/mappers/bitvavo.js.map +1 -1
- package/dist/mappers/blockchaincom.js +2 -2
- package/dist/mappers/blockchaincom.js.map +1 -1
- package/dist/mappers/bullish.js +7 -7
- package/dist/mappers/bullish.js.map +1 -1
- package/dist/mappers/bybit.js +11 -11
- package/dist/mappers/bybit.js.map +1 -1
- package/dist/mappers/bybitspot.d.ts +3 -3
- package/dist/mappers/bybitspot.d.ts.map +1 -1
- package/dist/mappers/bybitspot.js +3 -3
- package/dist/mappers/bybitspot.js.map +1 -1
- package/dist/mappers/coinbase.js +3 -3
- package/dist/mappers/coinbase.js.map +1 -1
- package/dist/mappers/coinbasederivatives.js +4 -4
- package/dist/mappers/coinbasederivatives.js.map +1 -1
- package/dist/mappers/coinbaseinternational.js +8 -8
- package/dist/mappers/coinbaseinternational.js.map +1 -1
- package/dist/mappers/coinflex.js +3 -3
- package/dist/mappers/coinflex.js.map +1 -1
- package/dist/mappers/cryptocom.js +5 -8
- package/dist/mappers/cryptocom.js.map +1 -1
- package/dist/mappers/cryptofacilities.js +6 -6
- package/dist/mappers/cryptofacilities.js.map +1 -1
- package/dist/mappers/delta.js +4 -4
- package/dist/mappers/delta.js.map +1 -1
- package/dist/mappers/delta_india.js +8 -14
- package/dist/mappers/delta_india.js.map +1 -1
- package/dist/mappers/deribit.js +21 -24
- package/dist/mappers/deribit.js.map +1 -1
- package/dist/mappers/dydx.js +3 -3
- package/dist/mappers/dydx.js.map +1 -1
- package/dist/mappers/dydxv4.js +4 -4
- package/dist/mappers/dydxv4.js.map +1 -1
- package/dist/mappers/ftx.js +5 -5
- package/dist/mappers/ftx.js.map +1 -1
- package/dist/mappers/gateio.js +6 -6
- package/dist/mappers/gateio.js.map +1 -1
- package/dist/mappers/gateiofutures.js +6 -6
- package/dist/mappers/gateiofutures.js.map +1 -1
- package/dist/mappers/gemini.js +5 -5
- package/dist/mappers/gemini.js.map +1 -1
- package/dist/mappers/hitbtc.js +2 -2
- package/dist/mappers/hitbtc.js.map +1 -1
- package/dist/mappers/huobi.js +20 -27
- package/dist/mappers/huobi.js.map +1 -1
- package/dist/mappers/hyperliquid.js +5 -8
- package/dist/mappers/hyperliquid.js.map +1 -1
- package/dist/mappers/kraken.js +6 -6
- package/dist/mappers/kraken.js.map +1 -1
- package/dist/mappers/kucoin.js +3 -3
- package/dist/mappers/kucoin.js.map +1 -1
- package/dist/mappers/kucoinfutures.js +4 -4
- package/dist/mappers/kucoinfutures.js.map +1 -1
- package/dist/mappers/lighter.js +5 -5
- package/dist/mappers/lighter.js.map +1 -1
- package/dist/mappers/mapper.d.ts +3 -3
- package/dist/mappers/mexc.d.ts +4 -4
- package/dist/mappers/mexc.d.ts.map +1 -1
- package/dist/mappers/mexc.js +3 -3
- package/dist/mappers/mexc.js.map +1 -1
- package/dist/mappers/mexcfutures.d.ts +5 -5
- package/dist/mappers/mexcfutures.d.ts.map +1 -1
- package/dist/mappers/mexcfutures.js +3 -3
- package/dist/mappers/mexcfutures.js.map +1 -1
- package/dist/mappers/okex.js +19 -21
- package/dist/mappers/okex.js.map +1 -1
- package/dist/mappers/okexspreads.d.ts +3 -3
- package/dist/mappers/okexspreads.d.ts.map +1 -1
- package/dist/mappers/okexspreads.js +3 -3
- package/dist/mappers/okexspreads.js.map +1 -1
- package/dist/mappers/phemex.js +18 -12
- package/dist/mappers/phemex.js.map +1 -1
- package/dist/mappers/poloniex.js +4 -4
- package/dist/mappers/poloniex.js.map +1 -1
- package/dist/mappers/polymarket.js +3 -3
- package/dist/mappers/polymarket.js.map +1 -1
- package/dist/mappers/serum.js +3 -3
- package/dist/mappers/serum.js.map +1 -1
- package/dist/mappers/upbit.js +2 -2
- package/dist/mappers/upbit.js.map +1 -1
- package/dist/mappers/whitebit.js +8 -12
- package/dist/mappers/whitebit.js.map +1 -1
- package/dist/mappers/woox.js +10 -12
- package/dist/mappers/woox.js.map +1 -1
- package/dist/realtimefeeds/aster.d.ts +3 -2
- package/dist/realtimefeeds/aster.d.ts.map +1 -1
- package/dist/realtimefeeds/aster.js +12 -2
- package/dist/realtimefeeds/aster.js.map +1 -1
- package/dist/realtimefeeds/backpack.d.ts +3 -2
- package/dist/realtimefeeds/backpack.d.ts.map +1 -1
- package/dist/realtimefeeds/backpack.js +9 -2
- package/dist/realtimefeeds/backpack.js.map +1 -1
- package/dist/realtimefeeds/binance.d.ts +7 -5
- package/dist/realtimefeeds/binance.d.ts.map +1 -1
- package/dist/realtimefeeds/binance.js +42 -9
- package/dist/realtimefeeds/binance.js.map +1 -1
- package/dist/realtimefeeds/binanceeuropeanoptions.d.ts +2 -2
- package/dist/realtimefeeds/binanceeuropeanoptions.d.ts.map +1 -1
- package/dist/realtimefeeds/binanceeuropeanoptions.js +5 -5
- package/dist/realtimefeeds/binanceeuropeanoptions.js.map +1 -1
- package/dist/realtimefeeds/bitget.d.ts +2 -1
- package/dist/realtimefeeds/bitget.d.ts.map +1 -1
- package/dist/realtimefeeds/bitget.js +10 -0
- package/dist/realtimefeeds/bitget.js.map +1 -1
- package/dist/realtimefeeds/bitstamp.d.ts +1 -1
- package/dist/realtimefeeds/bitstamp.d.ts.map +1 -1
- package/dist/realtimefeeds/bitstamp.js +2 -2
- package/dist/realtimefeeds/bitstamp.js.map +1 -1
- package/dist/realtimefeeds/bitvavo.d.ts +2 -1
- package/dist/realtimefeeds/bitvavo.d.ts.map +1 -1
- package/dist/realtimefeeds/bitvavo.js +10 -0
- package/dist/realtimefeeds/bitvavo.js.map +1 -1
- package/dist/realtimefeeds/bullish.d.ts +2 -2
- package/dist/realtimefeeds/bullish.d.ts.map +1 -1
- package/dist/realtimefeeds/bullish.js +4 -4
- package/dist/realtimefeeds/bullish.js.map +1 -1
- package/dist/realtimefeeds/bybit.d.ts +3 -2
- package/dist/realtimefeeds/bybit.d.ts.map +1 -1
- package/dist/realtimefeeds/bybit.js +18 -3
- package/dist/realtimefeeds/bybit.js.map +1 -1
- package/dist/realtimefeeds/coinbase.d.ts +4 -1
- package/dist/realtimefeeds/coinbase.d.ts.map +1 -1
- package/dist/realtimefeeds/coinbase.js +22 -0
- package/dist/realtimefeeds/coinbase.js.map +1 -1
- package/dist/realtimefeeds/coinbasederivatives.d.ts +3 -7
- package/dist/realtimefeeds/coinbasederivatives.d.ts.map +1 -1
- package/dist/realtimefeeds/coinbasederivatives.js +10 -12
- package/dist/realtimefeeds/coinbasederivatives.js.map +1 -1
- package/dist/realtimefeeds/cryptofacilities.d.ts +2 -1
- package/dist/realtimefeeds/cryptofacilities.d.ts.map +1 -1
- package/dist/realtimefeeds/cryptofacilities.js +6 -0
- package/dist/realtimefeeds/cryptofacilities.js.map +1 -1
- package/dist/realtimefeeds/delta.d.ts +2 -1
- package/dist/realtimefeeds/delta.d.ts.map +1 -1
- package/dist/realtimefeeds/delta.js +9 -0
- package/dist/realtimefeeds/delta.js.map +1 -1
- package/dist/realtimefeeds/delta_india.d.ts +4 -3
- package/dist/realtimefeeds/delta_india.d.ts.map +1 -1
- package/dist/realtimefeeds/delta_india.js +22 -17
- package/dist/realtimefeeds/delta_india.js.map +1 -1
- package/dist/realtimefeeds/deribit.d.ts +2 -1
- package/dist/realtimefeeds/deribit.d.ts.map +1 -1
- package/dist/realtimefeeds/deribit.js +11 -0
- package/dist/realtimefeeds/deribit.js.map +1 -1
- package/dist/realtimefeeds/ftx.d.ts +2 -2
- package/dist/realtimefeeds/ftx.d.ts.map +1 -1
- package/dist/realtimefeeds/ftx.js +9 -8
- package/dist/realtimefeeds/ftx.js.map +1 -1
- package/dist/realtimefeeds/gateio.d.ts +2 -1
- package/dist/realtimefeeds/gateio.d.ts.map +1 -1
- package/dist/realtimefeeds/gateio.js +10 -0
- package/dist/realtimefeeds/gateio.js.map +1 -1
- package/dist/realtimefeeds/gateiofutures.d.ts +5 -4
- package/dist/realtimefeeds/gateiofutures.d.ts.map +1 -1
- package/dist/realtimefeeds/gateiofutures.js +24 -14
- package/dist/realtimefeeds/gateiofutures.js.map +1 -1
- package/dist/realtimefeeds/gemini.d.ts +4 -1
- package/dist/realtimefeeds/gemini.d.ts.map +1 -1
- package/dist/realtimefeeds/gemini.js +25 -0
- package/dist/realtimefeeds/gemini.js.map +1 -1
- package/dist/realtimefeeds/hitbtc.d.ts +2 -1
- package/dist/realtimefeeds/hitbtc.d.ts.map +1 -1
- package/dist/realtimefeeds/hitbtc.js +10 -0
- package/dist/realtimefeeds/hitbtc.js.map +1 -1
- package/dist/realtimefeeds/huobi.d.ts +8 -7
- package/dist/realtimefeeds/huobi.d.ts.map +1 -1
- package/dist/realtimefeeds/huobi.js +49 -21
- package/dist/realtimefeeds/huobi.js.map +1 -1
- package/dist/realtimefeeds/index.d.ts +1 -1
- package/dist/realtimefeeds/index.d.ts.map +1 -1
- package/dist/realtimefeeds/index.js +2 -2
- package/dist/realtimefeeds/index.js.map +1 -1
- package/dist/realtimefeeds/kucoin.d.ts +2 -1
- package/dist/realtimefeeds/kucoin.d.ts.map +1 -1
- package/dist/realtimefeeds/kucoin.js +10 -0
- package/dist/realtimefeeds/kucoin.js.map +1 -1
- package/dist/realtimefeeds/kucoinfutures.d.ts +4 -3
- package/dist/realtimefeeds/kucoinfutures.d.ts.map +1 -1
- package/dist/realtimefeeds/kucoinfutures.js +15 -4
- package/dist/realtimefeeds/kucoinfutures.js.map +1 -1
- package/dist/realtimefeeds/lighter.d.ts +2 -1
- package/dist/realtimefeeds/lighter.d.ts.map +1 -1
- package/dist/realtimefeeds/lighter.js +10 -0
- package/dist/realtimefeeds/lighter.js.map +1 -1
- package/dist/realtimefeeds/mexc.d.ts +2 -1
- package/dist/realtimefeeds/mexc.d.ts.map +1 -1
- package/dist/realtimefeeds/mexc.js +10 -0
- package/dist/realtimefeeds/mexc.js.map +1 -1
- package/dist/realtimefeeds/mexcfutures.d.ts +2 -1
- package/dist/realtimefeeds/mexcfutures.d.ts.map +1 -1
- package/dist/realtimefeeds/mexcfutures.js +11 -0
- package/dist/realtimefeeds/mexcfutures.js.map +1 -1
- package/dist/realtimefeeds/okex.d.ts +7 -5
- package/dist/realtimefeeds/okex.d.ts.map +1 -1
- package/dist/realtimefeeds/okex.js +32 -11
- package/dist/realtimefeeds/okex.js.map +1 -1
- package/dist/realtimefeeds/phemex.d.ts.map +1 -1
- package/dist/realtimefeeds/phemex.js +1 -0
- package/dist/realtimefeeds/phemex.js.map +1 -1
- package/dist/realtimefeeds/poloniex.d.ts +2 -1
- package/dist/realtimefeeds/poloniex.d.ts.map +1 -1
- package/dist/realtimefeeds/poloniex.js +11 -0
- package/dist/realtimefeeds/poloniex.js.map +1 -1
- package/dist/realtimefeeds/polymarket.d.ts +1 -1
- package/dist/realtimefeeds/polymarket.d.ts.map +1 -1
- package/dist/realtimefeeds/polymarket.js +3 -3
- package/dist/realtimefeeds/polymarket.js.map +1 -1
- package/dist/realtimefeeds/realtimefeed.d.ts +20 -4
- package/dist/realtimefeeds/realtimefeed.d.ts.map +1 -1
- package/dist/realtimefeeds/realtimefeed.js +41 -3
- package/dist/realtimefeeds/realtimefeed.js.map +1 -1
- package/dist/realtimefeeds/whitebit.d.ts +4 -11
- package/dist/realtimefeeds/whitebit.d.ts.map +1 -1
- package/dist/realtimefeeds/whitebit.js +23 -19
- package/dist/realtimefeeds/whitebit.js.map +1 -1
- package/dist/realtimefeeds/woox.d.ts +2 -1
- package/dist/realtimefeeds/woox.d.ts.map +1 -1
- package/dist/realtimefeeds/woox.js +11 -0
- package/dist/realtimefeeds/woox.js.map +1 -1
- package/dist/stream.d.ts +4 -2
- package/dist/stream.d.ts.map +1 -1
- package/dist/stream.js +10 -9
- package/dist/stream.js.map +1 -1
- package/package.json +1 -1
- package/src/handy.ts +5 -15
- package/src/mappers/ascendex.ts +4 -4
- package/src/mappers/aster.ts +5 -11
- package/src/mappers/backpack.ts +17 -23
- package/src/mappers/binance.ts +6 -6
- package/src/mappers/binancedex.ts +3 -3
- package/src/mappers/binanceeuropeanoptions.ts +11 -39
- package/src/mappers/bitfinex.ts +5 -9
- package/src/mappers/bitflyer.ts +3 -3
- package/src/mappers/bitget.ts +9 -14
- package/src/mappers/bithumb.ts +2 -2
- package/src/mappers/bitmex.ts +5 -5
- package/src/mappers/bitnomial.ts +2 -2
- package/src/mappers/bitstamp.ts +3 -3
- package/src/mappers/bitvavo.ts +21 -19
- package/src/mappers/blockchaincom.ts +2 -2
- package/src/mappers/bullish.ts +7 -7
- package/src/mappers/bybit.ts +11 -11
- package/src/mappers/bybitspot.ts +3 -3
- package/src/mappers/coinbase.ts +3 -3
- package/src/mappers/coinbasederivatives.ts +4 -4
- package/src/mappers/coinbaseinternational.ts +9 -9
- package/src/mappers/coinflex.ts +3 -3
- package/src/mappers/cryptocom.ts +5 -8
- package/src/mappers/cryptofacilities.ts +6 -6
- package/src/mappers/delta.ts +4 -4
- package/src/mappers/delta_india.ts +8 -14
- package/src/mappers/deribit.ts +21 -25
- package/src/mappers/dydx.ts +3 -3
- package/src/mappers/dydxv4.ts +4 -4
- package/src/mappers/ftx.ts +5 -5
- package/src/mappers/gateio.ts +6 -6
- package/src/mappers/gateiofutures.ts +6 -6
- package/src/mappers/gemini.ts +5 -5
- package/src/mappers/hitbtc.ts +2 -2
- package/src/mappers/huobi.ts +21 -29
- package/src/mappers/hyperliquid.ts +6 -9
- package/src/mappers/kraken.ts +6 -6
- package/src/mappers/kucoin.ts +3 -3
- package/src/mappers/kucoinfutures.ts +4 -4
- package/src/mappers/lighter.ts +5 -5
- package/src/mappers/mapper.ts +3 -3
- package/src/mappers/mexc.ts +3 -3
- package/src/mappers/mexcfutures.ts +3 -3
- package/src/mappers/okex.ts +19 -25
- package/src/mappers/okexspreads.ts +3 -3
- package/src/mappers/phemex.ts +18 -12
- package/src/mappers/poloniex.ts +4 -4
- package/src/mappers/polymarket.ts +3 -3
- package/src/mappers/serum.ts +3 -3
- package/src/mappers/upbit.ts +2 -2
- package/src/mappers/whitebit.ts +8 -14
- package/src/mappers/woox.ts +10 -13
- package/src/realtimefeeds/aster.ts +21 -3
- package/src/realtimefeeds/backpack.ts +17 -3
- package/src/realtimefeeds/binance.ts +68 -11
- package/src/realtimefeeds/binanceeuropeanoptions.ts +14 -5
- package/src/realtimefeeds/bitget.ts +13 -1
- package/src/realtimefeeds/bitstamp.ts +8 -2
- package/src/realtimefeeds/bitvavo.ts +13 -1
- package/src/realtimefeeds/bullish.ts +11 -4
- package/src/realtimefeeds/bybit.ts +27 -4
- package/src/realtimefeeds/coinbase.ts +34 -1
- package/src/realtimefeeds/coinbasederivatives.ts +18 -13
- package/src/realtimefeeds/cryptofacilities.ts +9 -1
- package/src/realtimefeeds/delta.ts +13 -1
- package/src/realtimefeeds/delta_india.ts +31 -17
- package/src/realtimefeeds/deribit.ts +13 -1
- package/src/realtimefeeds/ftx.ts +17 -8
- package/src/realtimefeeds/gateio.ts +13 -1
- package/src/realtimefeeds/gateiofutures.ts +37 -17
- package/src/realtimefeeds/gemini.ts +28 -1
- package/src/realtimefeeds/hitbtc.ts +13 -1
- package/src/realtimefeeds/huobi.ts +92 -22
- package/src/realtimefeeds/index.ts +3 -2
- package/src/realtimefeeds/kucoin.ts +12 -1
- package/src/realtimefeeds/kucoinfutures.ts +24 -5
- package/src/realtimefeeds/lighter.ts +12 -1
- package/src/realtimefeeds/mexc.ts +12 -1
- package/src/realtimefeeds/mexcfutures.ts +13 -1
- package/src/realtimefeeds/okex.ts +76 -11
- package/src/realtimefeeds/phemex.ts +1 -0
- package/src/realtimefeeds/poloniex.ts +13 -1
- package/src/realtimefeeds/polymarket.ts +4 -3
- package/src/realtimefeeds/realtimefeed.ts +53 -5
- package/src/realtimefeeds/whitebit.ts +30 -18
- package/src/realtimefeeds/woox.ts +13 -1
- package/src/stream.ts +37 -8
package/src/mappers/kucoin.ts
CHANGED
|
@@ -19,7 +19,7 @@ class KucoinTradesMapper implements Mapper<'kucoin', Trade> {
|
|
|
19
19
|
return message.type === 'message' && message.topic.startsWith('/market/match')
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
getFilters(symbols
|
|
22
|
+
getFilters(symbols: string[] = []) {
|
|
23
23
|
symbols = upperCaseSymbols(symbols)
|
|
24
24
|
|
|
25
25
|
return [
|
|
@@ -69,7 +69,7 @@ class KucoinBookChangeMapper implements Mapper<'kucoin', BookChange> {
|
|
|
69
69
|
return message.type === 'message' && message.topic.startsWith('/market/level2')
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
getFilters(symbols
|
|
72
|
+
getFilters(symbols: string[] = []) {
|
|
73
73
|
symbols = upperCaseSymbols(symbols)
|
|
74
74
|
return [
|
|
75
75
|
{
|
|
@@ -242,7 +242,7 @@ class KucoinBookTickerMapper implements Mapper<'kucoin', BookTicker> {
|
|
|
242
242
|
return message.type === 'message' && message.topic.startsWith('/market/ticker')
|
|
243
243
|
}
|
|
244
244
|
|
|
245
|
-
getFilters(symbols
|
|
245
|
+
getFilters(symbols: string[] = []) {
|
|
246
246
|
symbols = upperCaseSymbols(symbols)
|
|
247
247
|
return [
|
|
248
248
|
{
|
|
@@ -19,7 +19,7 @@ class KucoinFuturesTradesMapper implements Mapper<'kucoin-futures', Trade> {
|
|
|
19
19
|
return message.type === 'message' && message.topic.startsWith('/contractMarket/execution')
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
getFilters(symbols
|
|
22
|
+
getFilters(symbols: string[] = []) {
|
|
23
23
|
symbols = upperCaseSymbols(symbols)
|
|
24
24
|
|
|
25
25
|
return [
|
|
@@ -64,7 +64,7 @@ class KucoinFuturesBookChangeMapper implements Mapper<'kucoin-futures', BookChan
|
|
|
64
64
|
return message.type === 'message' && message.topic.startsWith('/contractMarket/level2')
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
getFilters(symbols
|
|
67
|
+
getFilters(symbols: string[] = []) {
|
|
68
68
|
symbols = upperCaseSymbols(symbols)
|
|
69
69
|
return [
|
|
70
70
|
{
|
|
@@ -249,7 +249,7 @@ class KucoinFuturesBookTickerMapper implements Mapper<'kucoin-futures', BookTick
|
|
|
249
249
|
return message.type === 'message' && message.topic.startsWith('/contractMarket/tickerV2')
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
-
getFilters(symbols
|
|
252
|
+
getFilters(symbols: string[] = []) {
|
|
253
253
|
symbols = upperCaseSymbols(symbols)
|
|
254
254
|
return [
|
|
255
255
|
{
|
|
@@ -296,7 +296,7 @@ class KucoinFuturesDerivativeTickerMapper implements Mapper<'kucoin-futures', De
|
|
|
296
296
|
)
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
getFilters(symbols
|
|
299
|
+
getFilters(symbols: string[] = []) {
|
|
300
300
|
symbols = upperCaseSymbols(symbols)
|
|
301
301
|
return [
|
|
302
302
|
{
|
package/src/mappers/lighter.ts
CHANGED
|
@@ -39,7 +39,7 @@ class LighterTradesMapper<T extends LighterExchange> implements Mapper<T, Trade>
|
|
|
39
39
|
return message.type === 'update/trade'
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
getFilters(symbols
|
|
42
|
+
getFilters(symbols: string[] = []) {
|
|
43
43
|
return [
|
|
44
44
|
{
|
|
45
45
|
channel: 'trade' as const,
|
|
@@ -72,7 +72,7 @@ class LighterLiquidationMapper<T extends LighterExchange> implements Mapper<T, L
|
|
|
72
72
|
return message.type === 'update/trade'
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
getFilters(symbols
|
|
75
|
+
getFilters(symbols: string[] = []) {
|
|
76
76
|
return [
|
|
77
77
|
{
|
|
78
78
|
channel: 'trade' as const,
|
|
@@ -113,7 +113,7 @@ class LighterBookChangeMapper<T extends LighterExchange> implements Mapper<T, Bo
|
|
|
113
113
|
return message.type === 'subscribed/order_book' || message.type === 'update/order_book'
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
getFilters(symbols
|
|
116
|
+
getFilters(symbols: string[] = []) {
|
|
117
117
|
return [
|
|
118
118
|
{
|
|
119
119
|
channel: 'order_book' as const,
|
|
@@ -153,7 +153,7 @@ class LighterBookTickerMapper<T extends LighterExchange> implements Mapper<T, Bo
|
|
|
153
153
|
return message.type === 'update/ticker' || message.type === 'subscribed/ticker'
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
getFilters(symbols
|
|
156
|
+
getFilters(symbols: string[] = []) {
|
|
157
157
|
return [
|
|
158
158
|
{
|
|
159
159
|
channel: 'ticker' as const,
|
|
@@ -189,7 +189,7 @@ class LighterDerivativeTickerMapper<T extends LighterExchange> implements Mapper
|
|
|
189
189
|
return message.type === 'update/market_stats' || message.type === 'subscribed/market_stats'
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
getFilters(_symbols
|
|
192
|
+
getFilters(_symbols: string[] = []) {
|
|
193
193
|
return [
|
|
194
194
|
{
|
|
195
195
|
channel: 'market_stats' as const,
|
package/src/mappers/mapper.ts
CHANGED
|
@@ -8,9 +8,9 @@ export type Mapper<T extends Exchange, U extends NormalizedData> = {
|
|
|
8
8
|
/**
|
|
9
9
|
* Returns the channel filters this mapper needs for the requested symbols.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
11
|
+
* Replay and streaming pass `[]` when no symbols are requested; `[]` means all symbols.
|
|
12
|
+
* Every returned filter carries a `symbols` array: the requested symbols, or their
|
|
13
|
+
* channel-specific identifiers. Do not narrow them by instrument type; `map` decides output.
|
|
14
14
|
*/
|
|
15
15
|
getFilters: (symbols?: string[]) => FilterForExchange[T][]
|
|
16
16
|
}
|
package/src/mappers/mexc.ts
CHANGED
|
@@ -19,7 +19,7 @@ export class MexcTradesMapper implements Mapper<'mexc', Trade> {
|
|
|
19
19
|
return message.channel?.startsWith(`${this.channel}@`) === true && 'publicAggreDeals' in message
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
getFilters(symbols
|
|
22
|
+
getFilters(symbols: string[] = []) {
|
|
23
23
|
return [{ channel: this.channel, symbols: upperCaseSymbols(symbols) } as const]
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -56,7 +56,7 @@ export class MexcBookChangeMapper implements Mapper<'mexc', BookChange> {
|
|
|
56
56
|
: message.channel?.startsWith(`${this.channel}@`) === true && 'publicAggreDepths' in message
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
getFilters(symbols
|
|
59
|
+
getFilters(symbols: string[] = []) {
|
|
60
60
|
const normalizedSymbols = upperCaseSymbols(symbols)
|
|
61
61
|
|
|
62
62
|
return [
|
|
@@ -209,7 +209,7 @@ export class MexcBookTickerMapper implements Mapper<'mexc', BookTicker> {
|
|
|
209
209
|
return message.channel?.startsWith(`${this.channel}@`) === true && 'publicAggreBookTicker' in message
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
getFilters(symbols
|
|
212
|
+
getFilters(symbols: string[] = []) {
|
|
213
213
|
return [{ channel: this.channel, symbols: upperCaseSymbols(symbols) } as const]
|
|
214
214
|
}
|
|
215
215
|
|
|
@@ -18,7 +18,7 @@ export class MexcFuturesTradesMapper implements Mapper<'mexc-futures', Trade> {
|
|
|
18
18
|
return message.channel === 'push.deal'
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
getFilters(symbols
|
|
21
|
+
getFilters(symbols: string[] = []) {
|
|
22
22
|
return [{ channel: 'push.deal', symbols: upperCaseSymbols(symbols) } as const]
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -51,7 +51,7 @@ export class MexcFuturesBookChangeMapper implements Mapper<'mexc-futures', BookC
|
|
|
51
51
|
return message.channel === 'push.depth' || message.channel === 'push.depth.snapshot'
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
getFilters(symbols
|
|
54
|
+
getFilters(symbols: string[] = []) {
|
|
55
55
|
const normalizedSymbols = upperCaseSymbols(symbols)
|
|
56
56
|
|
|
57
57
|
return [
|
|
@@ -200,7 +200,7 @@ export class MexcFuturesDerivativeTickerMapper implements Mapper<'mexc-futures',
|
|
|
200
200
|
return message.channel === 'push.ticker' || message.channel === 'push.funding.rate'
|
|
201
201
|
}
|
|
202
202
|
|
|
203
|
-
getFilters(symbols
|
|
203
|
+
getFilters(symbols: string[] = []) {
|
|
204
204
|
const normalizedSymbols = upperCaseSymbols(symbols)
|
|
205
205
|
|
|
206
206
|
return [
|
package/src/mappers/okex.ts
CHANGED
|
@@ -150,7 +150,7 @@ class OkexV5TradesMapper implements Mapper<OKEX_EXCHANGES, Trade> {
|
|
|
150
150
|
return message.arg.channel === 'trades' || message.arg.channel === 'trades-all'
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
getFilters(symbols
|
|
153
|
+
getFilters(symbols: string[] = []) {
|
|
154
154
|
symbols = upperCaseSymbols(symbols)
|
|
155
155
|
|
|
156
156
|
if (this._useTradesAll) {
|
|
@@ -237,7 +237,7 @@ class OkexV5BookChangeMapper implements Mapper<OKEX_EXCHANGES, BookChange> {
|
|
|
237
237
|
return 'books'
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
-
getFilters(symbols
|
|
240
|
+
getFilters(symbols: string[] = []) {
|
|
241
241
|
symbols = upperCaseSymbols(symbols)
|
|
242
242
|
|
|
243
243
|
return [
|
|
@@ -296,7 +296,7 @@ class OkexV5BookTickerMapper implements Mapper<OKEX_EXCHANGES, BookTicker> {
|
|
|
296
296
|
return message.arg.channel === 'tickers'
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
getFilters(symbols
|
|
299
|
+
getFilters(symbols: string[] = []) {
|
|
300
300
|
symbols = upperCaseSymbols(symbols)
|
|
301
301
|
|
|
302
302
|
if (this._useTbtTickerChannel) {
|
|
@@ -394,13 +394,13 @@ class OkexV5DerivativeTickerMapper implements Mapper<'okex-futures' | 'okex-swap
|
|
|
394
394
|
return channels.includes(message.arg.channel)
|
|
395
395
|
}
|
|
396
396
|
|
|
397
|
-
getFilters(symbols
|
|
397
|
+
getFilters(symbols: string[] = []) {
|
|
398
398
|
symbols = upperCaseSymbols(symbols)
|
|
399
399
|
|
|
400
400
|
const channels = this._exchange === 'okex-futures' ? this._futuresChannels : this._swapChannels
|
|
401
401
|
return channels.map((channel) => {
|
|
402
402
|
if (channel === 'index-tickers') {
|
|
403
|
-
const indexes = symbols
|
|
403
|
+
const indexes = symbols.map((symbol) => this._getIndexSymbol(symbol))
|
|
404
404
|
|
|
405
405
|
return {
|
|
406
406
|
channel,
|
|
@@ -516,7 +516,7 @@ class OkexV5LiquidationsMapper implements Mapper<OKEX_EXCHANGES, Liquidation> {
|
|
|
516
516
|
return message.arg.channel === 'liquidations' || message.arg.channel === 'liquidation-orders'
|
|
517
517
|
}
|
|
518
518
|
|
|
519
|
-
getFilters(symbols
|
|
519
|
+
getFilters(symbols: string[] = []) {
|
|
520
520
|
symbols = upperCaseSymbols(symbols)
|
|
521
521
|
|
|
522
522
|
return [
|
|
@@ -597,13 +597,10 @@ class OkexV5OptionSummaryMapper implements Mapper<'okex-options', OptionSummary>
|
|
|
597
597
|
)
|
|
598
598
|
}
|
|
599
599
|
|
|
600
|
-
getFilters(symbols
|
|
600
|
+
getFilters(symbols: string[] = []) {
|
|
601
601
|
symbols = upperCaseSymbols(symbols)
|
|
602
|
-
|
|
603
|
-
const
|
|
604
|
-
|
|
605
|
-
const optionSummaryInstrumentFamilies =
|
|
606
|
-
symbols !== undefined ? [...new Set(symbols.map((s) => getOkexOptionsFamilyOrIndex(s)))] : undefined
|
|
602
|
+
const indexes = [...new Set(symbols.map((s) => getOkexOptionsUnderlyingIndex(s)))]
|
|
603
|
+
const optionSummaryInstrumentFamilies = [...new Set(symbols.map((s) => getOkexOptionsFamilyOrIndex(s)))]
|
|
607
604
|
|
|
608
605
|
return [
|
|
609
606
|
{
|
|
@@ -893,7 +890,7 @@ class OkexTradesMapper implements Mapper<OKEX_EXCHANGES, Trade> {
|
|
|
893
890
|
return message.table === `${this._market}/trade`
|
|
894
891
|
}
|
|
895
892
|
|
|
896
|
-
getFilters(symbols
|
|
893
|
+
getFilters(symbols: string[] = []) {
|
|
897
894
|
symbols = upperCaseSymbols(symbols)
|
|
898
895
|
|
|
899
896
|
return [
|
|
@@ -948,7 +945,7 @@ class OkexBookChangeMapper implements Mapper<OKEX_EXCHANGES, BookChange> {
|
|
|
948
945
|
return message.table === `${this._market}/${channelSuffix}`
|
|
949
946
|
}
|
|
950
947
|
|
|
951
|
-
getFilters(symbols
|
|
948
|
+
getFilters(symbols: string[] = []) {
|
|
952
949
|
symbols = upperCaseSymbols(symbols)
|
|
953
950
|
|
|
954
951
|
if (this._canUseTickByTickChannel) {
|
|
@@ -1014,7 +1011,7 @@ class OkexDerivativeTickerMapper implements Mapper<'okex-futures' | 'okex-swap',
|
|
|
1014
1011
|
return channels.includes(message.table)
|
|
1015
1012
|
}
|
|
1016
1013
|
|
|
1017
|
-
getFilters(symbols
|
|
1014
|
+
getFilters(symbols: string[] = []) {
|
|
1018
1015
|
symbols = upperCaseSymbols(symbols)
|
|
1019
1016
|
|
|
1020
1017
|
const channels = this._exchange === 'okex-futures' ? this._futuresChannels : this._swapChannels
|
|
@@ -1072,16 +1069,13 @@ class OkexOptionSummaryMapper implements Mapper<'okex-options', OptionSummary> {
|
|
|
1072
1069
|
return message.table === 'index/ticker' || message.table === 'option/summary'
|
|
1073
1070
|
}
|
|
1074
1071
|
|
|
1075
|
-
getFilters(symbols
|
|
1072
|
+
getFilters(symbols: string[] = []) {
|
|
1076
1073
|
symbols = upperCaseSymbols(symbols)
|
|
1077
1074
|
|
|
1078
|
-
const indexes =
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
return `${symbolParts[0]}-${symbolParts[1]}`
|
|
1083
|
-
})
|
|
1084
|
-
: undefined
|
|
1075
|
+
const indexes = symbols.map((s) => {
|
|
1076
|
+
const symbolParts = s.split('-')
|
|
1077
|
+
return `${symbolParts[0]}-${symbolParts[1]}`
|
|
1078
|
+
})
|
|
1085
1079
|
|
|
1086
1080
|
return [
|
|
1087
1081
|
{
|
|
@@ -1170,7 +1164,7 @@ class OkexLiquidationsMapper implements Mapper<OKEX_EXCHANGES, Liquidation> {
|
|
|
1170
1164
|
return message.table === `${this._market}/liquidation`
|
|
1171
1165
|
}
|
|
1172
1166
|
|
|
1173
|
-
getFilters(symbols
|
|
1167
|
+
getFilters(symbols: string[] = []) {
|
|
1174
1168
|
symbols = upperCaseSymbols(symbols)
|
|
1175
1169
|
|
|
1176
1170
|
return [
|
|
@@ -1213,7 +1207,7 @@ class OkexBookTickerMapper implements Mapper<OKEX_EXCHANGES, BookTicker> {
|
|
|
1213
1207
|
return message.table === `${this._market}/ticker`
|
|
1214
1208
|
}
|
|
1215
1209
|
|
|
1216
|
-
getFilters(symbols
|
|
1210
|
+
getFilters(symbols: string[] = []) {
|
|
1217
1211
|
symbols = upperCaseSymbols(symbols)
|
|
1218
1212
|
|
|
1219
1213
|
return [
|
|
@@ -10,7 +10,7 @@ export class OkexSpreadsTradesMapper implements Mapper<'okex-spreads', Trade> {
|
|
|
10
10
|
return message.arg.channel === 'sprd-public-trades'
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
getFilters(symbols
|
|
13
|
+
getFilters(symbols: string[] = []) {
|
|
14
14
|
symbols = upperCaseSymbols(symbols)
|
|
15
15
|
|
|
16
16
|
return [
|
|
@@ -54,7 +54,7 @@ export class OkexSpreadsBookChangeMapper implements Mapper<'okex-spreads', BookC
|
|
|
54
54
|
return message.arg.channel === 'sprd-books5'
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
getFilters(symbols
|
|
57
|
+
getFilters(symbols: string[] = []) {
|
|
58
58
|
symbols = upperCaseSymbols(symbols)
|
|
59
59
|
return [
|
|
60
60
|
{
|
|
@@ -95,7 +95,7 @@ export class OkexSpreadsBookTickerMapper implements Mapper<'okex-spreads', BookT
|
|
|
95
95
|
return message.arg.channel === 'sprd-bbo-tbt'
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
getFilters(symbols
|
|
98
|
+
getFilters(symbols: string[] = []) {
|
|
99
99
|
symbols = upperCaseSymbols(symbols)
|
|
100
100
|
|
|
101
101
|
return [
|
package/src/mappers/phemex.ts
CHANGED
|
@@ -269,14 +269,16 @@ const phemexTradesMapper: Mapper<'phemex', Trade> = {
|
|
|
269
269
|
return message.type === 'incremental' && ('trades' in message || 'trades_p' in message)
|
|
270
270
|
},
|
|
271
271
|
|
|
272
|
-
getFilters(symbols
|
|
273
|
-
if (symbols
|
|
272
|
+
getFilters(symbols: string[] = []) {
|
|
273
|
+
if (symbols.length === 0) {
|
|
274
274
|
return [
|
|
275
275
|
{
|
|
276
|
-
channel: 'trades'
|
|
276
|
+
channel: 'trades',
|
|
277
|
+
symbols
|
|
277
278
|
} as const,
|
|
278
279
|
{
|
|
279
|
-
channel: 'trades_p'
|
|
280
|
+
channel: 'trades_p',
|
|
281
|
+
symbols
|
|
280
282
|
} as const
|
|
281
283
|
]
|
|
282
284
|
}
|
|
@@ -360,14 +362,16 @@ const phemexBookChangeMapper: Mapper<'phemex', BookChange> = {
|
|
|
360
362
|
return 'book' in message || 'orderbook_p' in message
|
|
361
363
|
},
|
|
362
364
|
|
|
363
|
-
getFilters(symbols
|
|
364
|
-
if (symbols
|
|
365
|
+
getFilters(symbols: string[] = []) {
|
|
366
|
+
if (symbols.length === 0) {
|
|
365
367
|
return [
|
|
366
368
|
{
|
|
367
|
-
channel: 'book'
|
|
369
|
+
channel: 'book',
|
|
370
|
+
symbols
|
|
368
371
|
} as const,
|
|
369
372
|
{
|
|
370
|
-
channel: 'orderbook_p'
|
|
373
|
+
channel: 'orderbook_p',
|
|
374
|
+
symbols
|
|
371
375
|
} as const
|
|
372
376
|
]
|
|
373
377
|
}
|
|
@@ -432,14 +436,16 @@ class PhemexDerivativeTickerMapper implements Mapper<'phemex', DerivativeTicker>
|
|
|
432
436
|
return 'market24h' in message || message.method === 'perp_market24h_pack_p.update'
|
|
433
437
|
}
|
|
434
438
|
|
|
435
|
-
getFilters(symbols
|
|
436
|
-
if (symbols
|
|
439
|
+
getFilters(symbols: string[] = []) {
|
|
440
|
+
if (symbols.length === 0) {
|
|
437
441
|
return [
|
|
438
442
|
{
|
|
439
|
-
channel: 'market24h'
|
|
443
|
+
channel: 'market24h',
|
|
444
|
+
symbols
|
|
440
445
|
} as const,
|
|
441
446
|
{
|
|
442
|
-
channel: 'perp_market24h_pack_p'
|
|
447
|
+
channel: 'perp_market24h_pack_p',
|
|
448
|
+
symbols
|
|
443
449
|
} as const
|
|
444
450
|
]
|
|
445
451
|
}
|
package/src/mappers/poloniex.ts
CHANGED
|
@@ -23,7 +23,7 @@ class PoloniexV2TradesMapper implements Mapper<'poloniex', Trade> {
|
|
|
23
23
|
return message.channel === 'trades' && message.data !== undefined && message.data.length > 0
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
getFilters(symbols
|
|
26
|
+
getFilters(symbols: string[] = []) {
|
|
27
27
|
symbols = upperCaseSymbols(symbols)
|
|
28
28
|
|
|
29
29
|
return [
|
|
@@ -62,7 +62,7 @@ class PoloniexV2BookChangeMapper implements Mapper<'poloniex', BookChange> {
|
|
|
62
62
|
return message.channel === 'book_lv2' && message.data !== undefined && message.data.length > 0
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
getFilters(symbols
|
|
65
|
+
getFilters(symbols: string[] = []) {
|
|
66
66
|
symbols = upperCaseSymbols(symbols)
|
|
67
67
|
|
|
68
68
|
return [
|
|
@@ -110,7 +110,7 @@ class PoloniexTradesMapper implements Mapper<'poloniex', Trade> {
|
|
|
110
110
|
return message[2].some((m) => m[0] === 't')
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
getFilters(symbols
|
|
113
|
+
getFilters(symbols: string[] = []) {
|
|
114
114
|
symbols = upperCaseSymbols(symbols)
|
|
115
115
|
|
|
116
116
|
return [
|
|
@@ -186,7 +186,7 @@ class PoloniexBookChangeMapper implements Mapper<'poloniex', BookChange> {
|
|
|
186
186
|
return message[2].some((m) => m[0] === 'i' || m[0] === 'o')
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
getFilters(symbols
|
|
189
|
+
getFilters(symbols: string[] = []) {
|
|
190
190
|
symbols = upperCaseSymbols(symbols)
|
|
191
191
|
|
|
192
192
|
return [
|
|
@@ -20,7 +20,7 @@ class PolymarketBookChangeMapper implements Mapper<'polymarket', BookChange> {
|
|
|
20
20
|
return isPolymarketClobPriceChangeMessage(message) || isPolymarketClobBookMessage(message)
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
getFilters(symbols
|
|
23
|
+
getFilters(symbols: string[] = []) {
|
|
24
24
|
return [
|
|
25
25
|
{ channel: 'book' as const, symbols },
|
|
26
26
|
{ channel: 'price_change' as const, symbols }
|
|
@@ -90,7 +90,7 @@ class PolymarketTradesMapper implements Mapper<'polymarket', Trade> {
|
|
|
90
90
|
return message.event_type === 'last_trade_price'
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
getFilters(symbols
|
|
93
|
+
getFilters(symbols: string[] = []) {
|
|
94
94
|
return [{ channel: 'last_trade_price' as const, symbols }]
|
|
95
95
|
}
|
|
96
96
|
|
|
@@ -114,7 +114,7 @@ class PolymarketBookTickerMapper implements Mapper<'polymarket', BookTicker> {
|
|
|
114
114
|
return message.event_type === 'best_bid_ask'
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
getFilters(symbols
|
|
117
|
+
getFilters(symbols: string[] = []) {
|
|
118
118
|
return [{ channel: 'best_bid_ask' as const, symbols }]
|
|
119
119
|
}
|
|
120
120
|
|
package/src/mappers/serum.ts
CHANGED
|
@@ -28,7 +28,7 @@ class SerumTradesMapper implements Mapper<'serum' | 'star-atlas', Trade> {
|
|
|
28
28
|
return message.type === 'trade'
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
getFilters(symbols
|
|
31
|
+
getFilters(symbols: string[] = []) {
|
|
32
32
|
if (this._exchange === 'serum') {
|
|
33
33
|
symbols = upperCaseSymbols(symbols)
|
|
34
34
|
}
|
|
@@ -63,7 +63,7 @@ class SerumBookChangeMapper implements Mapper<'serum' | 'star-atlas', BookChange
|
|
|
63
63
|
return message.type === 'l2snapshot' || message.type === 'l2update'
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
getFilters(symbols
|
|
66
|
+
getFilters(symbols: string[] = []) {
|
|
67
67
|
if (this._exchange === 'serum') {
|
|
68
68
|
symbols = upperCaseSymbols(symbols)
|
|
69
69
|
}
|
|
@@ -107,7 +107,7 @@ class SerumBookTickerMapper implements Mapper<'serum' | 'star-atlas', BookTicker
|
|
|
107
107
|
return message.type === 'quote'
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
getFilters(symbols
|
|
110
|
+
getFilters(symbols: string[] = []) {
|
|
111
111
|
if (this._exchange === 'serum') {
|
|
112
112
|
symbols = upperCaseSymbols(symbols)
|
|
113
113
|
}
|
package/src/mappers/upbit.ts
CHANGED
|
@@ -15,7 +15,7 @@ class UpbitTradesMapper implements Mapper<'upbit', Trade> {
|
|
|
15
15
|
return message.type === 'trade'
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
getFilters(symbols
|
|
18
|
+
getFilters(symbols: string[] = []) {
|
|
19
19
|
symbols = upperCaseSymbols(symbols)
|
|
20
20
|
|
|
21
21
|
return [
|
|
@@ -46,7 +46,7 @@ class UpbitBookChangeMapper implements Mapper<'upbit', BookChange> {
|
|
|
46
46
|
return message.type === 'orderbook'
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
getFilters(symbols
|
|
49
|
+
getFilters(symbols: string[] = []) {
|
|
50
50
|
symbols = upperCaseSymbols(symbols)
|
|
51
51
|
|
|
52
52
|
return [
|
package/src/mappers/whitebit.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { asNonZeroNumberOrUndefined, asNumberOrUndefined, fromMicroSecondsToDate,
|
|
1
|
+
import { asNonZeroNumberOrUndefined, asNumberOrUndefined, fromMicroSecondsToDate, upperCaseSymbols } from '../handy.ts'
|
|
2
2
|
import { BookChange, BookTicker, DerivativeTicker, Trade } from '../types.ts'
|
|
3
3
|
import { Mapper, PendingTickerInfoHelper } from './mapper.ts'
|
|
4
4
|
import { exchangeMappers } from './registry.ts'
|
|
@@ -17,7 +17,7 @@ class WhiteBitTradesMapper implements Mapper<'whitebit', Trade> {
|
|
|
17
17
|
return message.method === 'trades_update'
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
getFilters(symbols
|
|
20
|
+
getFilters(symbols: string[] = []) {
|
|
21
21
|
return [{ channel: 'trades_update', symbols: upperCaseSymbols(symbols) } as const]
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -50,7 +50,7 @@ class WhiteBitBookChangeMapper implements Mapper<'whitebit', BookChange> {
|
|
|
50
50
|
return message.method === 'depth_update'
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
getFilters(symbols
|
|
53
|
+
getFilters(symbols: string[] = []) {
|
|
54
54
|
return [{ channel: 'depth_update', symbols: upperCaseSymbols(symbols) } as const]
|
|
55
55
|
}
|
|
56
56
|
|
|
@@ -82,7 +82,7 @@ class WhiteBitBookTickerMapper implements Mapper<'whitebit', BookTicker> {
|
|
|
82
82
|
return message.method === 'bookTicker_update'
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
getFilters(symbols
|
|
85
|
+
getFilters(symbols: string[] = []) {
|
|
86
86
|
return [{ channel: 'bookTicker_update', symbols: upperCaseSymbols(symbols) } as const]
|
|
87
87
|
}
|
|
88
88
|
|
|
@@ -108,22 +108,16 @@ class WhiteBitDerivativeTickerMapper implements Mapper<'whitebit', DerivativeTic
|
|
|
108
108
|
private readonly _symbolsWithTrades = new Set<string>()
|
|
109
109
|
|
|
110
110
|
canHandle(message: WhiteBitMessage) {
|
|
111
|
-
return
|
|
112
|
-
message.method === 'premiumIndex_update' ||
|
|
113
|
-
message.method === 'futures_update' ||
|
|
114
|
-
(message.method === 'trades_update' && (message as WhiteBitTrades).params[0].endsWith('_PERP'))
|
|
115
|
-
)
|
|
111
|
+
return message.method === 'premiumIndex_update' || message.method === 'futures_update' || message.method === 'trades_update'
|
|
116
112
|
}
|
|
117
113
|
|
|
118
|
-
getFilters(symbols
|
|
114
|
+
getFilters(symbols: string[] = []) {
|
|
119
115
|
symbols = upperCaseSymbols(symbols)
|
|
120
|
-
const perpetuals = symbols?.filter((symbol) => symbol.endsWith('_PERP')) ?? []
|
|
121
116
|
|
|
122
117
|
return [
|
|
123
118
|
{ channel: 'trades_update', symbols } as const,
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
: [])
|
|
119
|
+
{ channel: 'premiumIndex_update', symbols } as const,
|
|
120
|
+
{ channel: 'futures_update', symbols } as const
|
|
127
121
|
]
|
|
128
122
|
}
|
|
129
123
|
|
package/src/mappers/woox.ts
CHANGED
|
@@ -30,7 +30,7 @@ const wooxTradesMapper: Mapper<'woo-x', Trade> = {
|
|
|
30
30
|
return message.topic !== undefined && message.topic.endsWith('@trade')
|
|
31
31
|
},
|
|
32
32
|
|
|
33
|
-
getFilters(symbols
|
|
33
|
+
getFilters(symbols: string[] = []) {
|
|
34
34
|
symbols = upperCaseSymbols(symbols)
|
|
35
35
|
|
|
36
36
|
return [
|
|
@@ -67,7 +67,7 @@ const wooxV3TradesMapper: Mapper<'woo-x', Trade> = {
|
|
|
67
67
|
return message.topic !== undefined && message.topic.startsWith('trade@')
|
|
68
68
|
},
|
|
69
69
|
|
|
70
|
-
getFilters(symbols
|
|
70
|
+
getFilters(symbols: string[] = []) {
|
|
71
71
|
symbols = upperCaseSymbols(symbols)
|
|
72
72
|
|
|
73
73
|
return [
|
|
@@ -112,7 +112,7 @@ class WooxBookChangeMapper implements Mapper<'woo-x', BookChange> {
|
|
|
112
112
|
return false
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
getFilters(symbols
|
|
115
|
+
getFilters(symbols: string[] = []) {
|
|
116
116
|
symbols = upperCaseSymbols(symbols)
|
|
117
117
|
|
|
118
118
|
return [
|
|
@@ -222,7 +222,7 @@ class WooxV3BookChangeMapper implements Mapper<'woo-x', BookChange> {
|
|
|
222
222
|
return message.topic.startsWith('orderbookupdate@')
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
getFilters(symbols
|
|
225
|
+
getFilters(symbols: string[] = []) {
|
|
226
226
|
symbols = upperCaseSymbols(symbols)
|
|
227
227
|
|
|
228
228
|
return [
|
|
@@ -350,9 +350,8 @@ class WooxDerivativeTickerMapper implements Mapper<'woo-x', DerivativeTicker> {
|
|
|
350
350
|
)
|
|
351
351
|
}
|
|
352
352
|
|
|
353
|
-
getFilters(symbols
|
|
353
|
+
getFilters(symbols: string[] = []) {
|
|
354
354
|
symbols = upperCaseSymbols(symbols)
|
|
355
|
-
const spotSymbols = symbols !== undefined ? symbols.map((s) => s.replace('PERP_', 'SPOT_')) : []
|
|
356
355
|
return [
|
|
357
356
|
{
|
|
358
357
|
channel: 'trade',
|
|
@@ -372,7 +371,7 @@ class WooxDerivativeTickerMapper implements Mapper<'woo-x', DerivativeTicker> {
|
|
|
372
371
|
},
|
|
373
372
|
{
|
|
374
373
|
channel: 'indexprice',
|
|
375
|
-
symbols:
|
|
374
|
+
symbols: symbols.map((s) => s.replace('PERP_', 'SPOT_'))
|
|
376
375
|
}
|
|
377
376
|
]
|
|
378
377
|
}
|
|
@@ -437,10 +436,8 @@ class WooxV3DerivativeTickerMapper implements Mapper<'woo-x', DerivativeTicker>
|
|
|
437
436
|
)
|
|
438
437
|
}
|
|
439
438
|
|
|
440
|
-
getFilters(symbols
|
|
439
|
+
getFilters(symbols: string[] = []) {
|
|
441
440
|
symbols = upperCaseSymbols(symbols)
|
|
442
|
-
const spotSymbols = symbols !== undefined ? symbols.map((s) => s.replace('PERP_', 'SPOT_')) : []
|
|
443
|
-
|
|
444
441
|
return [
|
|
445
442
|
{
|
|
446
443
|
channel: 'trade',
|
|
@@ -460,7 +457,7 @@ class WooxV3DerivativeTickerMapper implements Mapper<'woo-x', DerivativeTicker>
|
|
|
460
457
|
},
|
|
461
458
|
{
|
|
462
459
|
channel: 'indexprice',
|
|
463
|
-
symbols:
|
|
460
|
+
symbols: symbols.map((s) => s.replace('PERP_', 'SPOT_'))
|
|
464
461
|
}
|
|
465
462
|
]
|
|
466
463
|
}
|
|
@@ -515,7 +512,7 @@ class WooxBookTickerMapper implements Mapper<'woo-x', BookTicker> {
|
|
|
515
512
|
return message.topic !== undefined && message.topic.endsWith('@bbo')
|
|
516
513
|
}
|
|
517
514
|
|
|
518
|
-
getFilters(symbols
|
|
515
|
+
getFilters(symbols: string[] = []) {
|
|
519
516
|
symbols = upperCaseSymbols(symbols)
|
|
520
517
|
|
|
521
518
|
return [
|
|
@@ -551,7 +548,7 @@ class WooxV3BookTickerMapper implements Mapper<'woo-x', BookTicker> {
|
|
|
551
548
|
return message.topic !== undefined && message.topic.startsWith('bbo@')
|
|
552
549
|
}
|
|
553
550
|
|
|
554
|
-
getFilters(symbols
|
|
551
|
+
getFilters(symbols: string[] = []) {
|
|
555
552
|
symbols = upperCaseSymbols(symbols)
|
|
556
553
|
|
|
557
554
|
return [
|