tardis-dev 13.1.1 → 13.1.2

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 (127) hide show
  1. package/dist/handy.d.ts +2 -0
  2. package/dist/handy.d.ts.map +1 -1
  3. package/dist/handy.js +15 -1
  4. package/dist/handy.js.map +1 -1
  5. package/dist/mappers/ascendex.d.ts +1 -1
  6. package/dist/mappers/ascendex.d.ts.map +1 -1
  7. package/dist/mappers/ascendex.js +5 -0
  8. package/dist/mappers/ascendex.js.map +1 -1
  9. package/dist/mappers/binance.d.ts +1 -1
  10. package/dist/mappers/binance.d.ts.map +1 -1
  11. package/dist/mappers/binance.js +5 -11
  12. package/dist/mappers/binance.js.map +1 -1
  13. package/dist/mappers/binancedex.d.ts +1 -1
  14. package/dist/mappers/binancedex.d.ts.map +1 -1
  15. package/dist/mappers/binancedex.js +4 -0
  16. package/dist/mappers/binancedex.js.map +1 -1
  17. package/dist/mappers/binanceoptions.d.ts.map +1 -1
  18. package/dist/mappers/binanceoptions.js +3 -0
  19. package/dist/mappers/binanceoptions.js.map +1 -1
  20. package/dist/mappers/bitfinex.d.ts +1 -1
  21. package/dist/mappers/bitfinex.d.ts.map +1 -1
  22. package/dist/mappers/bitfinex.js +5 -0
  23. package/dist/mappers/bitfinex.js.map +1 -1
  24. package/dist/mappers/bitflyer.d.ts +1 -1
  25. package/dist/mappers/bitflyer.d.ts.map +1 -1
  26. package/dist/mappers/bitflyer.js +3 -0
  27. package/dist/mappers/bitflyer.js.map +1 -1
  28. package/dist/mappers/bitmex.d.ts +1 -1
  29. package/dist/mappers/bitmex.d.ts.map +1 -1
  30. package/dist/mappers/bitmex.js +5 -0
  31. package/dist/mappers/bitmex.js.map +1 -1
  32. package/dist/mappers/bitstamp.d.ts.map +1 -1
  33. package/dist/mappers/bitstamp.js +3 -8
  34. package/dist/mappers/bitstamp.js.map +1 -1
  35. package/dist/mappers/bybit.d.ts.map +1 -1
  36. package/dist/mappers/bybit.js +5 -0
  37. package/dist/mappers/bybit.js.map +1 -1
  38. package/dist/mappers/coinbase.d.ts.map +1 -1
  39. package/dist/mappers/coinbase.js +3 -0
  40. package/dist/mappers/coinbase.js.map +1 -1
  41. package/dist/mappers/coinflex.d.ts +1 -1
  42. package/dist/mappers/coinflex.d.ts.map +1 -1
  43. package/dist/mappers/coinflex.js +4 -0
  44. package/dist/mappers/coinflex.js.map +1 -1
  45. package/dist/mappers/cryptofacilities.d.ts +1 -1
  46. package/dist/mappers/cryptofacilities.d.ts.map +1 -1
  47. package/dist/mappers/cryptofacilities.js +6 -0
  48. package/dist/mappers/cryptofacilities.js.map +1 -1
  49. package/dist/mappers/delta.d.ts +1 -1
  50. package/dist/mappers/delta.d.ts.map +1 -1
  51. package/dist/mappers/delta.js +4 -0
  52. package/dist/mappers/delta.js.map +1 -1
  53. package/dist/mappers/deribit.d.ts +1 -1
  54. package/dist/mappers/deribit.d.ts.map +1 -1
  55. package/dist/mappers/deribit.js +6 -0
  56. package/dist/mappers/deribit.js.map +1 -1
  57. package/dist/mappers/dydx.d.ts +1 -1
  58. package/dist/mappers/dydx.d.ts.map +1 -1
  59. package/dist/mappers/dydx.js +4 -0
  60. package/dist/mappers/dydx.js.map +1 -1
  61. package/dist/mappers/ftx.d.ts +1 -1
  62. package/dist/mappers/ftx.d.ts.map +1 -1
  63. package/dist/mappers/ftx.js +5 -0
  64. package/dist/mappers/ftx.js.map +1 -1
  65. package/dist/mappers/gateio.d.ts.map +1 -1
  66. package/dist/mappers/gateio.js +3 -0
  67. package/dist/mappers/gateio.js.map +1 -1
  68. package/dist/mappers/gateiofutures.d.ts +1 -1
  69. package/dist/mappers/gateiofutures.d.ts.map +1 -1
  70. package/dist/mappers/gateiofutures.js +4 -0
  71. package/dist/mappers/gateiofutures.js.map +1 -1
  72. package/dist/mappers/gemini.d.ts.map +1 -1
  73. package/dist/mappers/gemini.js +3 -0
  74. package/dist/mappers/gemini.js.map +1 -1
  75. package/dist/mappers/hitbtc.d.ts.map +1 -1
  76. package/dist/mappers/hitbtc.js +3 -0
  77. package/dist/mappers/hitbtc.js.map +1 -1
  78. package/dist/mappers/huobi.d.ts +2 -2
  79. package/dist/mappers/huobi.d.ts.map +1 -1
  80. package/dist/mappers/huobi.js +3 -1
  81. package/dist/mappers/huobi.js.map +1 -1
  82. package/dist/mappers/kraken.d.ts.map +1 -1
  83. package/dist/mappers/kraken.js +3 -0
  84. package/dist/mappers/kraken.js.map +1 -1
  85. package/dist/mappers/okex.d.ts +1 -1
  86. package/dist/mappers/okex.d.ts.map +1 -1
  87. package/dist/mappers/okex.js +12 -0
  88. package/dist/mappers/okex.js.map +1 -1
  89. package/dist/mappers/poloniex.d.ts.map +1 -1
  90. package/dist/mappers/poloniex.js +3 -0
  91. package/dist/mappers/poloniex.js.map +1 -1
  92. package/dist/mappers/serum.d.ts +1 -1
  93. package/dist/mappers/serum.d.ts.map +1 -1
  94. package/dist/mappers/serum.js +9 -0
  95. package/dist/mappers/serum.js.map +1 -1
  96. package/dist/mappers/upbit.d.ts +1 -1
  97. package/dist/mappers/upbit.d.ts.map +1 -1
  98. package/dist/mappers/upbit.js +3 -0
  99. package/dist/mappers/upbit.js.map +1 -1
  100. package/package.json +1 -1
  101. package/src/handy.ts +14 -0
  102. package/src/mappers/ascendex.ts +6 -1
  103. package/src/mappers/binance.ts +2 -9
  104. package/src/mappers/binancedex.ts +6 -1
  105. package/src/mappers/binanceoptions.ts +7 -1
  106. package/src/mappers/bitfinex.ts +10 -1
  107. package/src/mappers/bitflyer.ts +8 -2
  108. package/src/mappers/bitmex.ts +12 -2
  109. package/src/mappers/bitstamp.ts +1 -7
  110. package/src/mappers/bybit.ts +9 -0
  111. package/src/mappers/coinbase.ts +7 -1
  112. package/src/mappers/coinflex.ts +8 -1
  113. package/src/mappers/cryptofacilities.ts +12 -1
  114. package/src/mappers/delta.ts +8 -1
  115. package/src/mappers/deribit.ts +14 -2
  116. package/src/mappers/dydx.ts +8 -1
  117. package/src/mappers/ftx.ts +12 -2
  118. package/src/mappers/gateio.ts +5 -0
  119. package/src/mappers/gateiofutures.ts +8 -1
  120. package/src/mappers/gemini.ts +5 -0
  121. package/src/mappers/hitbtc.ts +5 -0
  122. package/src/mappers/huobi.ts +6 -2
  123. package/src/mappers/kraken.ts +7 -1
  124. package/src/mappers/okex.ts +26 -2
  125. package/src/mappers/poloniex.ts +5 -0
  126. package/src/mappers/serum.ts +14 -2
  127. package/src/mappers/upbit.ts +6 -1
