tardis-machine 17.0.0 → 18.0.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 (792) hide show
  1. package/bin/tardis-machine.js +68 -57
  2. package/dist/tardismachine.d.ts.map +1 -1
  3. package/dist/tardismachine.js +13 -6
  4. package/dist/tardismachine.js.map +1 -1
  5. package/node_modules/debug/LICENSE +20 -0
  6. package/node_modules/debug/README.md +481 -0
  7. package/node_modules/debug/package.json +64 -0
  8. package/node_modules/debug/src/browser.js +272 -0
  9. package/node_modules/debug/src/common.js +292 -0
  10. package/node_modules/debug/src/index.js +10 -0
  11. package/node_modules/debug/src/node.js +263 -0
  12. package/node_modules/follow-redirects/LICENSE +18 -0
  13. package/node_modules/follow-redirects/README.md +157 -0
  14. package/node_modules/follow-redirects/debug.js +15 -0
  15. package/node_modules/follow-redirects/http.js +1 -0
  16. package/node_modules/follow-redirects/https.js +1 -0
  17. package/node_modules/follow-redirects/index.js +709 -0
  18. package/node_modules/follow-redirects/package.json +58 -0
  19. package/node_modules/long/LICENSE +202 -0
  20. package/node_modules/long/README.md +286 -0
  21. package/node_modules/long/index.d.ts +2 -0
  22. package/node_modules/long/index.js +1581 -0
  23. package/node_modules/long/package.json +58 -0
  24. package/node_modules/long/types.d.ts +474 -0
  25. package/node_modules/long/umd/index.d.ts +3 -0
  26. package/node_modules/long/umd/index.js +1622 -0
  27. package/node_modules/long/umd/package.json +3 -0
  28. package/node_modules/long/umd/types.d.ts +474 -0
  29. package/node_modules/ms/index.js +162 -0
  30. package/node_modules/ms/license.md +21 -0
  31. package/node_modules/ms/package.json +38 -0
  32. package/node_modules/ms/readme.md +59 -0
  33. package/node_modules/protobufjs/LICENSE +39 -0
  34. package/node_modules/protobufjs/README.md +440 -0
  35. package/node_modules/protobufjs/dist/light/protobuf.js +9276 -0
  36. package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -0
  37. package/node_modules/protobufjs/dist/light/protobuf.min.js +8 -0
  38. package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -0
  39. package/node_modules/protobufjs/dist/minimal/protobuf.js +3556 -0
  40. package/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -0
  41. package/node_modules/protobufjs/dist/minimal/protobuf.min.js +8 -0
  42. package/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -0
  43. package/node_modules/protobufjs/dist/protobuf.js +11233 -0
  44. package/node_modules/protobufjs/dist/protobuf.js.map +1 -0
  45. package/node_modules/protobufjs/dist/protobuf.min.js +8 -0
  46. package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -0
  47. package/node_modules/protobufjs/ext/README.md +70 -0
  48. package/node_modules/protobufjs/ext/debug/README.md +4 -0
  49. package/node_modules/protobufjs/ext/debug/index.js +71 -0
  50. package/node_modules/protobufjs/ext/descriptor/README.md +5 -0
  51. package/node_modules/protobufjs/ext/descriptor/index.d.ts +2 -0
  52. package/node_modules/protobufjs/ext/descriptor/index.js +2 -0
  53. package/node_modules/protobufjs/ext/descriptor.d.ts +87 -0
  54. package/node_modules/protobufjs/ext/descriptor.generated.d.ts +417 -0
  55. package/node_modules/protobufjs/ext/descriptor.js +1356 -0
  56. package/node_modules/protobufjs/ext/protojson.LICENSE +201 -0
  57. package/node_modules/protobufjs/ext/protojson.d.ts +20 -0
  58. package/node_modules/protobufjs/ext/protojson.generated.d.ts +49 -0
  59. package/node_modules/protobufjs/ext/protojson.js +951 -0
  60. package/node_modules/protobufjs/ext/textformat.d.ts +19 -0
  61. package/node_modules/protobufjs/ext/textformat.generated.d.ts +33 -0
  62. package/node_modules/protobufjs/ext/textformat.js +1276 -0
  63. package/node_modules/protobufjs/google/LICENSE +27 -0
  64. package/node_modules/protobufjs/google/README.md +1 -0
  65. package/node_modules/protobufjs/google/api/annotations.json +85 -0
  66. package/node_modules/protobufjs/google/api/annotations.proto +11 -0
  67. package/node_modules/protobufjs/google/api/http.json +87 -0
  68. package/node_modules/protobufjs/google/api/http.proto +31 -0
  69. package/node_modules/protobufjs/google/protobuf/api.json +124 -0
  70. package/node_modules/protobufjs/google/protobuf/api.proto +34 -0
  71. package/node_modules/protobufjs/google/protobuf/compiler/plugin.json +126 -0
  72. package/node_modules/protobufjs/google/protobuf/compiler/plugin.proto +47 -0
  73. package/node_modules/protobufjs/google/protobuf/descriptor.json +1465 -0
  74. package/node_modules/protobufjs/google/protobuf/descriptor.proto +527 -0
  75. package/node_modules/protobufjs/google/protobuf/source_context.json +21 -0
  76. package/node_modules/protobufjs/google/protobuf/source_context.proto +7 -0
  77. package/node_modules/protobufjs/google/protobuf/type.json +209 -0
  78. package/node_modules/protobufjs/google/protobuf/type.proto +89 -0
  79. package/node_modules/protobufjs/index.d.ts +3203 -0
  80. package/node_modules/protobufjs/index.js +4 -0
  81. package/node_modules/protobufjs/light.d.ts +2 -0
  82. package/node_modules/protobufjs/light.js +4 -0
  83. package/node_modules/protobufjs/minimal.d.ts +2 -0
  84. package/node_modules/protobufjs/minimal.js +4 -0
  85. package/node_modules/protobufjs/package.json +93 -0
  86. package/node_modules/protobufjs/src/common.js +405 -0
  87. package/node_modules/protobufjs/src/converter.js +352 -0
  88. package/node_modules/protobufjs/src/decoder.js +279 -0
  89. package/node_modules/protobufjs/src/encoder.js +123 -0
  90. package/node_modules/protobufjs/src/enum.js +239 -0
  91. package/node_modules/protobufjs/src/field.js +505 -0
  92. package/node_modules/protobufjs/src/index-light.js +104 -0
  93. package/node_modules/protobufjs/src/index-minimal.js +35 -0
  94. package/node_modules/protobufjs/src/index.js +12 -0
  95. package/node_modules/protobufjs/src/mapfield.js +144 -0
  96. package/node_modules/protobufjs/src/message.js +137 -0
  97. package/node_modules/protobufjs/src/method.js +183 -0
  98. package/node_modules/protobufjs/src/namespace.js +574 -0
  99. package/node_modules/protobufjs/src/object.js +392 -0
  100. package/node_modules/protobufjs/src/oneof.js +233 -0
  101. package/node_modules/protobufjs/src/parse.js +1111 -0
  102. package/node_modules/protobufjs/src/reader.js +788 -0
  103. package/node_modules/protobufjs/src/reader_buffer.js +77 -0
  104. package/node_modules/protobufjs/src/root.js +424 -0
  105. package/node_modules/protobufjs/src/roots.js +18 -0
  106. package/node_modules/protobufjs/src/rpc/service.js +155 -0
  107. package/node_modules/protobufjs/src/rpc.js +36 -0
  108. package/node_modules/protobufjs/src/service.js +206 -0
  109. package/node_modules/protobufjs/src/tokenize.js +421 -0
  110. package/node_modules/protobufjs/src/type.js +676 -0
  111. package/node_modules/protobufjs/src/types.js +196 -0
  112. package/node_modules/protobufjs/src/typescript.js +25 -0
  113. package/node_modules/protobufjs/src/util/aspromise.d.ts +13 -0
  114. package/node_modules/protobufjs/src/util/aspromise.js +52 -0
  115. package/node_modules/protobufjs/src/util/base64.d.ts +32 -0
  116. package/node_modules/protobufjs/src/util/base64.js +146 -0
  117. package/node_modules/protobufjs/src/util/codegen.d.ts +31 -0
  118. package/node_modules/protobufjs/src/util/codegen.js +118 -0
  119. package/node_modules/protobufjs/src/util/eventemitter.d.ts +45 -0
  120. package/node_modules/protobufjs/src/util/eventemitter.js +86 -0
  121. package/node_modules/protobufjs/src/util/fetch.d.ts +56 -0
  122. package/node_modules/protobufjs/src/util/fetch.js +112 -0
  123. package/node_modules/protobufjs/src/util/float.d.ts +83 -0
  124. package/node_modules/protobufjs/src/util/float.js +335 -0
  125. package/node_modules/protobufjs/src/util/fs.js +11 -0
  126. package/node_modules/protobufjs/src/util/longbits.js +204 -0
  127. package/node_modules/protobufjs/src/util/minimal.js +511 -0
  128. package/node_modules/protobufjs/src/util/path.d.ts +22 -0
  129. package/node_modules/protobufjs/src/util/path.js +100 -0
  130. package/node_modules/protobufjs/src/util/patterns.js +7 -0
  131. package/node_modules/protobufjs/src/util/pool.d.ts +32 -0
  132. package/node_modules/protobufjs/src/util/pool.js +48 -0
  133. package/node_modules/protobufjs/src/util/utf8.d.ts +24 -0
  134. package/node_modules/protobufjs/src/util/utf8.js +190 -0
  135. package/node_modules/protobufjs/src/util.js +264 -0
  136. package/node_modules/protobufjs/src/verifier.js +185 -0
  137. package/node_modules/protobufjs/src/wrappers.js +106 -0
  138. package/node_modules/protobufjs/src/writer.js +700 -0
  139. package/node_modules/protobufjs/src/writer_buffer.js +100 -0
  140. package/node_modules/protobufjs/tsconfig.json +6 -0
  141. package/node_modules/tardis-dev/LICENSE +373 -0
  142. package/node_modules/tardis-dev/README.md +275 -0
  143. package/node_modules/tardis-dev/dist/apikeyaccessinfo.d.ts +11 -0
  144. package/node_modules/tardis-dev/dist/apikeyaccessinfo.d.ts.map +1 -0
  145. package/node_modules/tardis-dev/dist/apikeyaccessinfo.js +13 -0
  146. package/node_modules/tardis-dev/dist/apikeyaccessinfo.js.map +1 -0
  147. package/node_modules/tardis-dev/dist/binarysplit.d.ts +8 -0
  148. package/node_modules/tardis-dev/dist/binarysplit.d.ts.map +1 -0
  149. package/node_modules/tardis-dev/dist/binarysplit.js +41 -0
  150. package/node_modules/tardis-dev/dist/binarysplit.js.map +1 -0
  151. package/node_modules/tardis-dev/dist/boundedqueue.d.ts +19 -0
  152. package/node_modules/tardis-dev/dist/boundedqueue.d.ts.map +1 -0
  153. package/node_modules/tardis-dev/dist/boundedqueue.js +96 -0
  154. package/node_modules/tardis-dev/dist/boundedqueue.js.map +1 -0
  155. package/node_modules/tardis-dev/dist/clearcache.d.ts +4 -0
  156. package/node_modules/tardis-dev/dist/clearcache.d.ts.map +1 -0
  157. package/node_modules/tardis-dev/dist/clearcache.js +48 -0
  158. package/node_modules/tardis-dev/dist/clearcache.js.map +1 -0
  159. package/node_modules/tardis-dev/dist/combine.d.ts +14 -0
  160. package/node_modules/tardis-dev/dist/combine.d.ts.map +1 -0
  161. package/node_modules/tardis-dev/dist/combine.js +97 -0
  162. package/node_modules/tardis-dev/dist/combine.js.map +1 -0
  163. package/node_modules/tardis-dev/dist/computable/booksnapshot.d.ts +14 -0
  164. package/node_modules/tardis-dev/dist/computable/booksnapshot.d.ts.map +1 -0
  165. package/node_modules/tardis-dev/dist/computable/booksnapshot.js +248 -0
  166. package/node_modules/tardis-dev/dist/computable/booksnapshot.js.map +1 -0
  167. package/node_modules/tardis-dev/dist/computable/computable.d.ts +8 -0
  168. package/node_modules/tardis-dev/dist/computable/computable.d.ts.map +1 -0
  169. package/node_modules/tardis-dev/dist/computable/computable.js +72 -0
  170. package/node_modules/tardis-dev/dist/computable/computable.js.map +1 -0
  171. package/node_modules/tardis-dev/dist/computable/context.d.ts +4 -0
  172. package/node_modules/tardis-dev/dist/computable/context.d.ts.map +1 -0
  173. package/node_modules/tardis-dev/dist/computable/context.js +9 -0
  174. package/node_modules/tardis-dev/dist/computable/context.js.map +1 -0
  175. package/node_modules/tardis-dev/dist/computable/index.d.ts +4 -0
  176. package/node_modules/tardis-dev/dist/computable/index.d.ts.map +1 -0
  177. package/node_modules/tardis-dev/dist/computable/index.js +4 -0
  178. package/node_modules/tardis-dev/dist/computable/index.js.map +1 -0
  179. package/node_modules/tardis-dev/dist/computable/tradebar.d.ts +11 -0
  180. package/node_modules/tardis-dev/dist/computable/tradebar.d.ts.map +1 -0
  181. package/node_modules/tardis-dev/dist/computable/tradebar.js +132 -0
  182. package/node_modules/tardis-dev/dist/computable/tradebar.js.map +1 -0
  183. package/node_modules/tardis-dev/dist/consts.d.ts +66 -0
  184. package/node_modules/tardis-dev/dist/consts.d.ts.map +1 -0
  185. package/node_modules/tardis-dev/dist/consts.js +573 -0
  186. package/node_modules/tardis-dev/dist/consts.js.map +1 -0
  187. package/node_modules/tardis-dev/dist/debug.d.ts +3 -0
  188. package/node_modules/tardis-dev/dist/debug.d.ts.map +1 -0
  189. package/node_modules/tardis-dev/dist/debug.js +3 -0
  190. package/node_modules/tardis-dev/dist/debug.js.map +1 -0
  191. package/node_modules/tardis-dev/dist/downloaddatasets.d.ts +25 -0
  192. package/node_modules/tardis-dev/dist/downloaddatasets.d.ts.map +1 -0
  193. package/node_modules/tardis-dev/dist/downloaddatasets.js +118 -0
  194. package/node_modules/tardis-dev/dist/downloaddatasets.js.map +1 -0
  195. package/node_modules/tardis-dev/dist/exchangedetails.d.ts +91 -0
  196. package/node_modules/tardis-dev/dist/exchangedetails.d.ts.map +1 -0
  197. package/node_modules/tardis-dev/dist/exchangedetails.js +8 -0
  198. package/node_modules/tardis-dev/dist/exchangedetails.js.map +1 -0
  199. package/node_modules/tardis-dev/dist/filter.d.ts +8 -0
  200. package/node_modules/tardis-dev/dist/filter.d.ts.map +1 -0
  201. package/node_modules/tardis-dev/dist/filter.js +51 -0
  202. package/node_modules/tardis-dev/dist/filter.js.map +1 -0
  203. package/node_modules/tardis-dev/dist/foreachconcurrent.d.ts +2 -0
  204. package/node_modules/tardis-dev/dist/foreachconcurrent.d.ts.map +1 -0
  205. package/node_modules/tardis-dev/dist/foreachconcurrent.js +28 -0
  206. package/node_modules/tardis-dev/dist/foreachconcurrent.js.map +1 -0
  207. package/node_modules/tardis-dev/dist/handy.d.ts +102 -0
  208. package/node_modules/tardis-dev/dist/handy.d.ts.map +1 -0
  209. package/node_modules/tardis-dev/dist/handy.js +706 -0
  210. package/node_modules/tardis-dev/dist/handy.js.map +1 -0
  211. package/node_modules/tardis-dev/dist/index.d.ts +17 -0
  212. package/node_modules/tardis-dev/dist/index.d.ts.map +1 -0
  213. package/node_modules/tardis-dev/dist/index.js +17 -0
  214. package/node_modules/tardis-dev/dist/index.js.map +1 -0
  215. package/node_modules/tardis-dev/dist/instrumentinfo.d.ts +105 -0
  216. package/node_modules/tardis-dev/dist/instrumentinfo.d.ts.map +1 -0
  217. package/node_modules/tardis-dev/dist/instrumentinfo.js +59 -0
  218. package/node_modules/tardis-dev/dist/instrumentinfo.js.map +1 -0
  219. package/node_modules/tardis-dev/dist/mappers/ascendex.d.ts +10 -0
  220. package/node_modules/tardis-dev/dist/mappers/ascendex.d.ts.map +1 -0
  221. package/node_modules/tardis-dev/dist/mappers/ascendex.js +146 -0
  222. package/node_modules/tardis-dev/dist/mappers/ascendex.js.map +1 -0
  223. package/node_modules/tardis-dev/dist/mappers/binance.d.ts +32 -0
  224. package/node_modules/tardis-dev/dist/mappers/binance.d.ts.map +1 -0
  225. package/node_modules/tardis-dev/dist/mappers/binance.js +420 -0
  226. package/node_modules/tardis-dev/dist/mappers/binance.js.map +1 -0
  227. package/node_modules/tardis-dev/dist/mappers/binancedex.d.ts +9 -0
  228. package/node_modules/tardis-dev/dist/mappers/binancedex.d.ts.map +1 -0
  229. package/node_modules/tardis-dev/dist/mappers/binancedex.js +120 -0
  230. package/node_modules/tardis-dev/dist/mappers/binancedex.js.map +1 -0
  231. package/node_modules/tardis-dev/dist/mappers/binanceeuropeanoptions.d.ts +10 -0
  232. package/node_modules/tardis-dev/dist/mappers/binanceeuropeanoptions.d.ts.map +1 -0
  233. package/node_modules/tardis-dev/dist/mappers/binanceeuropeanoptions.js +389 -0
  234. package/node_modules/tardis-dev/dist/mappers/binanceeuropeanoptions.js.map +1 -0
  235. package/node_modules/tardis-dev/dist/mappers/bitfinex.d.ts +16 -0
  236. package/node_modules/tardis-dev/dist/mappers/bitfinex.d.ts.map +1 -0
  237. package/node_modules/tardis-dev/dist/mappers/bitfinex.js +352 -0
  238. package/node_modules/tardis-dev/dist/mappers/bitfinex.js.map +1 -0
  239. package/node_modules/tardis-dev/dist/mappers/bitflyer.d.ts +9 -0
  240. package/node_modules/tardis-dev/dist/mappers/bitflyer.d.ts.map +1 -0
  241. package/node_modules/tardis-dev/dist/mappers/bitflyer.js +121 -0
  242. package/node_modules/tardis-dev/dist/mappers/bitflyer.js.map +1 -0
  243. package/node_modules/tardis-dev/dist/mappers/bitget.d.ts +16 -0
  244. package/node_modules/tardis-dev/dist/mappers/bitget.d.ts.map +1 -0
  245. package/node_modules/tardis-dev/dist/mappers/bitget.js +335 -0
  246. package/node_modules/tardis-dev/dist/mappers/bitget.js.map +1 -0
  247. package/node_modules/tardis-dev/dist/mappers/bitmex.d.ts +11 -0
  248. package/node_modules/tardis-dev/dist/mappers/bitmex.d.ts.map +1 -0
  249. package/node_modules/tardis-dev/dist/mappers/bitmex.js +248 -0
  250. package/node_modules/tardis-dev/dist/mappers/bitmex.js.map +1 -0
  251. package/node_modules/tardis-dev/dist/mappers/bitnomial.d.ts +8 -0
  252. package/node_modules/tardis-dev/dist/mappers/bitnomial.d.ts.map +1 -0
  253. package/node_modules/tardis-dev/dist/mappers/bitnomial.js +91 -0
  254. package/node_modules/tardis-dev/dist/mappers/bitnomial.js.map +1 -0
  255. package/node_modules/tardis-dev/dist/mappers/bitstamp.d.ts +8 -0
  256. package/node_modules/tardis-dev/dist/mappers/bitstamp.d.ts.map +1 -0
  257. package/node_modules/tardis-dev/dist/mappers/bitstamp.js +151 -0
  258. package/node_modules/tardis-dev/dist/mappers/bitstamp.js.map +1 -0
  259. package/node_modules/tardis-dev/dist/mappers/blockchaincom.d.ts +8 -0
  260. package/node_modules/tardis-dev/dist/mappers/blockchaincom.d.ts.map +1 -0
  261. package/node_modules/tardis-dev/dist/mappers/blockchaincom.js +65 -0
  262. package/node_modules/tardis-dev/dist/mappers/blockchaincom.js.map +1 -0
  263. package/node_modules/tardis-dev/dist/mappers/bullish.d.ts +11 -0
  264. package/node_modules/tardis-dev/dist/mappers/bullish.d.ts.map +1 -0
  265. package/node_modules/tardis-dev/dist/mappers/bullish.js +234 -0
  266. package/node_modules/tardis-dev/dist/mappers/bullish.js.map +1 -0
  267. package/node_modules/tardis-dev/dist/mappers/bybit.d.ts +66 -0
  268. package/node_modules/tardis-dev/dist/mappers/bybit.d.ts.map +1 -0
  269. package/node_modules/tardis-dev/dist/mappers/bybit.js +601 -0
  270. package/node_modules/tardis-dev/dist/mappers/bybit.js.map +1 -0
  271. package/node_modules/tardis-dev/dist/mappers/bybitspot.d.ts +96 -0
  272. package/node_modules/tardis-dev/dist/mappers/bybitspot.d.ts.map +1 -0
  273. package/node_modules/tardis-dev/dist/mappers/bybitspot.js +99 -0
  274. package/node_modules/tardis-dev/dist/mappers/bybitspot.js.map +1 -0
  275. package/node_modules/tardis-dev/dist/mappers/coinbase.d.ts +9 -0
  276. package/node_modules/tardis-dev/dist/mappers/coinbase.d.ts.map +1 -0
  277. package/node_modules/tardis-dev/dist/mappers/coinbase.js +176 -0
  278. package/node_modules/tardis-dev/dist/mappers/coinbase.js.map +1 -0
  279. package/node_modules/tardis-dev/dist/mappers/coinbaseinternational.d.ts +10 -0
  280. package/node_modules/tardis-dev/dist/mappers/coinbaseinternational.d.ts.map +1 -0
  281. package/node_modules/tardis-dev/dist/mappers/coinbaseinternational.js +210 -0
  282. package/node_modules/tardis-dev/dist/mappers/coinbaseinternational.js.map +1 -0
  283. package/node_modules/tardis-dev/dist/mappers/coinflex.d.ts +9 -0
  284. package/node_modules/tardis-dev/dist/mappers/coinflex.d.ts.map +1 -0
  285. package/node_modules/tardis-dev/dist/mappers/coinflex.js +111 -0
  286. package/node_modules/tardis-dev/dist/mappers/coinflex.js.map +1 -0
  287. package/node_modules/tardis-dev/dist/mappers/cryptocom.d.ts +25 -0
  288. package/node_modules/tardis-dev/dist/mappers/cryptocom.d.ts.map +1 -0
  289. package/node_modules/tardis-dev/dist/mappers/cryptocom.js +219 -0
  290. package/node_modules/tardis-dev/dist/mappers/cryptocom.js.map +1 -0
  291. package/node_modules/tardis-dev/dist/mappers/cryptofacilities.d.ts +11 -0
  292. package/node_modules/tardis-dev/dist/mappers/cryptofacilities.d.ts.map +1 -0
  293. package/node_modules/tardis-dev/dist/mappers/cryptofacilities.js +199 -0
  294. package/node_modules/tardis-dev/dist/mappers/cryptofacilities.js.map +1 -0
  295. package/node_modules/tardis-dev/dist/mappers/delta.d.ts +10 -0
  296. package/node_modules/tardis-dev/dist/mappers/delta.d.ts.map +1 -0
  297. package/node_modules/tardis-dev/dist/mappers/delta.js +205 -0
  298. package/node_modules/tardis-dev/dist/mappers/delta.js.map +1 -0
  299. package/node_modules/tardis-dev/dist/mappers/deribit.d.ts +12 -0
  300. package/node_modules/tardis-dev/dist/mappers/deribit.d.ts.map +1 -0
  301. package/node_modules/tardis-dev/dist/mappers/deribit.js +278 -0
  302. package/node_modules/tardis-dev/dist/mappers/deribit.js.map +1 -0
  303. package/node_modules/tardis-dev/dist/mappers/dydx.d.ts +9 -0
  304. package/node_modules/tardis-dev/dist/mappers/dydx.d.ts.map +1 -0
  305. package/node_modules/tardis-dev/dist/mappers/dydx.js +188 -0
  306. package/node_modules/tardis-dev/dist/mappers/dydx.js.map +1 -0
  307. package/node_modules/tardis-dev/dist/mappers/dydxv4.d.ts +10 -0
  308. package/node_modules/tardis-dev/dist/mappers/dydxv4.d.ts.map +1 -0
  309. package/node_modules/tardis-dev/dist/mappers/dydxv4.js +189 -0
  310. package/node_modules/tardis-dev/dist/mappers/dydxv4.js.map +1 -0
  311. package/node_modules/tardis-dev/dist/mappers/ftx.d.ts +16 -0
  312. package/node_modules/tardis-dev/dist/mappers/ftx.d.ts.map +1 -0
  313. package/node_modules/tardis-dev/dist/mappers/ftx.js +222 -0
  314. package/node_modules/tardis-dev/dist/mappers/ftx.js.map +1 -0
  315. package/node_modules/tardis-dev/dist/mappers/gateio.d.ts +9 -0
  316. package/node_modules/tardis-dev/dist/mappers/gateio.d.ts.map +1 -0
  317. package/node_modules/tardis-dev/dist/mappers/gateio.js +370 -0
  318. package/node_modules/tardis-dev/dist/mappers/gateio.js.map +1 -0
  319. package/node_modules/tardis-dev/dist/mappers/gateiofutures.d.ts +10 -0
  320. package/node_modules/tardis-dev/dist/mappers/gateiofutures.d.ts.map +1 -0
  321. package/node_modules/tardis-dev/dist/mappers/gateiofutures.js +183 -0
  322. package/node_modules/tardis-dev/dist/mappers/gateiofutures.js.map +1 -0
  323. package/node_modules/tardis-dev/dist/mappers/gemini.d.ts +9 -0
  324. package/node_modules/tardis-dev/dist/mappers/gemini.d.ts.map +1 -0
  325. package/node_modules/tardis-dev/dist/mappers/gemini.js +145 -0
  326. package/node_modules/tardis-dev/dist/mappers/gemini.js.map +1 -0
  327. package/node_modules/tardis-dev/dist/mappers/hitbtc.d.ts +8 -0
  328. package/node_modules/tardis-dev/dist/mappers/hitbtc.d.ts.map +1 -0
  329. package/node_modules/tardis-dev/dist/mappers/hitbtc.js +76 -0
  330. package/node_modules/tardis-dev/dist/mappers/hitbtc.js.map +1 -0
  331. package/node_modules/tardis-dev/dist/mappers/huobi.d.ts +125 -0
  332. package/node_modules/tardis-dev/dist/mappers/huobi.d.ts.map +1 -0
  333. package/node_modules/tardis-dev/dist/mappers/huobi.js +529 -0
  334. package/node_modules/tardis-dev/dist/mappers/huobi.js.map +1 -0
  335. package/node_modules/tardis-dev/dist/mappers/hyperliquid.d.ts +10 -0
  336. package/node_modules/tardis-dev/dist/mappers/hyperliquid.d.ts.map +1 -0
  337. package/node_modules/tardis-dev/dist/mappers/hyperliquid.js +161 -0
  338. package/node_modules/tardis-dev/dist/mappers/hyperliquid.js.map +1 -0
  339. package/node_modules/tardis-dev/dist/mappers/index.d.ts +788 -0
  340. package/node_modules/tardis-dev/dist/mappers/index.d.ts.map +1 -0
  341. package/node_modules/tardis-dev/dist/mappers/index.js +66 -0
  342. package/node_modules/tardis-dev/dist/mappers/index.js.map +1 -0
  343. package/node_modules/tardis-dev/dist/mappers/kraken.d.ts +9 -0
  344. package/node_modules/tardis-dev/dist/mappers/kraken.d.ts.map +1 -0
  345. package/node_modules/tardis-dev/dist/mappers/kraken.js +238 -0
  346. package/node_modules/tardis-dev/dist/mappers/kraken.js.map +1 -0
  347. package/node_modules/tardis-dev/dist/mappers/kucoin.d.ts +9 -0
  348. package/node_modules/tardis-dev/dist/mappers/kucoin.d.ts.map +1 -0
  349. package/node_modules/tardis-dev/dist/mappers/kucoin.js +237 -0
  350. package/node_modules/tardis-dev/dist/mappers/kucoin.js.map +1 -0
  351. package/node_modules/tardis-dev/dist/mappers/kucoinfutures.d.ts +10 -0
  352. package/node_modules/tardis-dev/dist/mappers/kucoinfutures.d.ts.map +1 -0
  353. package/node_modules/tardis-dev/dist/mappers/kucoinfutures.js +302 -0
  354. package/node_modules/tardis-dev/dist/mappers/kucoinfutures.js.map +1 -0
  355. package/node_modules/tardis-dev/dist/mappers/lighter.d.ts +11 -0
  356. package/node_modules/tardis-dev/dist/mappers/lighter.d.ts.map +1 -0
  357. package/node_modules/tardis-dev/dist/mappers/lighter.js +186 -0
  358. package/node_modules/tardis-dev/dist/mappers/lighter.js.map +1 -0
  359. package/node_modules/tardis-dev/dist/mappers/mapper.d.ts +32 -0
  360. package/node_modules/tardis-dev/dist/mappers/mapper.d.ts.map +1 -0
  361. package/node_modules/tardis-dev/dist/mappers/mapper.js +120 -0
  362. package/node_modules/tardis-dev/dist/mappers/mapper.js.map +1 -0
  363. package/node_modules/tardis-dev/dist/mappers/mexc.d.ts +122 -0
  364. package/node_modules/tardis-dev/dist/mappers/mexc.d.ts.map +1 -0
  365. package/node_modules/tardis-dev/dist/mappers/mexc.js +205 -0
  366. package/node_modules/tardis-dev/dist/mappers/mexc.js.map +1 -0
  367. package/node_modules/tardis-dev/dist/mappers/mexcfutures.d.ts +137 -0
  368. package/node_modules/tardis-dev/dist/mappers/mexcfutures.d.ts.map +1 -0
  369. package/node_modules/tardis-dev/dist/mappers/mexcfutures.js +225 -0
  370. package/node_modules/tardis-dev/dist/mappers/mexcfutures.js.map +1 -0
  371. package/node_modules/tardis-dev/dist/mappers/okex.d.ts +39 -0
  372. package/node_modules/tardis-dev/dist/mappers/okex.d.ts.map +1 -0
  373. package/node_modules/tardis-dev/dist/mappers/okex.js +913 -0
  374. package/node_modules/tardis-dev/dist/mappers/okex.js.map +1 -0
  375. package/node_modules/tardis-dev/dist/mappers/okexspreads.d.ts +69 -0
  376. package/node_modules/tardis-dev/dist/mappers/okexspreads.d.ts.map +1 -0
  377. package/node_modules/tardis-dev/dist/mappers/okexspreads.js +116 -0
  378. package/node_modules/tardis-dev/dist/mappers/okexspreads.js.map +1 -0
  379. package/node_modules/tardis-dev/dist/mappers/phemex.d.ts +9 -0
  380. package/node_modules/tardis-dev/dist/mappers/phemex.d.ts.map +1 -0
  381. package/node_modules/tardis-dev/dist/mappers/phemex.js +406 -0
  382. package/node_modules/tardis-dev/dist/mappers/phemex.js.map +1 -0
  383. package/node_modules/tardis-dev/dist/mappers/poloniex.d.ts +8 -0
  384. package/node_modules/tardis-dev/dist/mappers/poloniex.d.ts.map +1 -0
  385. package/node_modules/tardis-dev/dist/mappers/poloniex.js +207 -0
  386. package/node_modules/tardis-dev/dist/mappers/poloniex.js.map +1 -0
  387. package/node_modules/tardis-dev/dist/mappers/polymarket.d.ts +59 -0
  388. package/node_modules/tardis-dev/dist/mappers/polymarket.d.ts.map +1 -0
  389. package/node_modules/tardis-dev/dist/mappers/polymarket.js +121 -0
  390. package/node_modules/tardis-dev/dist/mappers/polymarket.js.map +1 -0
  391. package/node_modules/tardis-dev/dist/mappers/registry.d.ts +41 -0
  392. package/node_modules/tardis-dev/dist/mappers/registry.d.ts.map +1 -0
  393. package/node_modules/tardis-dev/dist/mappers/registry.js +111 -0
  394. package/node_modules/tardis-dev/dist/mappers/registry.js.map +1 -0
  395. package/node_modules/tardis-dev/dist/mappers/serum.d.ts +19 -0
  396. package/node_modules/tardis-dev/dist/mappers/serum.d.ts.map +1 -0
  397. package/node_modules/tardis-dev/dist/mappers/serum.js +127 -0
  398. package/node_modules/tardis-dev/dist/mappers/serum.js.map +1 -0
  399. package/node_modules/tardis-dev/dist/mappers/upbit.d.ts +8 -0
  400. package/node_modules/tardis-dev/dist/mappers/upbit.d.ts.map +1 -0
  401. package/node_modules/tardis-dev/dist/mappers/upbit.js +78 -0
  402. package/node_modules/tardis-dev/dist/mappers/upbit.js.map +1 -0
  403. package/node_modules/tardis-dev/dist/mappers/woox.d.ts +10 -0
  404. package/node_modules/tardis-dev/dist/mappers/woox.d.ts.map +1 -0
  405. package/node_modules/tardis-dev/dist/mappers/woox.js +488 -0
  406. package/node_modules/tardis-dev/dist/mappers/woox.js.map +1 -0
  407. package/node_modules/tardis-dev/dist/okexsymbols.d.ts +3 -0
  408. package/node_modules/tardis-dev/dist/okexsymbols.d.ts.map +1 -0
  409. package/node_modules/tardis-dev/dist/okexsymbols.js +10 -0
  410. package/node_modules/tardis-dev/dist/okexsymbols.js.map +1 -0
  411. package/node_modules/tardis-dev/dist/options.d.ts +13 -0
  412. package/node_modules/tardis-dev/dist/options.d.ts.map +1 -0
  413. package/node_modules/tardis-dev/dist/options.js +21 -0
  414. package/node_modules/tardis-dev/dist/options.js.map +1 -0
  415. package/node_modules/tardis-dev/dist/orderbook.d.ts +23 -0
  416. package/node_modules/tardis-dev/dist/orderbook.d.ts.map +1 -0
  417. package/node_modules/tardis-dev/dist/orderbook.js +133 -0
  418. package/node_modules/tardis-dev/dist/orderbook.js.map +1 -0
  419. package/node_modules/tardis-dev/dist/priceleveltree.d.ts +27 -0
  420. package/node_modules/tardis-dev/dist/priceleveltree.d.ts.map +1 -0
  421. package/node_modules/tardis-dev/dist/priceleveltree.js +165 -0
  422. package/node_modules/tardis-dev/dist/priceleveltree.js.map +1 -0
  423. package/node_modules/tardis-dev/dist/realtimefeeds/binance.d.ts +99 -0
  424. package/node_modules/tardis-dev/dist/realtimefeeds/binance.d.ts.map +1 -0
  425. package/node_modules/tardis-dev/dist/realtimefeeds/binance.js +370 -0
  426. package/node_modules/tardis-dev/dist/realtimefeeds/binance.js.map +1 -0
  427. package/node_modules/tardis-dev/dist/realtimefeeds/binancedex.d.ts +14 -0
  428. package/node_modules/tardis-dev/dist/realtimefeeds/binancedex.d.ts.map +1 -0
  429. package/node_modules/tardis-dev/dist/realtimefeeds/binancedex.js +53 -0
  430. package/node_modules/tardis-dev/dist/realtimefeeds/binancedex.js.map +1 -0
  431. package/node_modules/tardis-dev/dist/realtimefeeds/binanceeuropeanoptions.d.ts +14 -0
  432. package/node_modules/tardis-dev/dist/realtimefeeds/binanceeuropeanoptions.d.ts.map +1 -0
  433. package/node_modules/tardis-dev/dist/realtimefeeds/binanceeuropeanoptions.js +95 -0
  434. package/node_modules/tardis-dev/dist/realtimefeeds/binanceeuropeanoptions.js.map +1 -0
  435. package/node_modules/tardis-dev/dist/realtimefeeds/bitfinex.d.ts +36 -0
  436. package/node_modules/tardis-dev/dist/realtimefeeds/bitfinex.d.ts.map +1 -0
  437. package/node_modules/tardis-dev/dist/realtimefeeds/bitfinex.js +73 -0
  438. package/node_modules/tardis-dev/dist/realtimefeeds/bitfinex.js.map +1 -0
  439. package/node_modules/tardis-dev/dist/realtimefeeds/bitflyer.d.ts +9 -0
  440. package/node_modules/tardis-dev/dist/realtimefeeds/bitflyer.d.ts.map +1 -0
  441. package/node_modules/tardis-dev/dist/realtimefeeds/bitflyer.js +36 -0
  442. package/node_modules/tardis-dev/dist/realtimefeeds/bitflyer.js.map +1 -0
  443. package/node_modules/tardis-dev/dist/realtimefeeds/bitget.d.ts +19 -0
  444. package/node_modules/tardis-dev/dist/realtimefeeds/bitget.d.ts.map +1 -0
  445. package/node_modules/tardis-dev/dist/realtimefeeds/bitget.js +61 -0
  446. package/node_modules/tardis-dev/dist/realtimefeeds/bitget.js.map +1 -0
  447. package/node_modules/tardis-dev/dist/realtimefeeds/bitmex.d.ts +11 -0
  448. package/node_modules/tardis-dev/dist/realtimefeeds/bitmex.d.ts.map +1 -0
  449. package/node_modules/tardis-dev/dist/realtimefeeds/bitmex.js +37 -0
  450. package/node_modules/tardis-dev/dist/realtimefeeds/bitmex.js.map +1 -0
  451. package/node_modules/tardis-dev/dist/realtimefeeds/bitnomial.d.ts +11 -0
  452. package/node_modules/tardis-dev/dist/realtimefeeds/bitnomial.d.ts.map +1 -0
  453. package/node_modules/tardis-dev/dist/realtimefeeds/bitnomial.js +52 -0
  454. package/node_modules/tardis-dev/dist/realtimefeeds/bitnomial.js.map +1 -0
  455. package/node_modules/tardis-dev/dist/realtimefeeds/bitstamp.d.ts +10 -0
  456. package/node_modules/tardis-dev/dist/realtimefeeds/bitstamp.d.ts.map +1 -0
  457. package/node_modules/tardis-dev/dist/realtimefeeds/bitstamp.js +57 -0
  458. package/node_modules/tardis-dev/dist/realtimefeeds/bitstamp.js.map +1 -0
  459. package/node_modules/tardis-dev/dist/realtimefeeds/blockchaincom.d.ts +11 -0
  460. package/node_modules/tardis-dev/dist/realtimefeeds/blockchaincom.d.ts.map +1 -0
  461. package/node_modules/tardis-dev/dist/realtimefeeds/blockchaincom.js +37 -0
  462. package/node_modules/tardis-dev/dist/realtimefeeds/blockchaincom.js.map +1 -0
  463. package/node_modules/tardis-dev/dist/realtimefeeds/bullish.d.ts +18 -0
  464. package/node_modules/tardis-dev/dist/realtimefeeds/bullish.d.ts.map +1 -0
  465. package/node_modules/tardis-dev/dist/realtimefeeds/bullish.js +113 -0
  466. package/node_modules/tardis-dev/dist/realtimefeeds/bullish.js.map +1 -0
  467. package/node_modules/tardis-dev/dist/realtimefeeds/bybit.d.ts +28 -0
  468. package/node_modules/tardis-dev/dist/realtimefeeds/bybit.d.ts.map +1 -0
  469. package/node_modules/tardis-dev/dist/realtimefeeds/bybit.js +95 -0
  470. package/node_modules/tardis-dev/dist/realtimefeeds/bybit.js.map +1 -0
  471. package/node_modules/tardis-dev/dist/realtimefeeds/coinbase.d.ts +16 -0
  472. package/node_modules/tardis-dev/dist/realtimefeeds/coinbase.d.ts.map +1 -0
  473. package/node_modules/tardis-dev/dist/realtimefeeds/coinbase.js +98 -0
  474. package/node_modules/tardis-dev/dist/realtimefeeds/coinbase.js.map +1 -0
  475. package/node_modules/tardis-dev/dist/realtimefeeds/coinbaseinternational.d.ts +10 -0
  476. package/node_modules/tardis-dev/dist/realtimefeeds/coinbaseinternational.d.ts.map +1 -0
  477. package/node_modules/tardis-dev/dist/realtimefeeds/coinbaseinternational.js +47 -0
  478. package/node_modules/tardis-dev/dist/realtimefeeds/coinbaseinternational.js.map +1 -0
  479. package/node_modules/tardis-dev/dist/realtimefeeds/coinflex.d.ts +8 -0
  480. package/node_modules/tardis-dev/dist/realtimefeeds/coinflex.d.ts.map +1 -0
  481. package/node_modules/tardis-dev/dist/realtimefeeds/coinflex.js +23 -0
  482. package/node_modules/tardis-dev/dist/realtimefeeds/coinflex.js.map +1 -0
  483. package/node_modules/tardis-dev/dist/realtimefeeds/cryptocom.d.ts +10 -0
  484. package/node_modules/tardis-dev/dist/realtimefeeds/cryptocom.d.ts.map +1 -0
  485. package/node_modules/tardis-dev/dist/realtimefeeds/cryptocom.js +43 -0
  486. package/node_modules/tardis-dev/dist/realtimefeeds/cryptocom.js.map +1 -0
  487. package/node_modules/tardis-dev/dist/realtimefeeds/cryptofacilities.d.ts +9 -0
  488. package/node_modules/tardis-dev/dist/realtimefeeds/cryptofacilities.d.ts.map +1 -0
  489. package/node_modules/tardis-dev/dist/realtimefeeds/cryptofacilities.js +25 -0
  490. package/node_modules/tardis-dev/dist/realtimefeeds/cryptofacilities.js.map +1 -0
  491. package/node_modules/tardis-dev/dist/realtimefeeds/delta.d.ts +18 -0
  492. package/node_modules/tardis-dev/dist/realtimefeeds/delta.d.ts.map +1 -0
  493. package/node_modules/tardis-dev/dist/realtimefeeds/delta.js +29 -0
  494. package/node_modules/tardis-dev/dist/realtimefeeds/delta.js.map +1 -0
  495. package/node_modules/tardis-dev/dist/realtimefeeds/deribit.d.ts +13 -0
  496. package/node_modules/tardis-dev/dist/realtimefeeds/deribit.d.ts.map +1 -0
  497. package/node_modules/tardis-dev/dist/realtimefeeds/deribit.js +81 -0
  498. package/node_modules/tardis-dev/dist/realtimefeeds/deribit.js.map +1 -0
  499. package/node_modules/tardis-dev/dist/realtimefeeds/dydx.d.ts +8 -0
  500. package/node_modules/tardis-dev/dist/realtimefeeds/dydx.d.ts.map +1 -0
  501. package/node_modules/tardis-dev/dist/realtimefeeds/dydx.js +34 -0
  502. package/node_modules/tardis-dev/dist/realtimefeeds/dydx.js.map +1 -0
  503. package/node_modules/tardis-dev/dist/realtimefeeds/dydx_v4.d.ts +8 -0
  504. package/node_modules/tardis-dev/dist/realtimefeeds/dydx_v4.d.ts.map +1 -0
  505. package/node_modules/tardis-dev/dist/realtimefeeds/dydx_v4.js +33 -0
  506. package/node_modules/tardis-dev/dist/realtimefeeds/dydx_v4.js.map +1 -0
  507. package/node_modules/tardis-dev/dist/realtimefeeds/ftx.d.ts +33 -0
  508. package/node_modules/tardis-dev/dist/realtimefeeds/ftx.d.ts.map +1 -0
  509. package/node_modules/tardis-dev/dist/realtimefeeds/ftx.js +107 -0
  510. package/node_modules/tardis-dev/dist/realtimefeeds/ftx.js.map +1 -0
  511. package/node_modules/tardis-dev/dist/realtimefeeds/gateio.d.ts +9 -0
  512. package/node_modules/tardis-dev/dist/realtimefeeds/gateio.d.ts.map +1 -0
  513. package/node_modules/tardis-dev/dist/realtimefeeds/gateio.js +41 -0
  514. package/node_modules/tardis-dev/dist/realtimefeeds/gateio.js.map +1 -0
  515. package/node_modules/tardis-dev/dist/realtimefeeds/gateiofutures.d.ts +17 -0
  516. package/node_modules/tardis-dev/dist/realtimefeeds/gateiofutures.d.ts.map +1 -0
  517. package/node_modules/tardis-dev/dist/realtimefeeds/gateiofutures.js +68 -0
  518. package/node_modules/tardis-dev/dist/realtimefeeds/gateiofutures.js.map +1 -0
  519. package/node_modules/tardis-dev/dist/realtimefeeds/gemini.d.ts +9 -0
  520. package/node_modules/tardis-dev/dist/realtimefeeds/gemini.d.ts.map +1 -0
  521. package/node_modules/tardis-dev/dist/realtimefeeds/gemini.js +32 -0
  522. package/node_modules/tardis-dev/dist/realtimefeeds/gemini.js.map +1 -0
  523. package/node_modules/tardis-dev/dist/realtimefeeds/hitbtc.d.ts +12 -0
  524. package/node_modules/tardis-dev/dist/realtimefeeds/hitbtc.d.ts.map +1 -0
  525. package/node_modules/tardis-dev/dist/realtimefeeds/hitbtc.js +55 -0
  526. package/node_modules/tardis-dev/dist/realtimefeeds/hitbtc.js.map +1 -0
  527. package/node_modules/tardis-dev/dist/realtimefeeds/huobi.d.ts +108 -0
  528. package/node_modules/tardis-dev/dist/realtimefeeds/huobi.d.ts.map +1 -0
  529. package/node_modules/tardis-dev/dist/realtimefeeds/huobi.js +339 -0
  530. package/node_modules/tardis-dev/dist/realtimefeeds/huobi.js.map +1 -0
  531. package/node_modules/tardis-dev/dist/realtimefeeds/hyperliquid.d.ts +10 -0
  532. package/node_modules/tardis-dev/dist/realtimefeeds/hyperliquid.d.ts.map +1 -0
  533. package/node_modules/tardis-dev/dist/realtimefeeds/hyperliquid.js +34 -0
  534. package/node_modules/tardis-dev/dist/realtimefeeds/hyperliquid.js.map +1 -0
  535. package/node_modules/tardis-dev/dist/realtimefeeds/index.d.ts +6 -0
  536. package/node_modules/tardis-dev/dist/realtimefeeds/index.d.ts.map +1 -0
  537. package/node_modules/tardis-dev/dist/realtimefeeds/index.js +119 -0
  538. package/node_modules/tardis-dev/dist/realtimefeeds/index.js.map +1 -0
  539. package/node_modules/tardis-dev/dist/realtimefeeds/kraken.d.ts +10 -0
  540. package/node_modules/tardis-dev/dist/realtimefeeds/kraken.d.ts.map +1 -0
  541. package/node_modules/tardis-dev/dist/realtimefeeds/kraken.js +41 -0
  542. package/node_modules/tardis-dev/dist/realtimefeeds/kraken.js.map +1 -0
  543. package/node_modules/tardis-dev/dist/realtimefeeds/kucoin.d.ts +13 -0
  544. package/node_modules/tardis-dev/dist/realtimefeeds/kucoin.d.ts.map +1 -0
  545. package/node_modules/tardis-dev/dist/realtimefeeds/kucoin.js +66 -0
  546. package/node_modules/tardis-dev/dist/realtimefeeds/kucoin.js.map +1 -0
  547. package/node_modules/tardis-dev/dist/realtimefeeds/kucoinfutures.d.ts +25 -0
  548. package/node_modules/tardis-dev/dist/realtimefeeds/kucoinfutures.d.ts.map +1 -0
  549. package/node_modules/tardis-dev/dist/realtimefeeds/kucoinfutures.js +110 -0
  550. package/node_modules/tardis-dev/dist/realtimefeeds/kucoinfutures.js.map +1 -0
  551. package/node_modules/tardis-dev/dist/realtimefeeds/lighter.d.ts +8 -0
  552. package/node_modules/tardis-dev/dist/realtimefeeds/lighter.d.ts.map +1 -0
  553. package/node_modules/tardis-dev/dist/realtimefeeds/lighter.js +25 -0
  554. package/node_modules/tardis-dev/dist/realtimefeeds/lighter.js.map +1 -0
  555. package/node_modules/tardis-dev/dist/realtimefeeds/mango.d.ts +5 -0
  556. package/node_modules/tardis-dev/dist/realtimefeeds/mango.d.ts.map +1 -0
  557. package/node_modules/tardis-dev/dist/realtimefeeds/mango.js +5 -0
  558. package/node_modules/tardis-dev/dist/realtimefeeds/mango.js.map +1 -0
  559. package/node_modules/tardis-dev/dist/realtimefeeds/mexc.d.ts +35 -0
  560. package/node_modules/tardis-dev/dist/realtimefeeds/mexc.d.ts.map +1 -0
  561. package/node_modules/tardis-dev/dist/realtimefeeds/mexc.js +261 -0
  562. package/node_modules/tardis-dev/dist/realtimefeeds/mexc.js.map +1 -0
  563. package/node_modules/tardis-dev/dist/realtimefeeds/mexcfutures.d.ts +25 -0
  564. package/node_modules/tardis-dev/dist/realtimefeeds/mexcfutures.d.ts.map +1 -0
  565. package/node_modules/tardis-dev/dist/realtimefeeds/mexcfutures.js +203 -0
  566. package/node_modules/tardis-dev/dist/realtimefeeds/mexcfutures.js.map +1 -0
  567. package/node_modules/tardis-dev/dist/realtimefeeds/okex.d.ts +31 -0
  568. package/node_modules/tardis-dev/dist/realtimefeeds/okex.d.ts.map +1 -0
  569. package/node_modules/tardis-dev/dist/realtimefeeds/okex.js +147 -0
  570. package/node_modules/tardis-dev/dist/realtimefeeds/okex.js.map +1 -0
  571. package/node_modules/tardis-dev/dist/realtimefeeds/okexspreads.d.ts +11 -0
  572. package/node_modules/tardis-dev/dist/realtimefeeds/okexspreads.d.ts.map +1 -0
  573. package/node_modules/tardis-dev/dist/realtimefeeds/okexspreads.js +53 -0
  574. package/node_modules/tardis-dev/dist/realtimefeeds/okexspreads.js.map +1 -0
  575. package/node_modules/tardis-dev/dist/realtimefeeds/phemex.d.ts +14 -0
  576. package/node_modules/tardis-dev/dist/realtimefeeds/phemex.d.ts.map +1 -0
  577. package/node_modules/tardis-dev/dist/realtimefeeds/phemex.js +46 -0
  578. package/node_modules/tardis-dev/dist/realtimefeeds/phemex.js.map +1 -0
  579. package/node_modules/tardis-dev/dist/realtimefeeds/poloniex.d.ts +14 -0
  580. package/node_modules/tardis-dev/dist/realtimefeeds/poloniex.d.ts.map +1 -0
  581. package/node_modules/tardis-dev/dist/realtimefeeds/poloniex.js +28 -0
  582. package/node_modules/tardis-dev/dist/realtimefeeds/poloniex.js.map +1 -0
  583. package/node_modules/tardis-dev/dist/realtimefeeds/polymarket.d.ts +26 -0
  584. package/node_modules/tardis-dev/dist/realtimefeeds/polymarket.d.ts.map +1 -0
  585. package/node_modules/tardis-dev/dist/realtimefeeds/polymarket.js +92 -0
  586. package/node_modules/tardis-dev/dist/realtimefeeds/polymarket.js.map +1 -0
  587. package/node_modules/tardis-dev/dist/realtimefeeds/realtimefeed.d.ts +75 -0
  588. package/node_modules/tardis-dev/dist/realtimefeeds/realtimefeed.d.ts.map +1 -0
  589. package/node_modules/tardis-dev/dist/realtimefeeds/realtimefeed.js +423 -0
  590. package/node_modules/tardis-dev/dist/realtimefeeds/realtimefeed.js.map +1 -0
  591. package/node_modules/tardis-dev/dist/realtimefeeds/serum.d.ts +14 -0
  592. package/node_modules/tardis-dev/dist/realtimefeeds/serum.d.ts.map +1 -0
  593. package/node_modules/tardis-dev/dist/realtimefeeds/serum.js +58 -0
  594. package/node_modules/tardis-dev/dist/realtimefeeds/serum.js.map +1 -0
  595. package/node_modules/tardis-dev/dist/realtimefeeds/staratlas.d.ts +5 -0
  596. package/node_modules/tardis-dev/dist/realtimefeeds/staratlas.d.ts.map +1 -0
  597. package/node_modules/tardis-dev/dist/realtimefeeds/staratlas.js +5 -0
  598. package/node_modules/tardis-dev/dist/realtimefeeds/staratlas.js.map +1 -0
  599. package/node_modules/tardis-dev/dist/realtimefeeds/upbit.d.ts +8 -0
  600. package/node_modules/tardis-dev/dist/realtimefeeds/upbit.d.ts.map +1 -0
  601. package/node_modules/tardis-dev/dist/realtimefeeds/upbit.js +29 -0
  602. package/node_modules/tardis-dev/dist/realtimefeeds/upbit.js.map +1 -0
  603. package/node_modules/tardis-dev/dist/realtimefeeds/woox.d.ts +12 -0
  604. package/node_modules/tardis-dev/dist/realtimefeeds/woox.d.ts.map +1 -0
  605. package/node_modules/tardis-dev/dist/realtimefeeds/woox.js +77 -0
  606. package/node_modules/tardis-dev/dist/realtimefeeds/woox.js.map +1 -0
  607. package/node_modules/tardis-dev/dist/realtimeiterator.d.ts +10 -0
  608. package/node_modules/tardis-dev/dist/realtimeiterator.d.ts.map +1 -0
  609. package/node_modules/tardis-dev/dist/realtimeiterator.js +106 -0
  610. package/node_modules/tardis-dev/dist/realtimeiterator.js.map +1 -0
  611. package/node_modules/tardis-dev/dist/replay.d.ts +42 -0
  612. package/node_modules/tardis-dev/dist/replay.d.ts.map +1 -0
  613. package/node_modules/tardis-dev/dist/replay.js +417 -0
  614. package/node_modules/tardis-dev/dist/replay.js.map +1 -0
  615. package/node_modules/tardis-dev/dist/stream.d.ts +28 -0
  616. package/node_modules/tardis-dev/dist/stream.d.ts.map +1 -0
  617. package/node_modules/tardis-dev/dist/stream.js +112 -0
  618. package/node_modules/tardis-dev/dist/stream.js.map +1 -0
  619. package/node_modules/tardis-dev/dist/types.d.ts +154 -0
  620. package/node_modules/tardis-dev/dist/types.d.ts.map +1 -0
  621. package/node_modules/tardis-dev/dist/types.js +2 -0
  622. package/node_modules/tardis-dev/dist/types.js.map +1 -0
  623. package/node_modules/tardis-dev/dist/worker.d.ts +24 -0
  624. package/node_modules/tardis-dev/dist/worker.d.ts.map +1 -0
  625. package/node_modules/tardis-dev/dist/worker.js +143 -0
  626. package/node_modules/tardis-dev/dist/worker.js.map +1 -0
  627. package/node_modules/tardis-dev/example.js +171 -0
  628. package/node_modules/tardis-dev/package.json +85 -0
  629. package/node_modules/tardis-dev/src/apikeyaccessinfo.ts +25 -0
  630. package/node_modules/tardis-dev/src/binarysplit.ts +50 -0
  631. package/node_modules/tardis-dev/src/boundedqueue.ts +118 -0
  632. package/node_modules/tardis-dev/src/clearcache.ts +62 -0
  633. package/node_modules/tardis-dev/src/combine.ts +134 -0
  634. package/node_modules/tardis-dev/src/computable/booksnapshot.ts +327 -0
  635. package/node_modules/tardis-dev/src/computable/computable.ts +104 -0
  636. package/node_modules/tardis-dev/src/computable/context.ts +12 -0
  637. package/node_modules/tardis-dev/src/computable/index.ts +3 -0
  638. package/node_modules/tardis-dev/src/computable/tradebar.ts +173 -0
  639. package/node_modules/tardis-dev/src/consts.ts +623 -0
  640. package/node_modules/tardis-dev/src/debug.ts +3 -0
  641. package/node_modules/tardis-dev/src/downloaddatasets.ts +193 -0
  642. package/node_modules/tardis-dev/src/exchangedetails.ts +120 -0
  643. package/node_modules/tardis-dev/src/filter.ts +69 -0
  644. package/node_modules/tardis-dev/src/foreachconcurrent.ts +29 -0
  645. package/node_modules/tardis-dev/src/handy.ts +880 -0
  646. package/node_modules/tardis-dev/src/index.ts +16 -0
  647. package/node_modules/tardis-dev/src/instrumentinfo.ts +197 -0
  648. package/node_modules/tardis-dev/src/mappers/ascendex.ts +210 -0
  649. package/node_modules/tardis-dev/src/mappers/binance.ts +598 -0
  650. package/node_modules/tardis-dev/src/mappers/binancedex.ts +180 -0
  651. package/node_modules/tardis-dev/src/mappers/binanceeuropeanoptions.ts +624 -0
  652. package/node_modules/tardis-dev/src/mappers/bitfinex.ts +472 -0
  653. package/node_modules/tardis-dev/src/mappers/bitflyer.ts +199 -0
  654. package/node_modules/tardis-dev/src/mappers/bitget.ts +490 -0
  655. package/node_modules/tardis-dev/src/mappers/bitmex.ts +359 -0
  656. package/node_modules/tardis-dev/src/mappers/bitnomial.ts +134 -0
  657. package/node_modules/tardis-dev/src/mappers/bitstamp.ts +219 -0
  658. package/node_modules/tardis-dev/src/mappers/blockchaincom.ts +106 -0
  659. package/node_modules/tardis-dev/src/mappers/bullish.ts +392 -0
  660. package/node_modules/tardis-dev/src/mappers/bybit.ts +947 -0
  661. package/node_modules/tardis-dev/src/mappers/bybitspot.ts +129 -0
  662. package/node_modules/tardis-dev/src/mappers/coinbase.ts +259 -0
  663. package/node_modules/tardis-dev/src/mappers/coinbaseinternational.ts +338 -0
  664. package/node_modules/tardis-dev/src/mappers/coinflex.ts +175 -0
  665. package/node_modules/tardis-dev/src/mappers/cryptocom.ts +504 -0
  666. package/node_modules/tardis-dev/src/mappers/cryptofacilities.ts +319 -0
  667. package/node_modules/tardis-dev/src/mappers/delta.ts +315 -0
  668. package/node_modules/tardis-dev/src/mappers/deribit.ts +406 -0
  669. package/node_modules/tardis-dev/src/mappers/dydx.ts +330 -0
  670. package/node_modules/tardis-dev/src/mappers/dydxv4.ts +349 -0
  671. package/node_modules/tardis-dev/src/mappers/ftx.ts +307 -0
  672. package/node_modules/tardis-dev/src/mappers/gateio.ts +543 -0
  673. package/node_modules/tardis-dev/src/mappers/gateiofutures.ts +290 -0
  674. package/node_modules/tardis-dev/src/mappers/gemini.ts +225 -0
  675. package/node_modules/tardis-dev/src/mappers/hitbtc.ts +124 -0
  676. package/node_modules/tardis-dev/src/mappers/huobi.ts +815 -0
  677. package/node_modules/tardis-dev/src/mappers/hyperliquid.ts +248 -0
  678. package/node_modules/tardis-dev/src/mappers/index.ts +140 -0
  679. package/node_modules/tardis-dev/src/mappers/kraken.ts +382 -0
  680. package/node_modules/tardis-dev/src/mappers/kucoin.ts +353 -0
  681. package/node_modules/tardis-dev/src/mappers/kucoinfutures.ts +508 -0
  682. package/node_modules/tardis-dev/src/mappers/lighter.ts +363 -0
  683. package/node_modules/tardis-dev/src/mappers/mapper.ts +163 -0
  684. package/node_modules/tardis-dev/src/mappers/mexc.ts +324 -0
  685. package/node_modules/tardis-dev/src/mappers/mexcfutures.ts +352 -0
  686. package/node_modules/tardis-dev/src/mappers/okex.ts +1362 -0
  687. package/node_modules/tardis-dev/src/mappers/okexspreads.ts +172 -0
  688. package/node_modules/tardis-dev/src/mappers/phemex.ts +562 -0
  689. package/node_modules/tardis-dev/src/mappers/poloniex.ts +304 -0
  690. package/node_modules/tardis-dev/src/mappers/polymarket.ts +204 -0
  691. package/node_modules/tardis-dev/src/mappers/registry.ts +203 -0
  692. package/node_modules/tardis-dev/src/mappers/serum.ts +196 -0
  693. package/node_modules/tardis-dev/src/mappers/upbit.ts +117 -0
  694. package/node_modules/tardis-dev/src/mappers/woox.ts +700 -0
  695. package/node_modules/tardis-dev/src/okexsymbols.ts +10 -0
  696. package/node_modules/tardis-dev/src/options.ts +36 -0
  697. package/node_modules/tardis-dev/src/orderbook.ts +169 -0
  698. package/node_modules/tardis-dev/src/priceleveltree.ts +188 -0
  699. package/node_modules/tardis-dev/src/realtimefeeds/binance.ts +577 -0
  700. package/node_modules/tardis-dev/src/realtimefeeds/binancedex.ts +64 -0
  701. package/node_modules/tardis-dev/src/realtimefeeds/binanceeuropeanoptions.ts +132 -0
  702. package/node_modules/tardis-dev/src/realtimefeeds/bitfinex.ts +83 -0
  703. package/node_modules/tardis-dev/src/realtimefeeds/bitflyer.ts +41 -0
  704. package/node_modules/tardis-dev/src/realtimefeeds/bitget.ts +76 -0
  705. package/node_modules/tardis-dev/src/realtimefeeds/bitmex.ts +42 -0
  706. package/node_modules/tardis-dev/src/realtimefeeds/bitnomial.ts +60 -0
  707. package/node_modules/tardis-dev/src/realtimefeeds/bitstamp.ts +70 -0
  708. package/node_modules/tardis-dev/src/realtimefeeds/blockchaincom.ts +44 -0
  709. package/node_modules/tardis-dev/src/realtimefeeds/bullish.ts +140 -0
  710. package/node_modules/tardis-dev/src/realtimefeeds/bybit.ts +123 -0
  711. package/node_modules/tardis-dev/src/realtimefeeds/coinbase.ts +112 -0
  712. package/node_modules/tardis-dev/src/realtimefeeds/coinbaseinternational.ts +60 -0
  713. package/node_modules/tardis-dev/src/realtimefeeds/coinflex.ts +29 -0
  714. package/node_modules/tardis-dev/src/realtimefeeds/cryptocom.ts +49 -0
  715. package/node_modules/tardis-dev/src/realtimefeeds/cryptofacilities.ts +30 -0
  716. package/node_modules/tardis-dev/src/realtimefeeds/delta.ts +35 -0
  717. package/node_modules/tardis-dev/src/realtimefeeds/deribit.ts +95 -0
  718. package/node_modules/tardis-dev/src/realtimefeeds/dydx.ts +40 -0
  719. package/node_modules/tardis-dev/src/realtimefeeds/dydx_v4.ts +39 -0
  720. package/node_modules/tardis-dev/src/realtimefeeds/ftx.ts +137 -0
  721. package/node_modules/tardis-dev/src/realtimefeeds/gateio.ts +46 -0
  722. package/node_modules/tardis-dev/src/realtimefeeds/gateiofutures.ts +91 -0
  723. package/node_modules/tardis-dev/src/realtimefeeds/gemini.ts +38 -0
  724. package/node_modules/tardis-dev/src/realtimefeeds/hitbtc.ts +65 -0
  725. package/node_modules/tardis-dev/src/realtimefeeds/huobi.ts +435 -0
  726. package/node_modules/tardis-dev/src/realtimefeeds/hyperliquid.ts +41 -0
  727. package/node_modules/tardis-dev/src/realtimefeeds/index.ts +145 -0
  728. package/node_modules/tardis-dev/src/realtimefeeds/kraken.ts +48 -0
  729. package/node_modules/tardis-dev/src/realtimefeeds/kucoin.ts +80 -0
  730. package/node_modules/tardis-dev/src/realtimefeeds/kucoinfutures.ts +139 -0
  731. package/node_modules/tardis-dev/src/realtimefeeds/lighter.ts +31 -0
  732. package/node_modules/tardis-dev/src/realtimefeeds/mango.ts +5 -0
  733. package/node_modules/tardis-dev/src/realtimefeeds/mexc.ts +327 -0
  734. package/node_modules/tardis-dev/src/realtimefeeds/mexcfutures.ts +269 -0
  735. package/node_modules/tardis-dev/src/realtimefeeds/okex.ts +189 -0
  736. package/node_modules/tardis-dev/src/realtimefeeds/okexspreads.ts +64 -0
  737. package/node_modules/tardis-dev/src/realtimefeeds/phemex.ts +52 -0
  738. package/node_modules/tardis-dev/src/realtimefeeds/poloniex.ts +34 -0
  739. package/node_modules/tardis-dev/src/realtimefeeds/polymarket.ts +112 -0
  740. package/node_modules/tardis-dev/src/realtimefeeds/realtimefeed.ts +561 -0
  741. package/node_modules/tardis-dev/src/realtimefeeds/serum.ts +67 -0
  742. package/node_modules/tardis-dev/src/realtimefeeds/staratlas.ts +5 -0
  743. package/node_modules/tardis-dev/src/realtimefeeds/upbit.ts +35 -0
  744. package/node_modules/tardis-dev/src/realtimefeeds/woox.ts +110 -0
  745. package/node_modules/tardis-dev/src/realtimeiterator.ts +124 -0
  746. package/node_modules/tardis-dev/src/replay.ts +616 -0
  747. package/node_modules/tardis-dev/src/stream.ts +186 -0
  748. package/node_modules/tardis-dev/src/types.ts +178 -0
  749. package/node_modules/tardis-dev/src/worker.ts +221 -0
  750. package/node_modules/uWebSockets.js/ESM_wrapper.mjs +53 -0
  751. package/node_modules/uWebSockets.js/LICENSE +201 -0
  752. package/node_modules/uWebSockets.js/README.md +6 -0
  753. package/node_modules/uWebSockets.js/index.d.ts +468 -0
  754. package/node_modules/uWebSockets.js/package.json +12 -0
  755. package/node_modules/uWebSockets.js/source_commit +1 -0
  756. package/node_modules/uWebSockets.js/uws.js +76 -0
  757. package/node_modules/uWebSockets.js/uws_darwin_arm64_127.node +0 -0
  758. package/node_modules/uWebSockets.js/uws_darwin_arm64_137.node +0 -0
  759. package/node_modules/uWebSockets.js/uws_darwin_arm64_147.node +0 -0
  760. package/node_modules/uWebSockets.js/uws_darwin_x64_127.node +0 -0
  761. package/node_modules/uWebSockets.js/uws_darwin_x64_137.node +0 -0
  762. package/node_modules/uWebSockets.js/uws_darwin_x64_147.node +0 -0
  763. package/node_modules/uWebSockets.js/uws_linux_arm64_127.node +0 -0
  764. package/node_modules/uWebSockets.js/uws_linux_arm64_137.node +0 -0
  765. package/node_modules/uWebSockets.js/uws_linux_arm64_147.node +0 -0
  766. package/node_modules/uWebSockets.js/uws_linux_x64_127.node +0 -0
  767. package/node_modules/uWebSockets.js/uws_linux_x64_137.node +0 -0
  768. package/node_modules/uWebSockets.js/uws_linux_x64_147.node +0 -0
  769. package/node_modules/uWebSockets.js/uws_win32_x64_127.node +0 -0
  770. package/node_modules/uWebSockets.js/uws_win32_x64_137.node +0 -0
  771. package/node_modules/uWebSockets.js/uws_win32_x64_147.node +0 -0
  772. package/node_modules/ws/LICENSE +20 -0
  773. package/node_modules/ws/README.md +548 -0
  774. package/node_modules/ws/browser.js +8 -0
  775. package/node_modules/ws/index.js +22 -0
  776. package/node_modules/ws/lib/buffer-util.js +131 -0
  777. package/node_modules/ws/lib/constants.js +19 -0
  778. package/node_modules/ws/lib/event-target.js +292 -0
  779. package/node_modules/ws/lib/extension.js +203 -0
  780. package/node_modules/ws/lib/limiter.js +55 -0
  781. package/node_modules/ws/lib/permessage-deflate.js +528 -0
  782. package/node_modules/ws/lib/receiver.js +743 -0
  783. package/node_modules/ws/lib/sender.js +607 -0
  784. package/node_modules/ws/lib/stream.js +161 -0
  785. package/node_modules/ws/lib/subprotocol.js +62 -0
  786. package/node_modules/ws/lib/validation.js +152 -0
  787. package/node_modules/ws/lib/websocket-server.js +562 -0
  788. package/node_modules/ws/lib/websocket.js +1407 -0
  789. package/node_modules/ws/package.json +74 -0
  790. package/node_modules/ws/wrapper.mjs +21 -0
  791. package/package.json +8 -20
  792. package/src/tardismachine.ts +15 -7
