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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tardis-dev",
3
- "version": "18.10.1",
3
+ "version": "18.11.0",
4
4
  "engines": {
5
5
  "node": "^24.22.1 || >=26.12.1"
6
6
  },
package/src/handy.ts CHANGED
@@ -171,7 +171,7 @@ export async function* normalizeMessages(
171
171
  }
172
172
  }
173
173
 
174
- export function getFilters<T extends Exchange>(mappers: Mapper<T, any>[], symbols?: string[]) {
174
+ export function getFilters<T extends Exchange>(mappers: Mapper<T, any>[], symbols: string[] = []) {
175
175
  const filters = mappers.flatMap((mapper) => mapper.getFilters(symbols))
176
176
 
177
177
  const deduplicatedFilters = filters.reduce(
@@ -1104,15 +1104,8 @@ export function asNonZeroNumberOrUndefined(val: string | number | undefined | nu
1104
1104
  return Number.isFinite(asNumber) && asNumber !== 0 ? asNumber : undefined
1105
1105
  }
1106
1106
 
1107
- export function isNullOrEmptyArray(array: readonly unknown[] | null | undefined) {
1108
- return !array?.length
1109
- }
1110
-
1111
- export function upperCaseSymbols(symbols?: string[]) {
1112
- if (symbols !== undefined) {
1113
- return symbols.map((s) => s.toUpperCase())
1114
- }
1115
- return
1107
+ export function upperCaseSymbols(symbols: string[]) {
1108
+ return symbols.map((s) => s.toUpperCase())
1116
1109
  }
1117
1110
 
1118
1111
  export function createNormalizedSymbolFilter(symbols: string[] | undefined, filters: Filter<any>[]) {
@@ -1137,11 +1130,8 @@ export function createNormalizedSymbolFilter(symbols: string[] | undefined, filt
1137
1130
  return (symbol: string) => allowedSymbols.has(symbol)
1138
1131
  }
1139
1132
 
1140
- export function lowerCaseSymbols(symbols?: string[]) {
1141
- if (symbols !== undefined) {
1142
- return symbols.map((s) => s.toLowerCase())
1143
- }
1144
- return
1133
+ export function lowerCaseSymbols(symbols: string[]) {
1134
+ return symbols.map((s) => s.toLowerCase())
1145
1135
  }
1146
1136
 
1147
1137
  export const fromMicroSecondsToDate = (micros: number) => {
@@ -17,7 +17,7 @@ class AscendexTradesMapper implements Mapper<'ascendex', Trade> {
17
17
  return message.m === 'trades'
18
18
  }
19
19
 
20
- getFilters(symbols?: string[]) {
20
+ getFilters(symbols: string[] = []) {
21
21
  symbols = upperCaseSymbols(symbols)
22
22
  return [
23
23
  {
@@ -49,7 +49,7 @@ class AscendexBookChangeMapper implements Mapper<'ascendex', BookChange> {
49
49
  return message.m === 'depth-realtime' || message.m === 'depth-snapshot-realtime'
50
50
  }
51
51
 
52
- getFilters(symbols?: string[]) {
52
+ getFilters(symbols: string[] = []) {
53
53
  symbols = upperCaseSymbols(symbols)
54
54
  return [
55
55
  {
@@ -94,7 +94,7 @@ class AscendexDerivativeTickerMapper implements Mapper<'ascendex', DerivativeTic
94
94
  return message.m === 'futures-pricing-data' || message.m === 'trades'
95
95
  }
96
96
 
97
- getFilters(symbols?: string[]) {
97
+ getFilters(symbols: string[] = []) {
98
98
  symbols = upperCaseSymbols(symbols)
99
99
  return [
100
100
  {
@@ -137,7 +137,7 @@ class AscendexBookTickerMapper implements Mapper<'ascendex', BookTicker> {
137
137
  return message.m === 'bbo'
138
138
  }
139
139
 
140
- getFilters(symbols?: string[]) {
140
+ getFilters(symbols: string[] = []) {
141
141
  symbols = upperCaseSymbols(symbols)
142
142
  return [
143
143
  {
@@ -40,7 +40,7 @@ class AsterTradesMapper implements Mapper<'aster' | 'aster-futures', Trade> {
40
40
  return message.stream?.endsWith('@trade') === true
41
41
  }
42
42
 
43
- getFilters(symbols?: string[]) {
43
+ getFilters(symbols: string[] = []) {
44
44
  return [{ channel: 'trade', symbols: lowerCaseSymbols(symbols) } as const]
45
45
  }
46
46
 
@@ -83,7 +83,7 @@ class AsterBookChangeMapper implements Mapper<'aster' | 'aster-futures', BookCha
83
83
  return message.stream?.includes('@depth') === true
84
84
  }
85
85
 
86
- getFilters(symbols?: string[]) {
86
+ getFilters(symbols: string[] = []) {
87
87
  return [
88
88
  { channel: 'depth', symbols: lowerCaseSymbols(symbols) } as const,
89
89
  { channel: 'depthSnapshot', symbols: lowerCaseSymbols(symbols) } as const
@@ -160,12 +160,6 @@ class AsterBookChangeMapper implements Mapper<'aster' | 'aster-futures', BookCha
160
160
  } else {
161
161
  throw new Error(this.getSnapshotOverlapError(depthUpdateData, lastUpdateId))
162
162
  }
163
- } else if (depthUpdateData.pu !== lastUpdateId) {
164
- throw new Error(
165
- `Book depth update has a sequence gap, update ${JSON.stringify(
166
- depthUpdateData
167
- )}, lastUpdateId: ${lastUpdateId}, exchange ${this.exchange}`
168
- )
169
163
  }
170
164
 
171
165
  depthContext.lastUpdateId = depthUpdateData.u
@@ -223,7 +217,7 @@ class AsterBookTickerMapper implements Mapper<'aster' | 'aster-futures', BookTic
223
217
  return message.stream?.endsWith('@bookTicker') === true
224
218
  }
225
219
 
226
- getFilters(symbols?: string[]) {
220
+ getFilters(symbols: string[] = []) {
227
221
  return [{ channel: 'bookTicker', symbols: lowerCaseSymbols(symbols) } as const]
228
222
  }
229
223
 
@@ -272,7 +266,7 @@ class AsterFuturesDerivativeTickerMapper implements Mapper<'aster-futures', Deri
272
266
  )
273
267
  }
274
268
 
275
- getFilters(symbols?: string[]) {
269
+ getFilters(symbols: string[] = []) {
276
270
  const normalizedSymbols = lowerCaseSymbols(symbols)
277
271
 
278
272
  return [
@@ -324,7 +318,7 @@ class AsterFuturesLiquidationsMapper implements Mapper<'aster-futures', Liquidat
324
318
  return message.stream?.endsWith('@forceOrder') === true
325
319
  }
326
320
 
327
- getFilters(symbols?: string[]) {
321
+ getFilters(symbols: string[] = []) {
328
322
  return [{ channel: 'forceOrder', symbols: lowerCaseSymbols(symbols) } as const]
329
323
  }
330
324
 
@@ -1,4 +1,4 @@
1
- import { asNumberOrUndefined, CircularBuffer, fromMicroSecondsToDate, isNullOrEmptyArray } from '../handy.ts'
1
+ import { asNumberOrUndefined, CircularBuffer, fromMicroSecondsToDate } from '../handy.ts'
2
2
  import { BookChange, BookTicker, DerivativeTicker, Liquidation, Trade } from '../types.ts'
3
3
  import { Mapper, PendingTickerInfoHelper } from './mapper.ts'
4
4
  import { exchangeMappers, isRealTime } from './registry.ts'
@@ -6,7 +6,7 @@ import { exchangeMappers, isRealTime } from './registry.ts'
6
6
  export const backpackMappers = exchangeMappers({
7
7
  backpack: {
8
8
  trades: () => new BackpackTradesMapper(),
9
- bookChanges: (localTimestamp) => new BackpackBookChangeMapper(isRealTime(localTimestamp)),
9
+ bookChanges: (localTimestamp) => new BackpackBookChangeMapper({ validateSnapshotOverlap: isRealTime(localTimestamp) }),
10
10
  bookTickers: () => new BackpackBookTickerMapper(),
11
11
  derivativeTickers: () => new BackpackDerivativeTickerMapper(),
12
12
  liquidations: () => new BackpackLiquidationsMapper()
@@ -18,7 +18,7 @@ class BackpackTradesMapper implements Mapper<'backpack', Trade> {
18
18
  return message.stream?.startsWith('trade.') === true
19
19
  }
20
20
 
21
- getFilters(symbols?: string[]) {
21
+ getFilters(symbols: string[] = []) {
22
22
  return [{ channel: 'trade', symbols } as const]
23
23
  }
24
24
 
@@ -40,13 +40,13 @@ class BackpackTradesMapper implements Mapper<'backpack', Trade> {
40
40
  class BackpackBookChangeMapper implements Mapper<'backpack', BookChange> {
41
41
  private readonly bookStates = new Map<string, BackpackBookState>()
42
42
 
43
- constructor(private readonly validateSequences: boolean) {}
43
+ constructor(private readonly options: { validateSnapshotOverlap: boolean }) {}
44
44
 
45
45
  canHandle(message: BackpackMessage<unknown>) {
46
46
  return message.stream?.startsWith('depth.') === true || message.stream?.startsWith('depthSnapshot.') === true
47
47
  }
48
48
 
49
- getFilters(symbols?: string[]) {
49
+ getFilters(symbols: string[] = []) {
50
50
  return [{ channel: 'depth', symbols } as const, { channel: 'depthSnapshot', symbols } as const]
51
51
  }
52
52
 
@@ -107,8 +107,13 @@ class BackpackBookChangeMapper implements Mapper<'backpack', BookChange> {
107
107
  return false
108
108
  }
109
109
 
110
- if (this.validateSequences && (data.U <= bookState.sequence! + 1 && data.u >= bookState.sequence! + 1) == false) {
111
- throw new Error(`Backpack depth sequence gap for ${data.s}: expected ${bookState.sequence! + 1}, received ${data.U}-${data.u}`)
110
+ if (!bookState.validatedFirstUpdate) {
111
+ if (this.options.validateSnapshotOverlap && data.U > bookState.sequence! + 1) {
112
+ throw new Error(
113
+ `Backpack book snapshot has no overlap with first update for ${data.s}: expected ${bookState.sequence! + 1}, received ${data.U}-${data.u}`
114
+ )
115
+ }
116
+ bookState.validatedFirstUpdate = true
112
117
  }
113
118
  bookState.sequence = data.u
114
119
  return true
@@ -149,7 +154,7 @@ class BackpackBookTickerMapper implements Mapper<'backpack', BookTicker> {
149
154
  canHandle(message: BackpackMessage<unknown>) {
150
155
  return message.stream?.startsWith('bookTicker.') === true
151
156
  }
152
- getFilters(symbols?: string[]) {
157
+ getFilters(symbols: string[] = []) {
153
158
  return [{ channel: 'bookTicker', symbols } as const]
154
159
  }
155
160
  *map({ data }: BackpackBookTickerMessage, localTimestamp: Date) {
@@ -171,16 +176,10 @@ class BackpackDerivativeTickerMapper implements Mapper<'backpack', DerivativeTic
171
176
  private readonly pending = new PendingTickerInfoHelper()
172
177
 
173
178
  canHandle(message: BackpackMessage<unknown>) {
174
- return /^(markPrice|openInterest|ticker)\..+_PERP$/.test(message.stream)
179
+ return /^(markPrice|openInterest|ticker)\./.test(message.stream)
175
180
  }
176
181
 
177
- getFilters(symbols?: string[]) {
178
- if (!isNullOrEmptyArray(symbols)) {
179
- symbols = symbols!.filter((symbol) => symbol.endsWith('_PERP'))
180
- if (symbols.length === 0) {
181
- return []
182
- }
183
- }
182
+ getFilters(symbols: string[] = []) {
184
183
  return [
185
184
  { channel: 'markPrice', symbols } as const,
186
185
  { channel: 'openInterest', symbols } as const,
@@ -224,13 +223,7 @@ class BackpackLiquidationsMapper implements Mapper<'backpack', Liquidation> {
224
223
  return message.stream?.startsWith('liquidation.') === true
225
224
  }
226
225
 
227
- getFilters(symbols?: string[]) {
228
- if (!isNullOrEmptyArray(symbols)) {
229
- symbols = symbols!.filter((symbol) => symbol.endsWith('_PERP'))
230
- if (symbols.length === 0) {
231
- return []
232
- }
233
- }
226
+ getFilters(symbols: string[] = []) {
234
227
  return [{ channel: 'liquidation', symbols } as const]
235
228
  }
236
229
 
@@ -251,6 +244,7 @@ class BackpackLiquidationsMapper implements Mapper<'backpack', Liquidation> {
251
244
 
252
245
  type BackpackBookState = {
253
246
  sequence?: number
247
+ validatedFirstUpdate?: boolean
254
248
  discardedThrough?: number
255
249
  buffered: CircularBuffer<BackpackDepthMessage['data']>
256
250
  }
@@ -65,7 +65,7 @@ class BinanceTradesMapper implements Mapper<'binance' | 'binance-jersey' | 'bina
65
65
  return message.stream.endsWith('@trade')
66
66
  }
67
67
 
68
- getFilters(symbols?: string[]) {
68
+ getFilters(symbols: string[] = []) {
69
69
  symbols = lowerCaseSymbols(symbols)
70
70
 
71
71
  return [
@@ -125,7 +125,7 @@ class BinanceBookChangeMapper implements Mapper<
125
125
  return message.stream.includes('@depth')
126
126
  }
127
127
 
128
- getFilters(symbols?: string[]) {
128
+ getFilters(symbols: string[] = []) {
129
129
  symbols = lowerCaseSymbols(symbols)
130
130
 
131
131
  return [
@@ -334,7 +334,7 @@ class BinanceFuturesDerivativeTickerMapper implements Mapper<'binance-futures' |
334
334
  )
335
335
  }
336
336
 
337
- getFilters(symbols?: string[]): FilterForExchange['binance-futures' | 'binance-delivery'][] {
337
+ getFilters(symbols: string[] = []): FilterForExchange['binance-futures' | 'binance-delivery'][] {
338
338
  symbols = lowerCaseSymbols(symbols)
339
339
 
340
340
  const filters = [
@@ -356,7 +356,7 @@ class BinanceFuturesDerivativeTickerMapper implements Mapper<'binance-futures' |
356
356
  // index channel requires index symbol
357
357
  filters.push({
358
358
  channel: 'indexPrice' as any,
359
- symbols: symbols !== undefined ? symbols.map((s) => s.split('_')[0]) : undefined
359
+ symbols: symbols.map((s) => s.split('_')[0])
360
360
  })
361
361
  }
362
362
 
@@ -422,7 +422,7 @@ class BinanceLiquidationsMapper implements Mapper<'binance-futures' | 'binance-d
422
422
  return message.stream.endsWith('@forceOrder')
423
423
  }
424
424
 
425
- getFilters(symbols?: string[]) {
425
+ getFilters(symbols: string[] = []) {
426
426
  symbols = lowerCaseSymbols(symbols)
427
427
 
428
428
  return [
@@ -467,7 +467,7 @@ class BinanceBookTickerMapper implements Mapper<'binance-futures' | 'binance-del
467
467
  return message.stream.endsWith('@bookTicker')
468
468
  }
469
469
 
470
- getFilters(symbols?: string[]) {
470
+ getFilters(symbols: string[] = []) {
471
471
  symbols = lowerCaseSymbols(symbols)
472
472
 
473
473
  return [
@@ -18,7 +18,7 @@ const binanceDexTradesMapper: Mapper<'binance-dex', Trade> = {
18
18
  return message.stream === 'trades'
19
19
  },
20
20
 
21
- getFilters(symbols?: string[]) {
21
+ getFilters(symbols: string[] = []) {
22
22
  symbols = upperCaseSymbols(symbols)
23
23
 
24
24
  return [
@@ -57,7 +57,7 @@ const binanceDexBookChangeMapper: Mapper<'binance-dex', BookChange> = {
57
57
  return message.stream === 'marketDiff' || message.stream === 'depthSnapshot'
58
58
  },
59
59
 
60
- getFilters(symbols?: string[]) {
60
+ getFilters(symbols: string[] = []) {
61
61
  symbols = upperCaseSymbols(symbols)
62
62
  return [
63
63
  {
@@ -108,7 +108,7 @@ const binanceDexBookTickerMapper: Mapper<'binance-dex', BookTicker> = {
108
108
  return message.stream === 'ticker'
109
109
  },
110
110
 
111
- getFilters(symbols?: string[]) {
111
+ getFilters(symbols: string[] = []) {
112
112
  symbols = upperCaseSymbols(symbols)
113
113
  return [
114
114
  {
@@ -34,15 +34,10 @@ class BinanceEuropeanOptionsTradesMapper implements Mapper<'binance-european-opt
34
34
  return message.stream.endsWith('@trade')
35
35
  }
36
36
 
37
- getFilters(symbols?: string[]) {
37
+ getFilters(symbols: string[] = []) {
38
38
  symbols = upperCaseSymbols(symbols)
39
39
 
40
- return [
41
- {
42
- channel: 'trade',
43
- symbols
44
- } as const
45
- ]
40
+ return [{ channel: 'trade', symbols } as const]
46
41
  }
47
42
 
48
43
  *map(binanceTradeResponse: BinanceResponse<BinanceOptionsTradeData>, localTimestamp: Date) {
@@ -71,7 +66,7 @@ class BinanceEuropeanOptionsTradesMapperV2 implements Mapper<'binance-european-o
71
66
  return message.stream.endsWith('@optionTrade')
72
67
  }
73
68
 
74
- getFilters(symbols?: string[]) {
69
+ getFilters(symbols: string[] = []) {
75
70
  symbols = lowerCaseSymbols(symbols)
76
71
 
77
72
  return [
@@ -108,7 +103,7 @@ class BinanceEuropeanOptionsBookChangeMapper implements Mapper<'binance-european
108
103
  return message.stream.includes('@depth100')
109
104
  }
110
105
 
111
- getFilters(symbols?: string[]) {
106
+ getFilters(symbols: string[] = []) {
112
107
  symbols = upperCaseSymbols(symbols)
113
108
 
114
109
  return [
@@ -150,7 +145,7 @@ class BinanceEuropeanOptionsBookChangeMapperV2 implements Mapper<'binance-europe
150
145
  return message.stream.includes('@depth20')
151
146
  }
152
147
 
153
- getFilters(symbols?: string[]) {
148
+ getFilters(symbols: string[] = []) {
154
149
  symbols = lowerCaseSymbols(symbols)
155
150
 
156
151
  return [
@@ -192,7 +187,7 @@ class BinanceEuropeanOptionsBookTickerMapper implements Mapper<'binance-european
192
187
  return message.stream.endsWith('@bookTicker')
193
188
  }
194
189
 
195
- getFilters(symbols?: string[]) {
190
+ getFilters(symbols: string[] = []) {
196
191
  symbols = lowerCaseSymbols(symbols)
197
192
 
198
193
  return [
@@ -237,25 +232,9 @@ class BinanceEuropeanOptionSummaryMapper implements Mapper<'binance-european-opt
237
232
  return message.stream.endsWith('@ticker') || message.stream.endsWith('@index') || message.stream.includes('@openInterest')
238
233
  }
239
234
 
240
- getFilters(symbols?: string[]) {
235
+ getFilters(symbols: string[] = []) {
241
236
  symbols = upperCaseSymbols(symbols)
242
237
 
243
- const indexes =
244
- symbols !== undefined
245
- ? symbols.map((s) => {
246
- const symbolParts = s.split('-')
247
- return `${symbolParts[0]}USDT`
248
- })
249
- : undefined
250
-
251
- const underlyings =
252
- symbols !== undefined
253
- ? symbols.map((s) => {
254
- const symbolParts = s.split('-')
255
- return `${symbolParts[0]}`
256
- })
257
- : undefined
258
-
259
238
  return [
260
239
  {
261
240
  channel: 'ticker',
@@ -263,11 +242,11 @@ class BinanceEuropeanOptionSummaryMapper implements Mapper<'binance-european-opt
263
242
  } as const,
264
243
  {
265
244
  channel: 'index',
266
- symbols: indexes
245
+ symbols: symbols.map((symbol) => `${symbol.split('-')[0]}USDT`)
267
246
  } as const,
268
247
  {
269
248
  channel: 'openInterest',
270
- symbols: underlyings
249
+ symbols: symbols.map((symbol) => `${symbol.split('-')[0]}`)
271
250
  } as const
272
251
  ]
273
252
  }
@@ -367,16 +346,9 @@ class BinanceEuropeanOptionSummaryMapperV2 implements Mapper<'binance-european-o
367
346
  )
368
347
  }
369
348
 
370
- getFilters(symbols?: string[]) {
349
+ getFilters(symbols: string[] = []) {
371
350
  symbols = lowerCaseSymbols(symbols)
372
-
373
- const underlyings =
374
- symbols !== undefined
375
- ? symbols.map((s) => {
376
- const symbolParts = s.split('-')
377
- return `${symbolParts[0]}usdt`
378
- })
379
- : undefined
351
+ const underlyings = symbols.map((symbol) => `${symbol.split('-')[0]}usdt`)
380
352
 
381
353
  return [
382
354
  {
@@ -49,7 +49,7 @@ class BitfinexTradesMapper implements Mapper<'bitfinex' | 'bitfinex-derivatives'
49
49
  return false
50
50
  }
51
51
 
52
- getFilters(symbols?: string[]) {
52
+ getFilters(symbols: string[] = []) {
53
53
  symbols = upperCaseSymbols(symbols)
54
54
 
55
55
  return [
@@ -125,7 +125,7 @@ class BitfinexBookChangeMapper implements Mapper<'bitfinex' | 'bitfinex-derivati
125
125
  return false
126
126
  }
127
127
 
128
- getFilters(symbols?: string[]) {
128
+ getFilters(symbols: string[] = []) {
129
129
  symbols = upperCaseSymbols(symbols)
130
130
 
131
131
  return [
@@ -207,7 +207,7 @@ class BitfinexDerivativeTickerMapper implements Mapper<'bitfinex-derivatives', D
207
207
  return false
208
208
  }
209
209
 
210
- getFilters(symbols?: string[]) {
210
+ getFilters(symbols: string[] = []) {
211
211
  symbols = upperCaseSymbols(symbols)
212
212
 
213
213
  return [
@@ -292,11 +292,7 @@ class BitfinexLiquidationsMapper implements Mapper<'bitfinex-derivatives', Liqui
292
292
 
293
293
  getFilters() {
294
294
  // liquidations channel is global, not per symbol
295
- return [
296
- {
297
- channel: 'liquidations'
298
- } as const
299
- ]
295
+ return [{ channel: 'liquidations' as const, symbols: [] }]
300
296
  }
301
297
 
302
298
  *map(message: BitfinexLiquidation, localTimestamp: Date) {
@@ -369,7 +365,7 @@ class BitfinexBookTickerMapper implements Mapper<'bitfinex' | 'bitfinex-derivati
369
365
  return false
370
366
  }
371
367
 
372
- getFilters(symbols?: string[]) {
368
+ getFilters(symbols: string[] = []) {
373
369
  symbols = upperCaseSymbols(symbols)
374
370
 
375
371
  return [
@@ -16,7 +16,7 @@ const bitflyerTradesMapper: Mapper<'bitflyer', Trade> = {
16
16
  return message.params?.channel.startsWith('lightning_executions') === true
17
17
  },
18
18
 
19
- getFilters(symbols?: string[]) {
19
+ getFilters(symbols: string[] = []) {
20
20
  symbols = upperCaseSymbols(symbols)
21
21
 
22
22
  return [
@@ -62,7 +62,7 @@ class BitflyerBookChangeMapper implements Mapper<'bitflyer', BookChange> {
62
62
  return message.params?.channel.startsWith('lightning_board') === true
63
63
  }
64
64
 
65
- getFilters(symbols?: string[]) {
65
+ getFilters(symbols: string[] = []) {
66
66
  symbols = upperCaseSymbols(symbols)
67
67
 
68
68
  return [
@@ -109,7 +109,7 @@ const bitflyerBookTickerMapper: Mapper<'bitflyer', BookTicker> = {
109
109
  return message.params?.channel.startsWith('lightning_ticker') === true
110
110
  },
111
111
 
112
- getFilters(symbols?: string[]) {
112
+ getFilters(symbols: string[] = []) {
113
113
  symbols = upperCaseSymbols(symbols)
114
114
 
115
115
  return [
@@ -48,7 +48,7 @@ class BitgetTradesMapper implements Mapper<'bitget' | 'bitget-futures', Trade> {
48
48
  return message.arg?.channel === 'trade' && message.action === 'update'
49
49
  }
50
50
 
51
- getFilters(symbols?: string[]) {
51
+ getFilters(symbols: string[] = []) {
52
52
  symbols = upperCaseSymbols(symbols)
53
53
 
54
54
  return [
@@ -89,7 +89,7 @@ class BitgetBookChangeMapper implements Mapper<'bitget' | 'bitget-futures', Book
89
89
  return message.arg?.channel === 'books15' && message.action === 'snapshot'
90
90
  }
91
91
 
92
- getFilters(symbols?: string[]) {
92
+ getFilters(symbols: string[] = []) {
93
93
  symbols = upperCaseSymbols(symbols)
94
94
 
95
95
  return [
@@ -123,7 +123,7 @@ class BitgetBookTickerMapper implements Mapper<'bitget' | 'bitget-futures', Book
123
123
  return message.arg?.channel === 'books1' && message.action === 'snapshot'
124
124
  }
125
125
 
126
- getFilters(symbols?: string[]) {
126
+ getFilters(symbols: string[] = []) {
127
127
  symbols = upperCaseSymbols(symbols)
128
128
 
129
129
  return [
@@ -162,7 +162,7 @@ class BitgetDerivativeTickerMapper implements Mapper<'bitget-futures', Derivativ
162
162
  return message.arg?.channel === 'ticker' && message.action === 'snapshot'
163
163
  }
164
164
 
165
- getFilters(symbols?: string[]) {
165
+ getFilters(symbols: string[] = []) {
166
166
  return [
167
167
  {
168
168
  channel: 'ticker',
@@ -201,7 +201,7 @@ class BitgetV3TradesMapper implements Mapper<'bitget' | 'bitget-futures', Trade>
201
201
  return message.arg?.topic === 'publicTrade' && message.action === 'update'
202
202
  }
203
203
 
204
- getFilters(symbols?: string[]) {
204
+ getFilters(symbols: string[] = []) {
205
205
  symbols = upperCaseSymbols(symbols)
206
206
 
207
207
  return [
@@ -236,7 +236,7 @@ class BitgetV3BookChangeMapper implements Mapper<'bitget' | 'bitget-futures', Bo
236
236
  return message.arg?.topic === 'books' && (message.action === 'snapshot' || message.action === 'update')
237
237
  }
238
238
 
239
- getFilters(symbols?: string[]) {
239
+ getFilters(symbols: string[] = []) {
240
240
  symbols = upperCaseSymbols(symbols)
241
241
 
242
242
  return [
@@ -270,7 +270,7 @@ class BitgetV3BookTickerMapper implements Mapper<'bitget' | 'bitget-futures', Bo
270
270
  return message.arg?.topic === 'books1' && message.action === 'snapshot'
271
271
  }
272
272
 
273
- getFilters(symbols?: string[]) {
273
+ getFilters(symbols: string[] = []) {
274
274
  symbols = upperCaseSymbols(symbols)
275
275
 
276
276
  return [
@@ -305,7 +305,7 @@ class BitgetV3DerivativeTickerMapper implements Mapper<'bitget-futures', Derivat
305
305
  return message.arg?.topic === 'ticker' && (message.action === 'snapshot' || message.action === 'update')
306
306
  }
307
307
 
308
- getFilters(symbols?: string[]) {
308
+ getFilters(symbols: string[] = []) {
309
309
  symbols = upperCaseSymbols(symbols)
310
310
 
311
311
  return [
@@ -344,12 +344,7 @@ class BitgetV3LiquidationsMapper implements Mapper<'bitget-futures', Liquidation
344
344
  }
345
345
 
346
346
  getFilters() {
347
- return [
348
- {
349
- channel: 'liquidation',
350
- symbols: undefined
351
- } as const
352
- ]
347
+ return [{ channel: 'liquidation' as const, symbols: [] }]
353
348
  }
354
349
 
355
350
  *map(message: BitgetV3LiquidationMessage, localTimestamp: Date): IterableIterator<Liquidation> {
@@ -15,7 +15,7 @@ class BithumbTradesMapper implements Mapper<'bithumb', Trade> {
15
15
  return message.type === 'trade' && message.stream_type === 'REALTIME'
16
16
  }
17
17
 
18
- getFilters(symbols?: string[]) {
18
+ getFilters(symbols: string[] = []) {
19
19
  return [{ channel: 'trade', symbols: upperCaseSymbols(symbols) } as const]
20
20
  }
21
21
 
@@ -39,7 +39,7 @@ class BithumbBookChangeMapper implements Mapper<'bithumb', BookChange> {
39
39
  return message.type === 'orderbook'
40
40
  }
41
41
 
42
- getFilters(symbols?: string[]) {
42
+ getFilters(symbols: string[] = []) {
43
43
  return [{ channel: 'orderbook', symbols: upperCaseSymbols(symbols) } as const]
44
44
  }
45
45
 
@@ -20,7 +20,7 @@ const bitmexTradesMapper: Mapper<'bitmex', Trade> = {
20
20
  return message.table === 'trade' && message.action === 'insert'
21
21
  },
22
22
 
23
- getFilters(symbols?: string[]) {
23
+ getFilters(symbols: string[] = []) {
24
24
  symbols = upperCaseSymbols(symbols)
25
25
 
26
26
  return [
@@ -57,7 +57,7 @@ class BitmexBookChangeMapper implements Mapper<'bitmex', BookChange> {
57
57
  return message.table === 'orderBookL2'
58
58
  }
59
59
 
60
- getFilters(symbols?: string[]) {
60
+ getFilters(symbols: string[] = []) {
61
61
  symbols = upperCaseSymbols(symbols)
62
62
 
63
63
  return [
@@ -176,7 +176,7 @@ class BitmexDerivativeTickerMapper implements Mapper<'bitmex', DerivativeTicker>
176
176
  return message.table === 'instrument'
177
177
  }
178
178
 
179
- getFilters(symbols?: string[]) {
179
+ getFilters(symbols: string[] = []) {
180
180
  symbols = upperCaseSymbols(symbols)
181
181
 
182
182
  return [
@@ -226,7 +226,7 @@ const bitmexLiquidationsMapper: Mapper<'bitmex', Liquidation> = {
226
226
  return message.table === 'liquidation' && message.action === 'insert'
227
227
  },
228
228
 
229
- getFilters(symbols?: string[]) {
229
+ getFilters(symbols: string[] = []) {
230
230
  symbols = upperCaseSymbols(symbols)
231
231
 
232
232
  return [
@@ -261,7 +261,7 @@ const bitmexBookTickerMapper: Mapper<'bitmex', BookTicker> = {
261
261
  return message.table === 'quote' && message.action === 'insert'
262
262
  },
263
263
 
264
- getFilters(symbols?: string[]) {
264
+ getFilters(symbols: string[] = []) {
265
265
  symbols = upperCaseSymbols(symbols)
266
266
 
267
267
  return [