@@ -1,3 +1,4 @@
1
+ import { upperCaseSymbols } from '../handy'
1
2
  import { BookChange, Trade } from '../types'
2
3
  import { Mapper } from './mapper'
3
4
 
@@ -9,6 +10,8 @@ export const geminiTradesMapper: Mapper<'gemini', Trade> = {
9
10
  },
10
11
 
11
12
  getFilters(symbols?: string[]) {
13
+ symbols = upperCaseSymbols(symbols)
14
+
12
15
  return [
13
16
  {
14
17
  channel: 'trade',
@@ -45,6 +48,8 @@ export const geminiBookChangeMapper: Mapper<'gemini', BookChange> = {
45
48
  },
46
49
 
47
50
  getFilters(symbols?: string[]) {
51
+ symbols = upperCaseSymbols(symbols)
52
+
48
53
  return [
49
54
  {
50
55
  channel: 'l2_updates',
@@ -1,3 +1,4 @@
1
+ import { upperCaseSymbols } from '../handy'
1
2
  import { BookChange, Trade } from '../types'
2
3
  import { Mapper } from './mapper'
3
4
 
@@ -9,6 +10,8 @@ export const hitBtcTradesMapper: Mapper<'hitbtc', Trade> = {
9
10
  },
10
11
 
11
12
  getFilters(symbols?: string[]) {
13
+ symbols = upperCaseSymbols(symbols)
14
+
12
15
  return [
13
16
  {
14
17
  channel: 'updateTrades',
@@ -50,6 +53,8 @@ export const hitBtcBookChangeMapper: Mapper<'hitbtc', BookChange> = {
50
53
  },
51
54
 
52
55
  getFilters(symbols?: string[]) {
56
+ symbols = upperCaseSymbols(symbols)
57
+
53
58
  return [
54
59
  {
55
60
  channel: 'snapshotOrderbook',
@@ -1,6 +1,6 @@
1
- import { BookChange, DerivativeTicker, Exchange, FilterForExchange, Liquidation, OptionSummary, Trade, BookTicker } from '../types'
1
+ import { asNumberIfValid, CircularBuffer, upperCaseSymbols } from '../handy'
2
+ import { BookChange, BookTicker, DerivativeTicker, Exchange, FilterForExchange, Liquidation, OptionSummary, Trade } from '../types'
2
3
  import { Mapper, PendingTickerInfoHelper } from './mapper'
3
- import { asNumberIfValid, CircularBuffer } from '../handy'
4
4
 
5
5
  // https://huobiapi.github.io/docs/spot/v1/en/#websocket-market-data
6
6
  // https://github.com/huobiapi/API_Docs_en/wiki/WS_api_reference_en
@@ -255,6 +255,8 @@ export class HuobiDerivativeTickerMapper implements Mapper<'huobi-dm' | 'huobi-d
255
255
  }
256
256
 
257
257
  getFilters(symbols?: string[]) {
258
+ symbols = upperCaseSymbols(symbols)
259
+
258
260
  const filters: FilterForExchange['huobi-dm-swap'][] = [
259
261
  {
260
262
  channel: 'basis',
@@ -335,6 +337,8 @@ export class HuobiLiquidationsMapper implements Mapper<'huobi-dm' | 'huobi-dm-sw
335
337
  }
336
338
 
337
339
  getFilters(symbols?: string[]) {
340
+ symbols = upperCaseSymbols(symbols)
341
+
338
342
  if (this._exchange === 'huobi-dm') {
339
343
  // huobi-dm for liquidations requires prividing different symbols which are indexes names for example 'BTC' or 'ETH'
340
344
  // not futures names like 'BTC_NW'
@@ -1,4 +1,4 @@
1
- import { asNumberIfValid } from '../handy'
1
+ import { asNumberIfValid, upperCaseSymbols } from '../handy'
2
2
  import { BookChange, BookTicker, Trade } from '../types'
3
3
  import { Mapper } from './mapper'
4
4
 
@@ -15,6 +15,8 @@ export const krakenTradesMapper: Mapper<'kraken', Trade> = {
15
15
  },
16
16
 
17
17
  getFilters(symbols?: string[]) {
18
+ symbols = upperCaseSymbols(symbols)
19
+
18
20
  return [
19
21
  {
20
22
  channel: 'trade',
@@ -73,6 +75,8 @@ export const krakenBookChangeMapper: Mapper<'kraken', BookChange> = {
73
75
  },
74
76
 
75
77
  getFilters(symbols?: string[]) {
78
+ symbols = upperCaseSymbols(symbols)
79
+
76
80
  return [
77
81
  {
78
82
  channel: 'book',
@@ -129,6 +133,8 @@ export const krakenBookTickerMapper: Mapper<'kraken', BookTicker> = {
129
133
  },
130
134
 
131
135
  getFilters(symbols?: string[]) {
136
+ symbols = upperCaseSymbols(symbols)
137
+
132
138
  return [
133
139
  {
134
140
  channel: 'spread',
@@ -1,5 +1,5 @@
1
- import { asNumberIfValid } from '../handy'
2
- import { BookChange, DerivativeTicker, Exchange, Trade, OptionSummary, Liquidation, BookTicker } from '../types'
1
+ import { asNumberIfValid, upperCaseSymbols } from '../handy'
2
+ import { BookChange, BookTicker, DerivativeTicker, Exchange, Liquidation, OptionSummary, Trade } from '../types'
3
3
  import { Mapper, PendingTickerInfoHelper } from './mapper'
4
4
 
5
5
  // V5 Okex API mappers
@@ -16,6 +16,8 @@ export class OkexV5TradesMapper implements Mapper<OKEX_EXCHANGES, Trade> {
16
16
  }
17
17
 
18
18
  getFilters(symbols?: string[]) {
19
+ symbols = upperCaseSymbols(symbols)
20
+
19
21
  return [
20
22
  {
21
23
  channel: `trades` as const,
@@ -59,6 +61,8 @@ export class OkexV5BookChangeMapper implements Mapper<OKEX_EXCHANGES, BookChange
59
61
  }
60
62
 
61
63
  getFilters(symbols?: string[]) {
64
+ symbols = upperCaseSymbols(symbols)
65
+
62
66
  return [
63
67
  {
64
68
  channel: `books-l2-tbt` as const,
@@ -104,6 +108,8 @@ export class OkexV5BookTickerMapper implements Mapper<OKEX_EXCHANGES, BookTicker
104
108
  }
105
109
 
106
110
  getFilters(symbols?: string[]) {
111
+ symbols = upperCaseSymbols(symbols)
112
+
107
113
  return [
108
114
  {
109
115
  channel: `tickers` as const,
@@ -154,6 +160,8 @@ export class OkexV5DerivativeTickerMapper implements Mapper<'okex-futures' | 'ok
154
160
  }
155
161
 
156
162
  getFilters(symbols?: string[]) {
163
+ symbols = upperCaseSymbols(symbols)
164
+
157
165
  const channels = this._exchange === 'okex-futures' ? this._futuresChannels : this._swapChannels
158
166
  return channels.map((channel) => {
159
167
  if (channel === 'index-tickers') {
@@ -266,6 +274,8 @@ export class OkexV5LiquidationsMapper implements Mapper<OKEX_EXCHANGES, Liquidat
266
274
  }
267
275
 
268
276
  getFilters(symbols?: string[]) {
277
+ symbols = upperCaseSymbols(symbols)
278
+
269
279
  return [
270
280
  {
271
281
  channel: 'liquidations',
@@ -314,6 +324,8 @@ export class OkexV5OptionSummaryMapper implements Mapper<'okex-options', OptionS
314
324
  }
315
325
 
316
326
  getFilters(symbols?: string[]) {
327
+ symbols = upperCaseSymbols(symbols)
328
+
317
329
  const indexes =
318
330
  symbols !== undefined
319
331
  ? symbols.map((s) => {
@@ -577,6 +589,8 @@ export class OkexTradesMapper implements Mapper<OKEX_EXCHANGES, Trade> {
577
589
  }
578
590
 
579
591
  getFilters(symbols?: string[]) {
592
+ symbols = upperCaseSymbols(symbols)
593
+
580
594
  return [
581
595
  {
582
596
  channel: `${this._market}/trade` as const,
@@ -625,6 +639,8 @@ export class OkexBookChangeMapper implements Mapper<OKEX_EXCHANGES, BookChange>
625
639
  }
626
640
 
627
641
  getFilters(symbols?: string[]) {
642
+ symbols = upperCaseSymbols(symbols)
643
+
628
644
  if (this._canUseTickByTickChannel) {
629
645
  return [
630
646
  {
@@ -689,6 +705,8 @@ export class OkexDerivativeTickerMapper implements Mapper<'okex-futures' | 'okex
689
705
  }
690
706
 
691
707
  getFilters(symbols?: string[]) {
708
+ symbols = upperCaseSymbols(symbols)
709
+
692
710
  const channels = this._exchange === 'okex-futures' ? this._futuresChannels : this._swapChannels
693
711
  return channels.map((channel) => {
694
712
  return {
@@ -745,6 +763,8 @@ export class OkexOptionSummaryMapper implements Mapper<'okex-options', OptionSum
745
763
  }
746
764
 
747
765
  getFilters(symbols?: string[]) {
766
+ symbols = upperCaseSymbols(symbols)
767
+
748
768
  const indexes =
749
769
  symbols !== undefined
750
770
  ? symbols.map((s) => {
@@ -834,6 +854,8 @@ export class OkexLiquidationsMapper implements Mapper<OKEX_EXCHANGES, Liquidatio
834
854
  }
835
855
 
836
856
  getFilters(symbols?: string[]) {
857
+ symbols = upperCaseSymbols(symbols)
858
+
837
859
  return [
838
860
  {
839
861
  channel: `${this._market}/liquidation`,
@@ -868,6 +890,8 @@ export class OkexBookTickerMapper implements Mapper<OKEX_EXCHANGES, BookTicker>
868
890
  }
869
891
 
870
892
  getFilters(symbols?: string[]) {
893
+ symbols = upperCaseSymbols(symbols)
894
+
871
895
  return [
872
896
  {
873
897
  channel: `${this._market}/ticker`,
@@ -1,3 +1,4 @@
1
+ import { upperCaseSymbols } from '../handy'
1
2
  import { BookChange, Trade } from '../types'
2
3
  import { Mapper } from './mapper'
3
4
 
@@ -19,6 +20,8 @@ export class PoloniexTradesMapper implements Mapper<'poloniex', Trade> {
19
20
  }
20
21
 
21
22
  getFilters(symbols?: string[]) {
23
+ symbols = upperCaseSymbols(symbols)
24
+
22
25
  return [
23
26
  {
24
27
  channel: 'price_aggregated_book',
@@ -89,6 +92,8 @@ export class PoloniexBookChangeMapper implements Mapper<'poloniex', BookChange>
89
92
  }
90
93
 
91
94
  getFilters(symbols?: string[]) {
95
+ symbols = upperCaseSymbols(symbols)
96
+
92
97
  return [
93
98
  {
94
99
  channel: 'price_aggregated_book',
@@ -1,6 +1,6 @@
1
+ import { asNumberIfValid, upperCaseSymbols } from '../handy'
2
+ import { BookChange, BookTicker, Exchange, Trade } from '../types'
1
3
  import { Mapper } from './mapper'
2
- import { Trade, BookChange, BookTicker, Exchange } from '../types'
3
- import { asNumberIfValid } from '../handy'
4
4
 
5
5
  export class SerumTradesMapper implements Mapper<'serum' | 'star-atlas', Trade> {
6
6
  constructor(private readonly _exchange: Exchange) {}
@@ -10,6 +10,10 @@ export class SerumTradesMapper implements Mapper<'serum' | 'star-atlas', Trade>
10
10
  }
11
11
 
12
12
  getFilters(symbols?: string[]) {
13
+ if (this._exchange === 'serum') {
14
+ symbols = upperCaseSymbols(symbols)
15
+ }
16
+
13
17
  return [
14
18
  {
15
19
  channel: 'trade',
@@ -41,6 +45,10 @@ export class SerumBookChangeMapper implements Mapper<'serum' | 'star-atlas', Boo
41
45
  }
42
46
 
43
47
  getFilters(symbols?: string[]) {
48
+ if (this._exchange === 'serum') {
49
+ symbols = upperCaseSymbols(symbols)
50
+ }
51
+
44
52
  return [
45
53
  {
46
54
  channel: 'l2snapshot',
@@ -81,6 +89,10 @@ export class SerumBookTickerMapper implements Mapper<'serum' | 'star-atlas', Boo
81
89
  }
82
90
 
83
91
  getFilters(symbols?: string[]) {
92
+ if (this._exchange === 'serum') {
93
+ symbols = upperCaseSymbols(symbols)
94
+ }
95
+
84
96
  return [
85
97
  {
86
98
  channel: 'quote',
@@ -1,5 +1,6 @@
1
+ import { upperCaseSymbols } from '../handy'
2
+ import { BookChange, BookPriceLevel, Trade } from '../types'
1
3
  import { Mapper } from './mapper'
2
- import { Trade, BookChange, BookPriceLevel } from '../types'
3
4
 
4
5
  export class UpbitTradesMapper implements Mapper<'upbit', Trade> {
5
6
  canHandle(message: UpbitTrade) {
@@ -7,6 +8,8 @@ export class UpbitTradesMapper implements Mapper<'upbit', Trade> {
7
8
  }
8
9
 
9
10
  getFilters(symbols?: string[]) {
11
+ symbols = upperCaseSymbols(symbols)
12
+
10
13
  return [
11
14
  {
12
15
  channel: 'trade',
@@ -36,6 +39,8 @@ export class UpbitBookChangeMapper implements Mapper<'upbit', BookChange> {
36
39
  }
37
40
 
38
41
  getFilters(symbols?: string[]) {
42
+ symbols = upperCaseSymbols(symbols)
43
+
39
44
  return [
40
45
  {
41
46
  channel: 'orderbook',