@@ -0,0 +1,59 @@
1
+ import { BookChange, BookTicker, Trade } from '../types.ts';
2
+ export declare const polymarketMappers: {
3
+ polymarket: {
4
+ trades: import("./registry.ts").MapperCreator<"bitmex" | "deribit" | "binance-futures" | "binance-delivery" | "binance-european-options" | "binance" | "ftx" | "okex-futures" | "okex-options" | "okex-swap" | "okex" | "okex-spreads" | "huobi-dm" | "huobi-dm-swap" | "huobi-dm-linear-swap" | "huobi" | "bitfinex-derivatives" | "bitfinex" | "coinbase" | "coinbase-international" | "cryptofacilities" | "kraken" | "bitstamp" | "gemini" | "poloniex" | "bybit" | "bybit-spot" | "bybit-options" | "phemex" | "delta" | "ftx-us" | "binance-us" | "gate-io-futures" | "mexc-futures" | "gate-io" | "okcoin" | "bitflyer" | "hitbtc" | "coinflex" | "binance-jersey" | "binance-dex" | "upbit" | "ascendex" | "dydx" | "dydx-v4" | "serum" | "mango" | "huobi-dm-options" | "star-atlas" | "crypto-com" | "kucoin" | "kucoin-futures" | "bitnomial" | "woo-x" | "blockchain-com" | "bitget" | "bitget-futures" | "hyperliquid" | "lighter" | "bullish" | "mexc" | "polymarket", Trade>;
5
+ bookChanges: import("./registry.ts").MapperCreator<"bitmex" | "deribit" | "binance-futures" | "binance-delivery" | "binance-european-options" | "binance" | "ftx" | "okex-futures" | "okex-options" | "okex-swap" | "okex" | "okex-spreads" | "huobi-dm" | "huobi-dm-swap" | "huobi-dm-linear-swap" | "huobi" | "bitfinex-derivatives" | "bitfinex" | "coinbase" | "coinbase-international" | "cryptofacilities" | "kraken" | "bitstamp" | "gemini" | "poloniex" | "bybit" | "bybit-spot" | "bybit-options" | "phemex" | "delta" | "ftx-us" | "binance-us" | "gate-io-futures" | "mexc-futures" | "gate-io" | "okcoin" | "bitflyer" | "hitbtc" | "coinflex" | "binance-jersey" | "binance-dex" | "upbit" | "ascendex" | "dydx" | "dydx-v4" | "serum" | "mango" | "huobi-dm-options" | "star-atlas" | "crypto-com" | "kucoin" | "kucoin-futures" | "bitnomial" | "woo-x" | "blockchain-com" | "bitget" | "bitget-futures" | "hyperliquid" | "lighter" | "bullish" | "mexc" | "polymarket", BookChange>;
6
+ bookTickers: import("./registry.ts").MapperCreator<"bitmex" | "deribit" | "binance-futures" | "binance-delivery" | "binance-european-options" | "binance" | "ftx" | "okex-futures" | "okex-options" | "okex-swap" | "okex" | "okex-spreads" | "huobi-dm" | "huobi-dm-swap" | "huobi-dm-linear-swap" | "huobi" | "bitfinex-derivatives" | "bitfinex" | "coinbase" | "coinbase-international" | "cryptofacilities" | "kraken" | "bitstamp" | "gemini" | "poloniex" | "bybit" | "bybit-spot" | "bybit-options" | "phemex" | "delta" | "ftx-us" | "binance-us" | "gate-io-futures" | "mexc-futures" | "gate-io" | "okcoin" | "bitflyer" | "hitbtc" | "coinflex" | "binance-jersey" | "binance-dex" | "upbit" | "ascendex" | "dydx" | "dydx-v4" | "serum" | "mango" | "huobi-dm-options" | "star-atlas" | "crypto-com" | "kucoin" | "kucoin-futures" | "bitnomial" | "woo-x" | "blockchain-com" | "bitget" | "bitget-futures" | "hyperliquid" | "lighter" | "bullish" | "mexc" | "polymarket", BookTicker>;
7
+ };
8
+ };
9
+ export type PolymarketNativeMessage = PolymarketClobBookMessage | PolymarketClobBookMessage[] | PolymarketClobPriceChangeMessage | PolymarketClobLastTradePriceMessage | PolymarketClobBestBidAskMessage;
10
+ type PolymarketClobEventType = 'book' | 'price_change' | 'last_trade_price' | 'best_bid_ask';
11
+ type PolymarketClobMessage<T extends PolymarketClobEventType = PolymarketClobEventType> = {
12
+ event_type: T;
13
+ market: string;
14
+ };
15
+ type PolymarketClobBookMessage = PolymarketClobMessage<'book'> & {
16
+ asset_id: string;
17
+ timestamp: string;
18
+ hash: string;
19
+ bids: PolymarketClobBookLevel[];
20
+ asks: PolymarketClobBookLevel[];
21
+ tick_size?: string;
22
+ last_trade_price?: string;
23
+ };
24
+ type PolymarketClobBookLevel = {
25
+ price: string;
26
+ size: string;
27
+ };
28
+ type PolymarketClobPriceChangeMessage = PolymarketClobMessage<'price_change'> & {
29
+ timestamp: string;
30
+ price_changes: PolymarketClobPriceChange[];
31
+ };
32
+ type PolymarketClobPriceChange = {
33
+ asset_id: string;
34
+ price: string;
35
+ size: string;
36
+ side: PolymarketClobTradeSide;
37
+ hash: string;
38
+ best_bid: string;
39
+ best_ask: string;
40
+ };
41
+ type PolymarketClobLastTradePriceMessage = PolymarketClobMessage<'last_trade_price'> & {
42
+ asset_id: string;
43
+ fee_rate_bps: string;
44
+ price: string;
45
+ side: PolymarketClobTradeSide;
46
+ size: string;
47
+ timestamp: string;
48
+ transaction_hash: string;
49
+ };
50
+ type PolymarketClobTradeSide = 'BUY' | 'SELL';
51
+ type PolymarketClobBestBidAskMessage = PolymarketClobMessage<'best_bid_ask'> & {
52
+ asset_id: string;
53
+ best_bid: string;
54
+ best_ask: string;
55
+ spread: string;
56
+ timestamp: string;
57
+ };
58
+ export {};
59
+ //# sourceMappingURL=polymarket.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"polymarket.d.ts","sourceRoot":"","sources":["../../src/mappers/polymarket.ts"],"names":[],"mappings":"AAAA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,MAAM,CAAA;CACjB,CAAA;AAED,KAAK,mCAAmC,GAAG,qBAAqB,CAAC,kBAAkB,CAAC,GAAG;IACrF,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,uBAAuB,CAAA;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,gBAAgB,EAAE,MAAM,CAAA;CACzB,CAAA;AAED,KAAK,uBAAuB,GAAG,KAAK,GAAG,MAAM,CAAA;AAE7C,KAAK,+BAA+B,GAAG,qBAAqB,CAAC,cAAc,CAAC,GAAG;IAC7E,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA"}
@@ -0,0 +1,121 @@
1
+ import { asNonZeroNumberOrUndefined } from "../handy.js";
2
+ import { exchangeMappers } from "./registry.js";
3
+ export const polymarketMappers = exchangeMappers({
4
+ polymarket: {
5
+ trades: () => new PolymarketTradesMapper(),
6
+ bookChanges: () => new PolymarketBookChangeMapper(),
7
+ bookTickers: () => new PolymarketBookTickerMapper()
8
+ }
9
+ });
10
+ class PolymarketBookChangeMapper {
11
+ canHandle(message) {
12
+ if (Array.isArray(message)) {
13
+ return message.length > 0 && message.every(isPolymarketClobBookMessage);
14
+ }
15
+ return isPolymarketClobPriceChangeMessage(message) || isPolymarketClobBookMessage(message);
16
+ }
17
+ getFilters(symbols) {
18
+ return [
19
+ { channel: 'book', symbols },
20
+ { channel: 'price_change', symbols }
21
+ ];
22
+ }
23
+ *map(message, localTimestamp) {
24
+ if (Array.isArray(message)) {
25
+ for (const bookMsg of message) {
26
+ yield this.mapBookSnapshot(bookMsg, localTimestamp);
27
+ }
28
+ return;
29
+ }
30
+ if (isPolymarketClobPriceChangeMessage(message)) {
31
+ const timestamp = new Date(Number(message.timestamp));
32
+ const changes = message.price_changes;
33
+ for (let i = 0; i < changes.length; i++) {
34
+ const change = changes[i];
35
+ const level = this.mapLevel(change);
36
+ yield {
37
+ type: 'book_change',
38
+ symbol: change.asset_id,
39
+ exchange: 'polymarket',
40
+ isSnapshot: false,
41
+ bids: change.side === 'BUY' ? [level] : [],
42
+ asks: change.side === 'SELL' ? [level] : [],
43
+ timestamp,
44
+ localTimestamp
45
+ };
46
+ }
47
+ return;
48
+ }
49
+ if (isPolymarketClobBookMessage(message)) {
50
+ yield this.mapBookSnapshot(message, localTimestamp);
51
+ return;
52
+ }
53
+ }
54
+ mapBookSnapshot(message, localTimestamp) {
55
+ return {
56
+ type: 'book_change',
57
+ symbol: message.asset_id,
58
+ exchange: 'polymarket',
59
+ isSnapshot: true,
60
+ bids: message.bids.map(this.mapLevel.bind(this)),
61
+ asks: message.asks.map(this.mapLevel.bind(this)),
62
+ timestamp: new Date(Number(message.timestamp)),
63
+ localTimestamp
64
+ };
65
+ }
66
+ mapLevel(level) {
67
+ return {
68
+ price: Number(level.price),
69
+ amount: Number(level.size)
70
+ };
71
+ }
72
+ }
73
+ class PolymarketTradesMapper {
74
+ canHandle(message) {
75
+ return message.event_type === 'last_trade_price';
76
+ }
77
+ getFilters(symbols) {
78
+ return [{ channel: 'last_trade_price', symbols }];
79
+ }
80
+ *map(message, localTimestamp) {
81
+ yield {
82
+ type: 'trade',
83
+ symbol: message.asset_id,
84
+ exchange: 'polymarket',
85
+ id: message.transaction_hash,
86
+ price: Number(message.price),
87
+ amount: Number(message.size),
88
+ side: message.side.toLowerCase(),
89
+ timestamp: new Date(Number(message.timestamp)),
90
+ localTimestamp
91
+ };
92
+ }
93
+ }
94
+ class PolymarketBookTickerMapper {
95
+ canHandle(message) {
96
+ return message.event_type === 'best_bid_ask';
97
+ }
98
+ getFilters(symbols) {
99
+ return [{ channel: 'best_bid_ask', symbols }];
100
+ }
101
+ *map(message, localTimestamp) {
102
+ yield {
103
+ type: 'book_ticker',
104
+ symbol: message.asset_id,
105
+ exchange: 'polymarket',
106
+ bidPrice: asNonZeroNumberOrUndefined(message.best_bid),
107
+ bidAmount: undefined,
108
+ askPrice: asNonZeroNumberOrUndefined(message.best_ask),
109
+ askAmount: undefined,
110
+ timestamp: new Date(Number(message.timestamp)),
111
+ localTimestamp
112
+ };
113
+ }
114
+ }
115
+ function isPolymarketClobBookMessage(message) {
116
+ return message?.event_type === 'book';
117
+ }
118
+ function isPolymarketClobPriceChangeMessage(message) {
119
+ return message?.event_type === 'price_change';
120
+ }
121
+ //# sourceMappingURL=polymarket.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"polymarket.js","sourceRoot":"","sources":["../../src/mappers/polymarket.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAExD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAE/C,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC;IAC/C,UAAU,EAAE;QACV,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,sBAAsB,EAAE;QAC1C,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,0BAA0B,EAAE;QACnD,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,0BAA0B,EAAE;KACpD;CACF,CAAC,CAAA;AAGF,MAAM,0BAA0B;IAC9B,SAAS,CAAC,OAAgC;QACxC,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;YAC3B,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAA;QACzE,CAAC;QACD,OAAO,kCAAkC,CAAC,OAAO,CAAC,IAAI,2BAA2B,CAAC,OAAO,CAAC,CAAA;IAC5F,CAAC;IAED,UAAU,CAAC,OAAkB;QAC3B,OAAO;YACL,EAAE,OAAO,EAAE,MAAe,EAAE,OAAO,EAAE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AAC,OAAO,CAAC,IAAI,CAAC;YAC5B,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW,EAAwC;YACtE,SAAS,EAAE,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;YAC9C,cAAc;SACf,CAAA;IACH,CAAC;CACF;AAED,MAAM,0BAA0B;IAC9B,SAAS,CAAC,OAAY;QACpB,OAAO,OAAO,CAAC,UAAU,KAAK,cAAc,CAAA;IAC9C,CAAC;IAED,UAAU,CAAC,OAAkB;QAC3B,OAAO,CAAC,EAAE,OAAO,EAAE,cAAuB,EAAE,OAAO,EAAE,CAAC,CAAA;IACxD,CAAC;IAED,CAAC,GAAG,CAAC,OAAwC,EAAE,cAAoB;QACjE,MAAM;YACJ,IAAI,EAAE,aAAa;YACnB,MAAM,EAAE,OAAO,CAAC,QAAQ;YACxB,QAAQ,EAAE,YAAY;YACtB,QAAQ,EAAE,0BAA0B,CAAC,OAAO,CAAC,QAAQ,CAAC;YACtD,SAAS,EAAE,SAAS;YACpB,QAAQ,EAAE,0BAA0B,CAAC,OAAO,CAAC,QAAQ,CAAC;YACtD,SAAS,EAAE,SAAS;YACpB,SAAS,EAAE,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;YAC9C,cAAc;SACf,CAAA;IACH,CAAC;CACF;AAgBD,SAAS,2BAA2B,CAAC,OAAY;IAC/C,OAAO,OAAO,EAAE,UAAU,KAAK,MAAM,CAAA;AACvC,CAAC;AAgBD,SAAS,kCAAkC,CAAC,OAAY;IACtD,OAAO,OAAO,EAAE,UAAU,KAAK,cAAc,CAAA;AAC/C,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { Exchange, NormalizedData } from '../types.ts';
2
+ import { Mapper } from './mapper.ts';
3
+ export type MapperCreator<T extends Exchange = any, U extends NormalizedData = NormalizedData> = ((localTimestamp?: Date) => Mapper<T, U>) & {
4
+ switchDates?: readonly Date[];
5
+ };
6
+ export type MapperCollection = Record<string, MapperCreator>;
7
+ export type MapperFactory<T extends Exchange = any, U extends NormalizedData = NormalizedData> = (localTimestamp?: Date) => Mapper<T, U>;
8
+ export type MapperDefinition<T extends Exchange = any, U extends NormalizedData = NormalizedData> = MapperCreator<T, U> | MapperFactory<T, U>;
9
+ export type ExchangeMapperDefinitions = Partial<Record<MapperKind, MapperDefinition>>;
10
+ export type ExchangeMappers = Partial<Record<Exchange, Partial<Record<MapperKind, MapperCreator>>>>;
11
+ export type ExchangeMapperDefinitionMap = Partial<Record<Exchange, ExchangeMapperDefinitions>>;
12
+ type OnlyExchangeKeys<M> = M & Record<Exclude<keyof M, Exchange>, never>;
13
+ type OnlyMapperKindKeys<M> = {
14
+ [ExchangeName in keyof M]: M[ExchangeName] & Record<Exclude<keyof M[ExchangeName], MapperKind>, never>;
15
+ };
16
+ export type MapperEntry<T extends Exchange, U extends NormalizedData> = {
17
+ until?: Date;
18
+ use: (localTimestamp?: Date) => Mapper<T, U>;
19
+ };
20
+ export type MapperKind = 'trades' | 'bookChanges' | 'derivativeTickers' | 'optionsSummary' | 'liquidations' | 'bookTickers';
21
+ export declare const MAPPER_KINDS: readonly MapperKind[];
22
+ type UnionToIntersection<T> = (T extends unknown ? (value: T) => void : never) extends (value: infer U) => void ? U : never;
23
+ type MapperForKind<Mappers, Kind extends MapperKind> = Kind extends keyof Mappers ? Mappers[Kind] : never;
24
+ type DefinitionMapperCollection<Definition extends ExchangeMappers, Kind extends MapperKind> = {
25
+ [ExchangeName in keyof Definition as MapperForKind<Definition[ExchangeName], Kind> extends MapperCreator ? ExchangeName : never]: Extract<MapperForKind<Definition[ExchangeName], Kind>, MapperCreator>;
26
+ };
27
+ type MergedExchangeMappers<Definitions extends readonly ExchangeMappers[]> = {
28
+ [Kind in MapperKind]: UnionToIntersection<Definitions[number] extends infer Definition ? Definition extends ExchangeMappers ? DefinitionMapperCollection<Definition, Kind> : never : never>;
29
+ };
30
+ export declare const isRealTime: (date?: Date) => boolean;
31
+ export declare function mapper<T extends Exchange, U extends NormalizedData>(entry: MapperEntry<T, U>): MapperCreator<T, U>;
32
+ export declare function mapper<T extends Exchange, U extends NormalizedData>(entries: readonly MapperEntry<T, U>[]): MapperCreator<T, U>;
33
+ export declare function exchangeMappers<M extends ExchangeMapperDefinitionMap>(definition: OnlyExchangeKeys<M> & OnlyMapperKindKeys<M>): NormalizeExchangeMappers<M>;
34
+ export declare function mergeExchangeMappers<Definitions extends readonly ExchangeMappers[]>(...definitions: Definitions): MergedExchangeMappers<Definitions>;
35
+ type NormalizeExchangeMappers<M extends ExchangeMapperDefinitionMap> = {
36
+ [ExchangeName in keyof M]: {
37
+ [Kind in keyof M[ExchangeName]]: Extract<M[ExchangeName][Kind], MapperDefinition> extends MapperDefinition<infer T, infer U> ? MapperCreator<T, U> : never;
38
+ };
39
+ };
40
+ export {};
41
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/mappers/registry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAIpC,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,QAAQ,GAAG,GAAG,EAAE,CAAC,SAAS,cAAc,GAAG,cAAc,IAAI,CAAC,CAChG,cAAc,CAAC,EAAE,IAAI,KAClB,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG;IACnB,WAAW,CAAC,EAAE,SAAS,IAAI,EAAE,CAAA;CAC9B,CAAA;AACD,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;AAC5D,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,QAAQ,GAAG,GAAG,EAAE,CAAC,SAAS,cAAc,GAAG,cAAc,IAAI,CAAC,cAAc,CAAC,EAAE,IAAI,KAAK,MA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C,SAAS,cAAc,EAAE,OAAO,EAAE,SAAS,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AAyBhI,wBAAgB,eAAe,CAAC,CAAC,SAAS,2BAA2B,EACnE,UAAU,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,GACtD,wBAAwB,CAAC,CAAC,CAAC,CAgB7B;AAED,wBAAgB,oBAAoB,CAAC,WAAW,SAAS,SAAS,eAAe,EAAE,EACjF,GAAG,WAAW,EAAE,WAAW,GAC1B,qBAAqB,CAAC,WAAW,CAAC,CAqBpC;AAsCD,KAAK,wBAAwB,CAAC,CAAC,SAAS,2BAA2B,IAAI;KACpE,YAAY,IAAI,MAAM,CAAC,GAAG;SACxB,IAAI,IAAI,MAAM,CAAC,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,EAAE,gBAAgB,CAAC,SAAS,gBAAgB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,GACxH,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,GACnB,KAAK;KACV;CACF,CAAA"}
@@ -0,0 +1,111 @@
1
+ import { EXCHANGES } from "../consts.js";
2
+ import { ONE_SEC_IN_MS } from "../handy.js";
3
+ const THREE_MINUTES_IN_MS = 3 * 60 * ONE_SEC_IN_MS;
4
+ export const MAPPER_KINDS = [
5
+ 'trades',
6
+ 'bookChanges',
7
+ 'derivativeTickers',
8
+ 'optionsSummary',
9
+ 'liquidations',
10
+ 'bookTickers'
11
+ ];
12
+ export const isRealTime = (date) => {
13
+ if (process.env.__NO_REAL_TIME__) {
14
+ return false;
15
+ }
16
+ if (date === undefined) {
17
+ return false;
18
+ }
19
+ return date.valueOf() + THREE_MINUTES_IN_MS > new Date().valueOf();
20
+ };
21
+ export function mapper(entryOrEntries) {
22
+ const entries = Array.isArray(entryOrEntries) ? entryOrEntries : [entryOrEntries];
23
+ validateMapperEntries(entries);
24
+ const createMapper = ((localTimestamp) => {
25
+ if (localTimestamp === undefined || isRealTime(localTimestamp)) {
26
+ return entries[entries.length - 1].use(localTimestamp);
27
+ }
28
+ for (const entry of entries) {
29
+ if (entry.until === undefined || localTimestamp.valueOf() < entry.until.valueOf()) {
30
+ return entry.use(localTimestamp);
31
+ }
32
+ }
33
+ return entries[entries.length - 1].use(localTimestamp);
34
+ });
35
+ createMapper.switchDates = entries.flatMap((entry) => (entry.until === undefined ? [] : [entry.until]));
36
+ return createMapper;
37
+ }
38
+ export function exchangeMappers(definition) {
39
+ validateExchangeMapperKeys(definition);
40
+ const normalized = {};
41
+ for (const [exchange, mappers] of Object.entries(definition)) {
42
+ normalized[exchange] = {};
43
+ for (const kind of MAPPER_KINDS) {
44
+ const createMapper = mappers[kind];
45
+ if (createMapper !== undefined) {
46
+ normalized[exchange][kind] = createMapper;
47
+ }
48
+ }
49
+ }
50
+ return normalized;
51
+ }
52
+ export function mergeExchangeMappers(...definitions) {
53
+ const merged = MAPPER_KINDS.reduce((result, kind) => {
54
+ result[kind] = {};
55
+ return result;
56
+ }, {});
57
+ for (const definition of definitions) {
58
+ for (const [exchange, mappers] of Object.entries(definition)) {
59
+ for (const kind of MAPPER_KINDS) {
60
+ const createMapper = mappers[kind];
61
+ if (createMapper !== undefined) {
62
+ merged[kind][exchange] = createMapper;
63
+ }
64
+ }
65
+ }
66
+ }
67
+ return merged;
68
+ }
69
+ function validateMapperEntries(entries) {
70
+ if (entries.length === 0) {
71
+ throw new Error('mapper requires at least one entry');
72
+ }
73
+ let previousUntil;
74
+ for (let i = 0; i < entries.length; i++) {
75
+ const { until, use } = entries[i];
76
+ if (typeof use !== 'function') {
77
+ throw new Error(`mapper entry ${i} requires a use function`);
78
+ }
79
+ if (i === entries.length - 1) {
80
+ if (until !== undefined) {
81
+ throw new Error('last mapper entry must omit until');
82
+ }
83
+ continue;
84
+ }
85
+ if (until === undefined) {
86
+ throw new Error('only last mapper entry can omit until');
87
+ }
88
+ if (until instanceof Date === false || Number.isFinite(until.valueOf()) === false) {
89
+ throw new Error(`mapper entry ${i} has an invalid until date`);
90
+ }
91
+ if (previousUntil !== undefined && previousUntil.valueOf() >= until.valueOf()) {
92
+ throw new Error('mapper until dates must be strictly increasing');
93
+ }
94
+ previousUntil = until;
95
+ }
96
+ }
97
+ const exchangeIds = new Set(EXCHANGES);
98
+ const mapperKindIds = new Set(MAPPER_KINDS);
99
+ function validateExchangeMapperKeys(definition) {
100
+ for (const [exchange, mappers] of Object.entries(definition)) {
101
+ if (exchangeIds.has(exchange) === false) {
102
+ throw new Error(`Unsupported exchange mapper key: ${exchange}`);
103
+ }
104
+ for (const kind of Object.keys(mappers ?? {})) {
105
+ if (mapperKindIds.has(kind) === false) {
106
+ throw new Error(`Unsupported mapper key for ${exchange}: ${kind}`);
107
+ }
108
+ }
109
+ }
110
+ }
111
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/mappers/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAI3C,MAAM,mBAAmB,GAAG,CAAC,GAAG,EAAE,GAAG,aAAa,CAAA;AA2BlD,MAAM,CAAC,MAAM,YAAY,GAA0B;IACjD,QAAQ;IACR,aAAa;IACb,mBAAmB;IACnB,gBAAgB;IAChB,cAAc;IACd,aAAa;CACd,CAAA;AAuBD,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAW,EAAE,EAAE;IACxC,IAAI,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;QACjC,OAAO,KAAK,CAAA;IACd,CAAC;IACD,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,OAAO,KAAK,CAAA;IACd,CAAC;IACD,OAAO,IAAI,CA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,GAAG,CAAS,YAAY,CAAC,CAAA;AAEnD,SAAS,0BAA0B,CAAC,UAAuC;IACzE,KAAK,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;QAC7D,IAAI,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,KAAK,EAAE,CAAC;YACxC,MAAM,IAAI,KAAK,CAAC,oCAAoC,QAAQ,EAAE,CAAC,CAAA;QACjE,CAAC;QAED,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE,CAAC;YAC9C,IAAI,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,KAAK,EAAE,CAAC;gBACtC,MAAM,IAAI,KAAK,CAAC,8BAA8B,QAAQ,KAAK,IAAI,EAAE,CAAC,CAAA;YACpE,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { BookChange, BookTicker, Trade } from '../types.ts';
2
+ export declare const serumMappers: {
3
+ serum: {
4
+ trades: import("./registry.ts").MapperCreator<"bitmex" | "deribit" | "binance-futures" | "binance-delivery" | "binance-european-options" | "binance" | "ftx" | "okex-futures" | "okex-options" | "okex-swap" | "okex" | "okex-spreads" | "huobi-dm" | "huobi-dm-swap" | "huobi-dm-linear-swap" | "huobi" | "bitfinex-derivatives" | "bitfinex" | "coinbase" | "coinbase-international" | "cryptofacilities" | "kraken" | "bitstamp" | "gemini" | "poloniex" | "bybit" | "bybit-spot" | "bybit-options" | "phemex" | "delta" | "ftx-us" | "binance-us" | "gate-io-futures" | "mexc-futures" | "gate-io" | "okcoin" | "bitflyer" | "hitbtc" | "coinflex" | "binance-jersey" | "binance-dex" | "upbit" | "ascendex" | "dydx" | "dydx-v4" | "serum" | "mango" | "huobi-dm-options" | "star-atlas" | "crypto-com" | "kucoin" | "kucoin-futures" | "bitnomial" | "woo-x" | "blockchain-com" | "bitget" | "bitget-futures" | "hyperliquid" | "lighter" | "bullish" | "mexc" | "polymarket", Trade>;
5
+ bookChanges: import("./registry.ts").MapperCreator<"bitmex" | "deribit" | "binance-futures" | "binance-delivery" | "binance-european-options" | "binance" | "ftx" | "okex-futures" | "okex-options" | "okex-swap" | "okex" | "okex-spreads" | "huobi-dm" | "huobi-dm-swap" | "huobi-dm-linear-swap" | "huobi" | "bitfinex-derivatives" | "bitfinex" | "coinbase" | "coinbase-international" | "cryptofacilities" | "kraken" | "bitstamp" | "gemini" | "poloniex" | "bybit" | "bybit-spot" | "bybit-options" | "phemex" | "delta" | "ftx-us" | "binance-us" | "gate-io-futures" | "mexc-futures" | "gate-io" | "okcoin" | "bitflyer" | "hitbtc" | "coinflex" | "binance-jersey" | "binance-dex" | "upbit" | "ascendex" | "dydx" | "dydx-v4" | "serum" | "mango" | "huobi-dm-options" | "star-atlas" | "crypto-com" | "kucoin" | "kucoin-futures" | "bitnomial" | "woo-x" | "blockchain-com" | "bitget" | "bitget-futures" | "hyperliquid" | "lighter" | "bullish" | "mexc" | "polymarket", BookChange>;
6
+ bookTickers: import("./registry.ts").MapperCreator<"bitmex" | "deribit" | "binance-futures" | "binance-delivery" | "binance-european-options" | "binance" | "ftx" | "okex-futures" | "okex-options" | "okex-swap" | "okex" | "okex-spreads" | "huobi-dm" | "huobi-dm-swap" | "huobi-dm-linear-swap" | "huobi" | "bitfinex-derivatives" | "bitfinex" | "coinbase" | "coinbase-international" | "cryptofacilities" | "kraken" | "bitstamp" | "gemini" | "poloniex" | "bybit" | "bybit-spot" | "bybit-options" | "phemex" | "delta" | "ftx-us" | "binance-us" | "gate-io-futures" | "mexc-futures" | "gate-io" | "okcoin" | "bitflyer" | "hitbtc" | "coinflex" | "binance-jersey" | "binance-dex" | "upbit" | "ascendex" | "dydx" | "dydx-v4" | "serum" | "mango" | "huobi-dm-options" | "star-atlas" | "crypto-com" | "kucoin" | "kucoin-futures" | "bitnomial" | "woo-x" | "blockchain-com" | "bitget" | "bitget-futures" | "hyperliquid" | "lighter" | "bullish" | "mexc" | "polymarket", BookTicker>;
7
+ };
8
+ 'star-atlas': {
9
+ trades: import("./registry.ts").MapperCreator<"bitmex" | "deribit" | "binance-futures" | "binance-delivery" | "binance-european-options" | "binance" | "ftx" | "okex-futures" | "okex-options" | "okex-swap" | "okex" | "okex-spreads" | "huobi-dm" | "huobi-dm-swap" | "huobi-dm-linear-swap" | "huobi" | "bitfinex-derivatives" | "bitfinex" | "coinbase" | "coinbase-international" | "cryptofacilities" | "kraken" | "bitstamp" | "gemini" | "poloniex" | "bybit" | "bybit-spot" | "bybit-options" | "phemex" | "delta" | "ftx-us" | "binance-us" | "gate-io-futures" | "mexc-futures" | "gate-io" | "okcoin" | "bitflyer" | "hitbtc" | "coinflex" | "binance-jersey" | "binance-dex" | "upbit" | "ascendex" | "dydx" | "dydx-v4" | "serum" | "mango" | "huobi-dm-options" | "star-atlas" | "crypto-com" | "kucoin" | "kucoin-futures" | "bitnomial" | "woo-x" | "blockchain-com" | "bitget" | "bitget-futures" | "hyperliquid" | "lighter" | "bullish" | "mexc" | "polymarket", Trade>;
10
+ bookChanges: import("./registry.ts").MapperCreator<"bitmex" | "deribit" | "binance-futures" | "binance-delivery" | "binance-european-options" | "binance" | "ftx" | "okex-futures" | "okex-options" | "okex-swap" | "okex" | "okex-spreads" | "huobi-dm" | "huobi-dm-swap" | "huobi-dm-linear-swap" | "huobi" | "bitfinex-derivatives" | "bitfinex" | "coinbase" | "coinbase-international" | "cryptofacilities" | "kraken" | "bitstamp" | "gemini" | "poloniex" | "bybit" | "bybit-spot" | "bybit-options" | "phemex" | "delta" | "ftx-us" | "binance-us" | "gate-io-futures" | "mexc-futures" | "gate-io" | "okcoin" | "bitflyer" | "hitbtc" | "coinflex" | "binance-jersey" | "binance-dex" | "upbit" | "ascendex" | "dydx" | "dydx-v4" | "serum" | "mango" | "huobi-dm-options" | "star-atlas" | "crypto-com" | "kucoin" | "kucoin-futures" | "bitnomial" | "woo-x" | "blockchain-com" | "bitget" | "bitget-futures" | "hyperliquid" | "lighter" | "bullish" | "mexc" | "polymarket", BookChange>;
11
+ bookTickers: import("./registry.ts").MapperCreator<"bitmex" | "deribit" | "binance-futures" | "binance-delivery" | "binance-european-options" | "binance" | "ftx" | "okex-futures" | "okex-options" | "okex-swap" | "okex" | "okex-spreads" | "huobi-dm" | "huobi-dm-swap" | "huobi-dm-linear-swap" | "huobi" | "bitfinex-derivatives" | "bitfinex" | "coinbase" | "coinbase-international" | "cryptofacilities" | "kraken" | "bitstamp" | "gemini" | "poloniex" | "bybit" | "bybit-spot" | "bybit-options" | "phemex" | "delta" | "ftx-us" | "binance-us" | "gate-io-futures" | "mexc-futures" | "gate-io" | "okcoin" | "bitflyer" | "hitbtc" | "coinflex" | "binance-jersey" | "binance-dex" | "upbit" | "ascendex" | "dydx" | "dydx-v4" | "serum" | "mango" | "huobi-dm-options" | "star-atlas" | "crypto-com" | "kucoin" | "kucoin-futures" | "bitnomial" | "woo-x" | "blockchain-com" | "bitget" | "bitget-futures" | "hyperliquid" | "lighter" | "bullish" | "mexc" | "polymarket", BookTicker>;
12
+ };
13
+ mango: {
14
+ trades: import("./registry.ts").MapperCreator<"bitmex" | "deribit" | "binance-futures" | "binance-delivery" | "binance-european-options" | "binance" | "ftx" | "okex-futures" | "okex-options" | "okex-swap" | "okex" | "okex-spreads" | "huobi-dm" | "huobi-dm-swap" | "huobi-dm-linear-swap" | "huobi" | "bitfinex-derivatives" | "bitfinex" | "coinbase" | "coinbase-international" | "cryptofacilities" | "kraken" | "bitstamp" | "gemini" | "poloniex" | "bybit" | "bybit-spot" | "bybit-options" | "phemex" | "delta" | "ftx-us" | "binance-us" | "gate-io-futures" | "mexc-futures" | "gate-io" | "okcoin" | "bitflyer" | "hitbtc" | "coinflex" | "binance-jersey" | "binance-dex" | "upbit" | "ascendex" | "dydx" | "dydx-v4" | "serum" | "mango" | "huobi-dm-options" | "star-atlas" | "crypto-com" | "kucoin" | "kucoin-futures" | "bitnomial" | "woo-x" | "blockchain-com" | "bitget" | "bitget-futures" | "hyperliquid" | "lighter" | "bullish" | "mexc" | "polymarket", Trade>;
15
+ bookChanges: import("./registry.ts").MapperCreator<"bitmex" | "deribit" | "binance-futures" | "binance-delivery" | "binance-european-options" | "binance" | "ftx" | "okex-futures" | "okex-options" | "okex-swap" | "okex" | "okex-spreads" | "huobi-dm" | "huobi-dm-swap" | "huobi-dm-linear-swap" | "huobi" | "bitfinex-derivatives" | "bitfinex" | "coinbase" | "coinbase-international" | "cryptofacilities" | "kraken" | "bitstamp" | "gemini" | "poloniex" | "bybit" | "bybit-spot" | "bybit-options" | "phemex" | "delta" | "ftx-us" | "binance-us" | "gate-io-futures" | "mexc-futures" | "gate-io" | "okcoin" | "bitflyer" | "hitbtc" | "coinflex" | "binance-jersey" | "binance-dex" | "upbit" | "ascendex" | "dydx" | "dydx-v4" | "serum" | "mango" | "huobi-dm-options" | "star-atlas" | "crypto-com" | "kucoin" | "kucoin-futures" | "bitnomial" | "woo-x" | "blockchain-com" | "bitget" | "bitget-futures" | "hyperliquid" | "lighter" | "bullish" | "mexc" | "polymarket", BookChange>;
16
+ bookTickers: import("./registry.ts").MapperCreator<"bitmex" | "deribit" | "binance-futures" | "binance-delivery" | "binance-european-options" | "binance" | "ftx" | "okex-futures" | "okex-options" | "okex-swap" | "okex" | "okex-spreads" | "huobi-dm" | "huobi-dm-swap" | "huobi-dm-linear-swap" | "huobi" | "bitfinex-derivatives" | "bitfinex" | "coinbase" | "coinbase-international" | "cryptofacilities" | "kraken" | "bitstamp" | "gemini" | "poloniex" | "bybit" | "bybit-spot" | "bybit-options" | "phemex" | "delta" | "ftx-us" | "binance-us" | "gate-io-futures" | "mexc-futures" | "gate-io" | "okcoin" | "bitflyer" | "hitbtc" | "coinflex" | "binance-jersey" | "binance-dex" | "upbit" | "ascendex" | "dydx" | "dydx-v4" | "serum" | "mango" | "huobi-dm-options" | "star-atlas" | "crypto-com" | "kucoin" | "kucoin-futures" | "bitnomial" | "woo-x" | "blockchain-com" | "bitget" | "bitget-futures" | "hyperliquid" | "lighter" | "bullish" | "mexc" | "polymarket", BookTicker>;
17
+ };
18
+ };
19
+ //# sourceMappingURL=serum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serum.d.ts","sourceRoot":"","sources":["../../src/mappers/serum.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAY,KAAK,EAAE,MAAM,aAAa,CAAA;AAIrE,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;CAgBvB,CAAA"}
@@ -0,0 +1,127 @@
1
+ import { asNonZeroNumberOrUndefined, upperCaseSymbols } from "../handy.js";
2
+ import { exchangeMappers } from "./registry.js";
3
+ export const serumMappers = exchangeMappers({
4
+ serum: {
5
+ trades: () => new SerumTradesMapper('serum'),
6
+ bookChanges: () => new SerumBookChangeMapper('serum'),
7
+ bookTickers: () => new SerumBookTickerMapper('serum')
8
+ },
9
+ 'star-atlas': {
10
+ trades: () => new SerumTradesMapper('star-atlas'),
11
+ bookChanges: () => new SerumBookChangeMapper('star-atlas'),
12
+ bookTickers: () => new SerumBookTickerMapper('star-atlas')
13
+ },
14
+ mango: {
15
+ trades: () => new SerumTradesMapper('mango'),
16
+ bookChanges: () => new SerumBookChangeMapper('mango'),
17
+ bookTickers: () => new SerumBookTickerMapper('mango')
18
+ }
19
+ });
20
+ class SerumTradesMapper {
21
+ _exchange;
22
+ constructor(_exchange) {
23
+ this._exchange = _exchange;
24
+ }
25
+ canHandle(message) {
26
+ return message.type === 'trade';
27
+ }
28
+ getFilters(symbols) {
29
+ if (this._exchange === 'serum') {
30
+ symbols = upperCaseSymbols(symbols);
31
+ }
32
+ return [
33
+ {
34
+ channel: 'trade',
35
+ symbols
36
+ }
37
+ ];
38
+ }
39
+ *map(message, localTimestamp) {
40
+ yield {
41
+ type: 'trade',
42
+ symbol: message.market.toUpperCase(),
43
+ exchange: this._exchange,
44
+ id: message.id,
45
+ price: Number(message.price),
46
+ amount: Number(message.size),
47
+ side: message.side,
48
+ timestamp: message.eventTimestamp !== undefined ? new Date(message.eventTimestamp) : new Date(message.timestamp),
49
+ localTimestamp
50
+ };
51
+ }
52
+ }
53
+ class SerumBookChangeMapper {
54
+ _exchange;
55
+ constructor(_exchange) {
56
+ this._exchange = _exchange;
57
+ }
58
+ canHandle(message) {
59
+ return message.type === 'l2snapshot' || message.type === 'l2update';
60
+ }
61
+ getFilters(symbols) {
62
+ if (this._exchange === 'serum') {
63
+ symbols = upperCaseSymbols(symbols);
64
+ }
65
+ return [
66
+ {
67
+ channel: 'l2snapshot',
68
+ symbols
69
+ },
70
+ {
71
+ channel: 'l2update',
72
+ symbols
73
+ }
74
+ ];
75
+ }
76
+ *map(message, localTimestamp) {
77
+ yield {
78
+ type: 'book_change',
79
+ symbol: message.market.toUpperCase(),
80
+ exchange: this._exchange,
81
+ isSnapshot: message.type === 'l2snapshot',
82
+ bids: message.bids.map(this.mapBookLevel),
83
+ asks: message.asks.map(this.mapBookLevel),
84
+ timestamp: new Date(message.timestamp),
85
+ localTimestamp
86
+ };
87
+ }
88
+ mapBookLevel(level) {
89
+ const price = Number(level[0]);
90
+ const amount = Number(level[1]);
91
+ return { price, amount };
92
+ }
93
+ }
94
+ class SerumBookTickerMapper {
95
+ _exchange;
96
+ constructor(_exchange) {
97
+ this._exchange = _exchange;
98
+ }
99
+ canHandle(message) {
100
+ return message.type === 'quote';
101
+ }
102
+ getFilters(symbols) {
103
+ if (this._exchange === 'serum') {
104
+ symbols = upperCaseSymbols(symbols);
105
+ }
106
+ return [
107
+ {
108
+ channel: 'quote',
109
+ symbols
110
+ }
111
+ ];
112
+ }
113
+ *map(message, localTimestamp) {
114
+ yield {
115
+ type: 'book_ticker',
116
+ symbol: message.market.toUpperCase(),
117
+ exchange: this._exchange,
118
+ askAmount: asNonZeroNumberOrUndefined(message.bestAsk?.[1]),
119
+ askPrice: asNonZeroNumberOrUndefined(message.bestAsk?.[0]),
120
+ bidPrice: asNonZeroNumberOrUndefined(message.bestBid?.[0]),
121
+ bidAmount: asNonZeroNumberOrUndefined(message.bestBid?.[1]),
122
+ timestamp: new Date(message.timestamp),
123
+ localTimestamp: localTimestamp
124
+ };
125
+ }
126
+ }
127
+ //# sourceMappingURL=serum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serum.js","sourceRoot":"","sources":["../../src/mappers/serum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAG1E,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAE/C,MAAM,CAAC,MAAM,YAAY,GAAG,eAAe,CAAC;IAC1C,KAAK,EAAE;QACL,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,iBAAiB,CAAC,OAAO,CAAC;QAC5C,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,qBAAqB,CAAC,OAAO,CAAC;QACrD,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,qBAAqB,CAAC,OAAO,CAAC;KACtD;IACD,YAAY,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,iBAAiB,CAAC,YAAY,CAAC;QACjD,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,qBAAqB,CAAC,YAAY,CAAC;QAC1D,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,qBAAqB,CAAC,YAAY,CAAC;KAC3D;IACD,KAAK,EAAE;QACL,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,iBAAiB,CAAC,OAAO,CAAC;QAC5C,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,qBAAqB,CAAC,OAAO,CAAC;QACrD,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,qBAAqB,CAAC,OAAO,CAAC;KACtD;CACF,CAAC,CAAA;AAEF,MAAM,iBAAiB;IACQ;IAA7B,YAA6B,SAAmB;QAAnB,cAAS,GAAT,SAAS,CAAU;I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AC;IAED,CAAC,GAAG,CAAC,OAAuB,EAAE,cAAoB;QAChD,MAAM;YACJ,IAAI,EAAE,aAAa;YACnB,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE;YACpC,QAAQ,EAAE,IAAI,CAAC,SAAS;YAExB,SAAS,EAAE,0BAA0B,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;YAC3D,QAAQ,EAAE,0BAA0B,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;YAE1D,QAAQ,EAAE,0BAA0B,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;YAC1D,SAAS,EAAE,0BAA0B,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;YAC3D,SAAS,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;YACtC,cAAc,EAAE,cAAc;SAC/B,CAAA;IACH,CAAC;CACF"}
@@ -0,0 +1,8 @@
1
+ import { BookChange, Trade } from '../types.ts';
2
+ export declare const upbitMappers: {
3
+ upbit: {
4
+ trades: import("./registry.ts").MapperCreator<"bitmex" | "deribit" | "binance-futures" | "binance-delivery" | "binance-european-options" | "binance" | "ftx" | "okex-futures" | "okex-options" | "okex-swap" | "okex" | "okex-spreads" | "huobi-dm" | "huobi-dm-swap" | "huobi-dm-linear-swap" | "huobi" | "bitfinex-derivatives" | "bitfinex" | "coinbase" | "coinbase-international" | "cryptofacilities" | "kraken" | "bitstamp" | "gemini" | "poloniex" | "bybit" | "bybit-spot" | "bybit-options" | "phemex" | "delta" | "ftx-us" | "binance-us" | "gate-io-futures" | "mexc-futures" | "gate-io" | "okcoin" | "bitflyer" | "hitbtc" | "coinflex" | "binance-jersey" | "binance-dex" | "upbit" | "ascendex" | "dydx" | "dydx-v4" | "serum" | "mango" | "huobi-dm-options" | "star-atlas" | "crypto-com" | "kucoin" | "kucoin-futures" | "bitnomial" | "woo-x" | "blockchain-com" | "bitget" | "bitget-futures" | "hyperliquid" | "lighter" | "bullish" | "mexc" | "polymarket", Trade>;
5
+ bookChanges: import("./registry.ts").MapperCreator<"bitmex" | "deribit" | "binance-futures" | "binance-delivery" | "binance-european-options" | "binance" | "ftx" | "okex-futures" | "okex-options" | "okex-swap" | "okex" | "okex-spreads" | "huobi-dm" | "huobi-dm-swap" | "huobi-dm-linear-swap" | "huobi" | "bitfinex-derivatives" | "bitfinex" | "coinbase" | "coinbase-international" | "cryptofacilities" | "kraken" | "bitstamp" | "gemini" | "poloniex" | "bybit" | "bybit-spot" | "bybit-options" | "phemex" | "delta" | "ftx-us" | "binance-us" | "gate-io-futures" | "mexc-futures" | "gate-io" | "okcoin" | "bitflyer" | "hitbtc" | "coinflex" | "binance-jersey" | "binance-dex" | "upbit" | "ascendex" | "dydx" | "dydx-v4" | "serum" | "mango" | "huobi-dm-options" | "star-atlas" | "crypto-com" | "kucoin" | "kucoin-futures" | "bitnomial" | "woo-x" | "blockchain-com" | "bitget" | "bitget-futures" | "hyperliquid" | "lighter" | "bullish" | "mexc" | "polymarket", BookChange>;
6
+ };
7
+ };
8
+ //# sourceMappingURL=upbit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upbit.d.ts","sourceRoot":"","sources":["../../src/mappers/upbit.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAkB,KAAK,EAAE,MAAM,aAAa,CAAA;AAI/D,eAAO,MAAM,YAAY;;;;;CAKvB,CAAA"}