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.
Files changed (345) hide show
  1. package/README.md +2 -0
  2. package/dist/handy.d.ts +2 -3
  3. package/dist/handy.d.ts.map +1 -1
  4. package/dist/handy.js +3 -12
  5. package/dist/handy.js.map +1 -1
  6. package/dist/mappers/ascendex.js +4 -4
  7. package/dist/mappers/ascendex.js.map +1 -1
  8. package/dist/mappers/aster.js +5 -8
  9. package/dist/mappers/aster.js.map +1 -1
  10. package/dist/mappers/backpack.d.ts.map +1 -1
  11. package/dist/mappers/backpack.js +16 -25
  12. package/dist/mappers/backpack.js.map +1 -1
  13. package/dist/mappers/binance.js +6 -6
  14. package/dist/mappers/binance.js.map +1 -1
  15. package/dist/mappers/binancedex.js +3 -3
  16. package/dist/mappers/binancedex.js.map +1 -1
  17. package/dist/mappers/binanceeuropeanoptions.js +11 -33
  18. package/dist/mappers/binanceeuropeanoptions.js.map +1 -1
  19. package/dist/mappers/bitfinex.js +5 -9
  20. package/dist/mappers/bitfinex.js.map +1 -1
  21. package/dist/mappers/bitflyer.js +3 -3
  22. package/dist/mappers/bitflyer.js.map +1 -1
  23. package/dist/mappers/bitget.js +9 -14
  24. package/dist/mappers/bitget.js.map +1 -1
  25. package/dist/mappers/bithumb.js +2 -2
  26. package/dist/mappers/bithumb.js.map +1 -1
  27. package/dist/mappers/bitmex.js +5 -5
  28. package/dist/mappers/bitmex.js.map +1 -1
  29. package/dist/mappers/bitnomial.js +2 -2
  30. package/dist/mappers/bitnomial.js.map +1 -1
  31. package/dist/mappers/bitstamp.js +3 -3
  32. package/dist/mappers/bitstamp.js.map +1 -1
  33. package/dist/mappers/bitvavo.js +12 -11
  34. package/dist/mappers/bitvavo.js.map +1 -1
  35. package/dist/mappers/blockchaincom.js +2 -2
  36. package/dist/mappers/blockchaincom.js.map +1 -1
  37. package/dist/mappers/bullish.js +7 -7
  38. package/dist/mappers/bullish.js.map +1 -1
  39. package/dist/mappers/bybit.js +11 -11
  40. package/dist/mappers/bybit.js.map +1 -1
  41. package/dist/mappers/bybitspot.d.ts +3 -3
  42. package/dist/mappers/bybitspot.d.ts.map +1 -1
  43. package/dist/mappers/bybitspot.js +3 -3
  44. package/dist/mappers/bybitspot.js.map +1 -1
  45. package/dist/mappers/coinbase.js +3 -3
  46. package/dist/mappers/coinbase.js.map +1 -1
  47. package/dist/mappers/coinbasederivatives.js +4 -4
  48. package/dist/mappers/coinbasederivatives.js.map +1 -1
  49. package/dist/mappers/coinbaseinternational.js +8 -8
  50. package/dist/mappers/coinbaseinternational.js.map +1 -1
  51. package/dist/mappers/coinflex.js +3 -3
  52. package/dist/mappers/coinflex.js.map +1 -1
  53. package/dist/mappers/cryptocom.js +5 -8
  54. package/dist/mappers/cryptocom.js.map +1 -1
  55. package/dist/mappers/cryptofacilities.js +6 -6
  56. package/dist/mappers/cryptofacilities.js.map +1 -1
  57. package/dist/mappers/delta.js +4 -4
  58. package/dist/mappers/delta.js.map +1 -1
  59. package/dist/mappers/delta_india.js +8 -14
  60. package/dist/mappers/delta_india.js.map +1 -1
  61. package/dist/mappers/deribit.js +21 -24
  62. package/dist/mappers/deribit.js.map +1 -1
  63. package/dist/mappers/dydx.js +3 -3
  64. package/dist/mappers/dydx.js.map +1 -1
  65. package/dist/mappers/dydxv4.js +4 -4
  66. package/dist/mappers/dydxv4.js.map +1 -1
  67. package/dist/mappers/ftx.js +5 -5
  68. package/dist/mappers/ftx.js.map +1 -1
  69. package/dist/mappers/gateio.js +6 -6
  70. package/dist/mappers/gateio.js.map +1 -1
  71. package/dist/mappers/gateiofutures.js +6 -6
  72. package/dist/mappers/gateiofutures.js.map +1 -1
  73. package/dist/mappers/gemini.js +5 -5
  74. package/dist/mappers/gemini.js.map +1 -1
  75. package/dist/mappers/hitbtc.js +2 -2
  76. package/dist/mappers/hitbtc.js.map +1 -1
  77. package/dist/mappers/huobi.js +20 -27
  78. package/dist/mappers/huobi.js.map +1 -1
  79. package/dist/mappers/hyperliquid.js +5 -8
  80. package/dist/mappers/hyperliquid.js.map +1 -1
  81. package/dist/mappers/kraken.js +6 -6
  82. package/dist/mappers/kraken.js.map +1 -1
  83. package/dist/mappers/kucoin.js +3 -3
  84. package/dist/mappers/kucoin.js.map +1 -1
  85. package/dist/mappers/kucoinfutures.js +4 -4
  86. package/dist/mappers/kucoinfutures.js.map +1 -1
  87. package/dist/mappers/lighter.js +5 -5
  88. package/dist/mappers/lighter.js.map +1 -1
  89. package/dist/mappers/mapper.d.ts +3 -3
  90. package/dist/mappers/mexc.d.ts +4 -4
  91. package/dist/mappers/mexc.d.ts.map +1 -1
  92. package/dist/mappers/mexc.js +3 -3
  93. package/dist/mappers/mexc.js.map +1 -1
  94. package/dist/mappers/mexcfutures.d.ts +5 -5
  95. package/dist/mappers/mexcfutures.d.ts.map +1 -1
  96. package/dist/mappers/mexcfutures.js +3 -3
  97. package/dist/mappers/mexcfutures.js.map +1 -1
  98. package/dist/mappers/okex.js +19 -21
  99. package/dist/mappers/okex.js.map +1 -1
  100. package/dist/mappers/okexspreads.d.ts +3 -3
  101. package/dist/mappers/okexspreads.d.ts.map +1 -1
  102. package/dist/mappers/okexspreads.js +3 -3
  103. package/dist/mappers/okexspreads.js.map +1 -1
  104. package/dist/mappers/phemex.js +18 -12
  105. package/dist/mappers/phemex.js.map +1 -1
  106. package/dist/mappers/poloniex.js +4 -4
  107. package/dist/mappers/poloniex.js.map +1 -1
  108. package/dist/mappers/polymarket.js +3 -3
  109. package/dist/mappers/polymarket.js.map +1 -1
  110. package/dist/mappers/serum.js +3 -3
  111. package/dist/mappers/serum.js.map +1 -1
  112. package/dist/mappers/upbit.js +2 -2
  113. package/dist/mappers/upbit.js.map +1 -1
  114. package/dist/mappers/whitebit.js +8 -12
  115. package/dist/mappers/whitebit.js.map +1 -1
  116. package/dist/mappers/woox.js +10 -12
  117. package/dist/mappers/woox.js.map +1 -1
  118. package/dist/realtimefeeds/aster.d.ts +3 -2
  119. package/dist/realtimefeeds/aster.d.ts.map +1 -1
  120. package/dist/realtimefeeds/aster.js +12 -2
  121. package/dist/realtimefeeds/aster.js.map +1 -1
  122. package/dist/realtimefeeds/backpack.d.ts +3 -2
  123. package/dist/realtimefeeds/backpack.d.ts.map +1 -1
  124. package/dist/realtimefeeds/backpack.js +9 -2
  125. package/dist/realtimefeeds/backpack.js.map +1 -1
  126. package/dist/realtimefeeds/binance.d.ts +7 -5
  127. package/dist/realtimefeeds/binance.d.ts.map +1 -1
  128. package/dist/realtimefeeds/binance.js +42 -9
  129. package/dist/realtimefeeds/binance.js.map +1 -1
  130. package/dist/realtimefeeds/binanceeuropeanoptions.d.ts +2 -2
  131. package/dist/realtimefeeds/binanceeuropeanoptions.d.ts.map +1 -1
  132. package/dist/realtimefeeds/binanceeuropeanoptions.js +5 -5
  133. package/dist/realtimefeeds/binanceeuropeanoptions.js.map +1 -1
  134. package/dist/realtimefeeds/bitget.d.ts +2 -1
  135. package/dist/realtimefeeds/bitget.d.ts.map +1 -1
  136. package/dist/realtimefeeds/bitget.js +10 -0
  137. package/dist/realtimefeeds/bitget.js.map +1 -1
  138. package/dist/realtimefeeds/bitstamp.d.ts +1 -1
  139. package/dist/realtimefeeds/bitstamp.d.ts.map +1 -1
  140. package/dist/realtimefeeds/bitstamp.js +2 -2
  141. package/dist/realtimefeeds/bitstamp.js.map +1 -1
  142. package/dist/realtimefeeds/bitvavo.d.ts +2 -1
  143. package/dist/realtimefeeds/bitvavo.d.ts.map +1 -1
  144. package/dist/realtimefeeds/bitvavo.js +10 -0
  145. package/dist/realtimefeeds/bitvavo.js.map +1 -1
  146. package/dist/realtimefeeds/bullish.d.ts +2 -2
  147. package/dist/realtimefeeds/bullish.d.ts.map +1 -1
  148. package/dist/realtimefeeds/bullish.js +4 -4
  149. package/dist/realtimefeeds/bullish.js.map +1 -1
  150. package/dist/realtimefeeds/bybit.d.ts +3 -2
  151. package/dist/realtimefeeds/bybit.d.ts.map +1 -1
  152. package/dist/realtimefeeds/bybit.js +18 -3
  153. package/dist/realtimefeeds/bybit.js.map +1 -1
  154. package/dist/realtimefeeds/coinbase.d.ts +4 -1
  155. package/dist/realtimefeeds/coinbase.d.ts.map +1 -1
  156. package/dist/realtimefeeds/coinbase.js +22 -0
  157. package/dist/realtimefeeds/coinbase.js.map +1 -1
  158. package/dist/realtimefeeds/coinbasederivatives.d.ts +3 -7
  159. package/dist/realtimefeeds/coinbasederivatives.d.ts.map +1 -1
  160. package/dist/realtimefeeds/coinbasederivatives.js +10 -12
  161. package/dist/realtimefeeds/coinbasederivatives.js.map +1 -1
  162. package/dist/realtimefeeds/cryptofacilities.d.ts +2 -1
  163. package/dist/realtimefeeds/cryptofacilities.d.ts.map +1 -1
  164. package/dist/realtimefeeds/cryptofacilities.js +6 -0
  165. package/dist/realtimefeeds/cryptofacilities.js.map +1 -1
  166. package/dist/realtimefeeds/delta.d.ts +2 -1
  167. package/dist/realtimefeeds/delta.d.ts.map +1 -1
  168. package/dist/realtimefeeds/delta.js +9 -0
  169. package/dist/realtimefeeds/delta.js.map +1 -1
  170. package/dist/realtimefeeds/delta_india.d.ts +4 -3
  171. package/dist/realtimefeeds/delta_india.d.ts.map +1 -1
  172. package/dist/realtimefeeds/delta_india.js +22 -17
  173. package/dist/realtimefeeds/delta_india.js.map +1 -1
  174. package/dist/realtimefeeds/deribit.d.ts +2 -1
  175. package/dist/realtimefeeds/deribit.d.ts.map +1 -1
  176. package/dist/realtimefeeds/deribit.js +11 -0
  177. package/dist/realtimefeeds/deribit.js.map +1 -1
  178. package/dist/realtimefeeds/ftx.d.ts +2 -2
  179. package/dist/realtimefeeds/ftx.d.ts.map +1 -1
  180. package/dist/realtimefeeds/ftx.js +9 -8
  181. package/dist/realtimefeeds/ftx.js.map +1 -1
  182. package/dist/realtimefeeds/gateio.d.ts +2 -1
  183. package/dist/realtimefeeds/gateio.d.ts.map +1 -1
  184. package/dist/realtimefeeds/gateio.js +10 -0
  185. package/dist/realtimefeeds/gateio.js.map +1 -1
  186. package/dist/realtimefeeds/gateiofutures.d.ts +5 -4
  187. package/dist/realtimefeeds/gateiofutures.d.ts.map +1 -1
  188. package/dist/realtimefeeds/gateiofutures.js +24 -14
  189. package/dist/realtimefeeds/gateiofutures.js.map +1 -1
  190. package/dist/realtimefeeds/gemini.d.ts +4 -1
  191. package/dist/realtimefeeds/gemini.d.ts.map +1 -1
  192. package/dist/realtimefeeds/gemini.js +25 -0
  193. package/dist/realtimefeeds/gemini.js.map +1 -1
  194. package/dist/realtimefeeds/hitbtc.d.ts +2 -1
  195. package/dist/realtimefeeds/hitbtc.d.ts.map +1 -1
  196. package/dist/realtimefeeds/hitbtc.js +10 -0
  197. package/dist/realtimefeeds/hitbtc.js.map +1 -1
  198. package/dist/realtimefeeds/huobi.d.ts +8 -7
  199. package/dist/realtimefeeds/huobi.d.ts.map +1 -1
  200. package/dist/realtimefeeds/huobi.js +49 -21
  201. package/dist/realtimefeeds/huobi.js.map +1 -1
  202. package/dist/realtimefeeds/index.d.ts +1 -1
  203. package/dist/realtimefeeds/index.d.ts.map +1 -1
  204. package/dist/realtimefeeds/index.js +2 -2
  205. package/dist/realtimefeeds/index.js.map +1 -1
  206. package/dist/realtimefeeds/kucoin.d.ts +2 -1
  207. package/dist/realtimefeeds/kucoin.d.ts.map +1 -1
  208. package/dist/realtimefeeds/kucoin.js +10 -0
  209. package/dist/realtimefeeds/kucoin.js.map +1 -1
  210. package/dist/realtimefeeds/kucoinfutures.d.ts +4 -3
  211. package/dist/realtimefeeds/kucoinfutures.d.ts.map +1 -1
  212. package/dist/realtimefeeds/kucoinfutures.js +15 -4
  213. package/dist/realtimefeeds/kucoinfutures.js.map +1 -1
  214. package/dist/realtimefeeds/lighter.d.ts +2 -1
  215. package/dist/realtimefeeds/lighter.d.ts.map +1 -1
  216. package/dist/realtimefeeds/lighter.js +10 -0
  217. package/dist/realtimefeeds/lighter.js.map +1 -1
  218. package/dist/realtimefeeds/mexc.d.ts +2 -1
  219. package/dist/realtimefeeds/mexc.d.ts.map +1 -1
  220. package/dist/realtimefeeds/mexc.js +10 -0
  221. package/dist/realtimefeeds/mexc.js.map +1 -1
  222. package/dist/realtimefeeds/mexcfutures.d.ts +2 -1
  223. package/dist/realtimefeeds/mexcfutures.d.ts.map +1 -1
  224. package/dist/realtimefeeds/mexcfutures.js +11 -0
  225. package/dist/realtimefeeds/mexcfutures.js.map +1 -1
  226. package/dist/realtimefeeds/okex.d.ts +7 -5
  227. package/dist/realtimefeeds/okex.d.ts.map +1 -1
  228. package/dist/realtimefeeds/okex.js +32 -11
  229. package/dist/realtimefeeds/okex.js.map +1 -1
  230. package/dist/realtimefeeds/phemex.d.ts.map +1 -1
  231. package/dist/realtimefeeds/phemex.js +1 -0
  232. package/dist/realtimefeeds/phemex.js.map +1 -1
  233. package/dist/realtimefeeds/poloniex.d.ts +2 -1
  234. package/dist/realtimefeeds/poloniex.d.ts.map +1 -1
  235. package/dist/realtimefeeds/poloniex.js +11 -0
  236. package/dist/realtimefeeds/poloniex.js.map +1 -1
  237. package/dist/realtimefeeds/polymarket.d.ts +1 -1
  238. package/dist/realtimefeeds/polymarket.d.ts.map +1 -1
  239. package/dist/realtimefeeds/polymarket.js +3 -3
  240. package/dist/realtimefeeds/polymarket.js.map +1 -1
  241. package/dist/realtimefeeds/realtimefeed.d.ts +20 -4
  242. package/dist/realtimefeeds/realtimefeed.d.ts.map +1 -1
  243. package/dist/realtimefeeds/realtimefeed.js +41 -3
  244. package/dist/realtimefeeds/realtimefeed.js.map +1 -1
  245. package/dist/realtimefeeds/whitebit.d.ts +4 -11
  246. package/dist/realtimefeeds/whitebit.d.ts.map +1 -1
  247. package/dist/realtimefeeds/whitebit.js +23 -19
  248. package/dist/realtimefeeds/whitebit.js.map +1 -1
  249. package/dist/realtimefeeds/woox.d.ts +2 -1
  250. package/dist/realtimefeeds/woox.d.ts.map +1 -1
  251. package/dist/realtimefeeds/woox.js +11 -0
  252. package/dist/realtimefeeds/woox.js.map +1 -1
  253. package/dist/stream.d.ts +4 -2
  254. package/dist/stream.d.ts.map +1 -1
  255. package/dist/stream.js +10 -9
  256. package/dist/stream.js.map +1 -1
  257. package/package.json +1 -1
  258. package/src/handy.ts +5 -15
  259. package/src/mappers/ascendex.ts +4 -4
  260. package/src/mappers/aster.ts +5 -11
  261. package/src/mappers/backpack.ts +17 -23
  262. package/src/mappers/binance.ts +6 -6
  263. package/src/mappers/binancedex.ts +3 -3
  264. package/src/mappers/binanceeuropeanoptions.ts +11 -39
  265. package/src/mappers/bitfinex.ts +5 -9
  266. package/src/mappers/bitflyer.ts +3 -3
  267. package/src/mappers/bitget.ts +9 -14
  268. package/src/mappers/bithumb.ts +2 -2
  269. package/src/mappers/bitmex.ts +5 -5
  270. package/src/mappers/bitnomial.ts +2 -2
  271. package/src/mappers/bitstamp.ts +3 -3
  272. package/src/mappers/bitvavo.ts +21 -19
  273. package/src/mappers/blockchaincom.ts +2 -2
  274. package/src/mappers/bullish.ts +7 -7
  275. package/src/mappers/bybit.ts +11 -11
  276. package/src/mappers/bybitspot.ts +3 -3
  277. package/src/mappers/coinbase.ts +3 -3
  278. package/src/mappers/coinbasederivatives.ts +4 -4
  279. package/src/mappers/coinbaseinternational.ts +9 -9
  280. package/src/mappers/coinflex.ts +3 -3
  281. package/src/mappers/cryptocom.ts +5 -8
  282. package/src/mappers/cryptofacilities.ts +6 -6
  283. package/src/mappers/delta.ts +4 -4
  284. package/src/mappers/delta_india.ts +8 -14
  285. package/src/mappers/deribit.ts +21 -25
  286. package/src/mappers/dydx.ts +3 -3
  287. package/src/mappers/dydxv4.ts +4 -4
  288. package/src/mappers/ftx.ts +5 -5
  289. package/src/mappers/gateio.ts +6 -6
  290. package/src/mappers/gateiofutures.ts +6 -6
  291. package/src/mappers/gemini.ts +5 -5
  292. package/src/mappers/hitbtc.ts +2 -2
  293. package/src/mappers/huobi.ts +21 -29
  294. package/src/mappers/hyperliquid.ts +6 -9
  295. package/src/mappers/kraken.ts +6 -6
  296. package/src/mappers/kucoin.ts +3 -3
  297. package/src/mappers/kucoinfutures.ts +4 -4
  298. package/src/mappers/lighter.ts +5 -5
  299. package/src/mappers/mapper.ts +3 -3
  300. package/src/mappers/mexc.ts +3 -3
  301. package/src/mappers/mexcfutures.ts +3 -3
  302. package/src/mappers/okex.ts +19 -25
  303. package/src/mappers/okexspreads.ts +3 -3
  304. package/src/mappers/phemex.ts +18 -12
  305. package/src/mappers/poloniex.ts +4 -4
  306. package/src/mappers/polymarket.ts +3 -3
  307. package/src/mappers/serum.ts +3 -3
  308. package/src/mappers/upbit.ts +2 -2
  309. package/src/mappers/whitebit.ts +8 -14
  310. package/src/mappers/woox.ts +10 -13
  311. package/src/realtimefeeds/aster.ts +21 -3
  312. package/src/realtimefeeds/backpack.ts +17 -3
  313. package/src/realtimefeeds/binance.ts +68 -11
  314. package/src/realtimefeeds/binanceeuropeanoptions.ts +14 -5
  315. package/src/realtimefeeds/bitget.ts +13 -1
  316. package/src/realtimefeeds/bitstamp.ts +8 -2
  317. package/src/realtimefeeds/bitvavo.ts +13 -1
  318. package/src/realtimefeeds/bullish.ts +11 -4
  319. package/src/realtimefeeds/bybit.ts +27 -4
  320. package/src/realtimefeeds/coinbase.ts +34 -1
  321. package/src/realtimefeeds/coinbasederivatives.ts +18 -13
  322. package/src/realtimefeeds/cryptofacilities.ts +9 -1
  323. package/src/realtimefeeds/delta.ts +13 -1
  324. package/src/realtimefeeds/delta_india.ts +31 -17
  325. package/src/realtimefeeds/deribit.ts +13 -1
  326. package/src/realtimefeeds/ftx.ts +17 -8
  327. package/src/realtimefeeds/gateio.ts +13 -1
  328. package/src/realtimefeeds/gateiofutures.ts +37 -17
  329. package/src/realtimefeeds/gemini.ts +28 -1
  330. package/src/realtimefeeds/hitbtc.ts +13 -1
  331. package/src/realtimefeeds/huobi.ts +92 -22
  332. package/src/realtimefeeds/index.ts +3 -2
  333. package/src/realtimefeeds/kucoin.ts +12 -1
  334. package/src/realtimefeeds/kucoinfutures.ts +24 -5
  335. package/src/realtimefeeds/lighter.ts +12 -1
  336. package/src/realtimefeeds/mexc.ts +12 -1
  337. package/src/realtimefeeds/mexcfutures.ts +13 -1
  338. package/src/realtimefeeds/okex.ts +76 -11
  339. package/src/realtimefeeds/phemex.ts +1 -0
  340. package/src/realtimefeeds/poloniex.ts +13 -1
  341. package/src/realtimefeeds/polymarket.ts +4 -3
  342. package/src/realtimefeeds/realtimefeed.ts +53 -5
  343. package/src/realtimefeeds/whitebit.ts +30 -18
  344. package/src/realtimefeeds/woox.ts +13 -1
  345. package/src/stream.ts +37 -8
@@ -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?: string[]) {
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?: string[]) {
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?: string[]) {
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?: string[]) {
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?: string[]) {
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?: string[]) {
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?: string[]) {
299
+ getFilters(symbols: string[] = []) {
300
300
  symbols = upperCaseSymbols(symbols)
301
301
  return [
302
302
  {
@@ -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?: string[]) {
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?: string[]) {
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?: string[]) {
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?: string[]) {
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?: string[]) {
192
+ getFilters(_symbols: string[] = []) {
193
193
  return [
194
194
  {
195
195
  channel: 'market_stats' as const,
@@ -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
- * `undefined` and `[]` both mean all symbols, in the argument and in returned filters.
12
- * Mappers that narrow symbols per channel must check `isNullOrEmptyArray(symbols)` before filtering,
13
- * so that an empty request is not mistaken for "no matching symbols".
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
  }
@@ -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?: string[]) {
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?: string[]) {
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?: string[]) {
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?: string[]) {
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?: string[]) {
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?: string[]) {
203
+ getFilters(symbols: string[] = []) {
204
204
  const normalizedSymbols = upperCaseSymbols(symbols)
205
205
 
206
206
  return [
@@ -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?: string[]) {
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?: string[]) {
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?: string[]) {
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?: string[]) {
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 !== undefined ? symbols.map((symbol) => this._getIndexSymbol(symbol)) : undefined
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?: string[]) {
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?: string[]) {
600
+ getFilters(symbols: string[] = []) {
601
601
  symbols = upperCaseSymbols(symbols)
602
-
603
- const indexes = symbols !== undefined ? [...new Set(symbols.map((s) => getOkexOptionsUnderlyingIndex(s)))] : undefined
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?: string[]) {
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?: string[]) {
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?: string[]) {
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?: string[]) {
1072
+ getFilters(symbols: string[] = []) {
1076
1073
  symbols = upperCaseSymbols(symbols)
1077
1074
 
1078
- const indexes =
1079
- symbols !== undefined
1080
- ? symbols.map((s) => {
1081
- const symbolParts = s.split('-')
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?: string[]) {
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?: string[]) {
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?: string[]) {
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?: string[]) {
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?: string[]) {
98
+ getFilters(symbols: string[] = []) {
99
99
  symbols = upperCaseSymbols(symbols)
100
100
 
101
101
  return [
@@ -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?: string[]) {
273
- if (symbols == undefined || symbols.length === 0) {
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?: string[]) {
364
- if (symbols == undefined || symbols.length === 0) {
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?: string[]) {
436
- if (symbols == undefined || symbols.length === 0) {
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
  }
@@ -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?: string[]) {
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?: string[]) {
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?: string[]) {
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?: string[]) {
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?: string[]) {
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?: string[]) {
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?: string[]) {
117
+ getFilters(symbols: string[] = []) {
118
118
  return [{ channel: 'best_bid_ask' as const, symbols }]
119
119
  }
120
120
 
@@ -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?: string[]) {
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?: string[]) {
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?: string[]) {
110
+ getFilters(symbols: string[] = []) {
111
111
  if (this._exchange === 'serum') {
112
112
  symbols = upperCaseSymbols(symbols)
113
113
  }
@@ -15,7 +15,7 @@ class UpbitTradesMapper implements Mapper<'upbit', Trade> {
15
15
  return message.type === 'trade'
16
16
  }
17
17
 
18
- getFilters(symbols?: string[]) {
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?: string[]) {
49
+ getFilters(symbols: string[] = []) {
50
50
  symbols = upperCaseSymbols(symbols)
51
51
 
52
52
  return [
@@ -1,4 +1,4 @@
1
- import { asNonZeroNumberOrUndefined, asNumberOrUndefined, fromMicroSecondsToDate, isNullOrEmptyArray, upperCaseSymbols } from '../handy.ts'
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?: string[]) {
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?: string[]) {
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?: string[]) {
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?: string[]) {
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
- ...(isNullOrEmptyArray(symbols) || perpetuals.length > 0
125
- ? [{ channel: 'premiumIndex_update', symbols: perpetuals } as const, { channel: 'futures_update', symbols: perpetuals } as const]
126
- : [])
119
+ { channel: 'premiumIndex_update', symbols } as const,
120
+ { channel: 'futures_update', symbols } as const
127
121
  ]
128
122
  }
129
123
 
@@ -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?: string[]) {
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?: string[]) {
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?: string[]) {
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?: string[]) {
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?: string[]) {
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: spotSymbols
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?: string[]) {
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: spotSymbols
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?: string[]) {
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?: string[]) {
551
+ getFilters(symbols: string[] = []) {
555
552
  symbols = upperCaseSymbols(symbols)
556
553
 
557
554
  return [