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.
- package/bin/tardis-machine.js +68 -57
- package/dist/tardismachine.d.ts.map +1 -1
- package/dist/tardismachine.js +13 -6
- package/dist/tardismachine.js.map +1 -1
- package/node_modules/debug/LICENSE +20 -0
- package/node_modules/debug/README.md +481 -0
- package/node_modules/debug/package.json +64 -0
- package/node_modules/debug/src/browser.js +272 -0
- package/node_modules/debug/src/common.js +292 -0
- package/node_modules/debug/src/index.js +10 -0
- package/node_modules/debug/src/node.js +263 -0
- package/node_modules/follow-redirects/LICENSE +18 -0
- package/node_modules/follow-redirects/README.md +157 -0
- package/node_modules/follow-redirects/debug.js +15 -0
- package/node_modules/follow-redirects/http.js +1 -0
- package/node_modules/follow-redirects/https.js +1 -0
- package/node_modules/follow-redirects/index.js +709 -0
- package/node_modules/follow-redirects/package.json +58 -0
- package/node_modules/long/LICENSE +202 -0
- package/node_modules/long/README.md +286 -0
- package/node_modules/long/index.d.ts +2 -0
- package/node_modules/long/index.js +1581 -0
- package/node_modules/long/package.json +58 -0
- package/node_modules/long/types.d.ts +474 -0
- package/node_modules/long/umd/index.d.ts +3 -0
- package/node_modules/long/umd/index.js +1622 -0
- package/node_modules/long/umd/package.json +3 -0
- package/node_modules/long/umd/types.d.ts +474 -0
- package/node_modules/ms/index.js +162 -0
- package/node_modules/ms/license.md +21 -0
- package/node_modules/ms/package.json +38 -0
- package/node_modules/ms/readme.md +59 -0
- package/node_modules/protobufjs/LICENSE +39 -0
- package/node_modules/protobufjs/README.md +440 -0
- package/node_modules/protobufjs/dist/light/protobuf.js +9276 -0
- package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -0
- package/node_modules/protobufjs/dist/light/protobuf.min.js +8 -0
- package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -0
- package/node_modules/protobufjs/dist/minimal/protobuf.js +3556 -0
- package/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -0
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +8 -0
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -0
- package/node_modules/protobufjs/dist/protobuf.js +11233 -0
- package/node_modules/protobufjs/dist/protobuf.js.map +1 -0
- package/node_modules/protobufjs/dist/protobuf.min.js +8 -0
- package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -0
- package/node_modules/protobufjs/ext/README.md +70 -0
- package/node_modules/protobufjs/ext/debug/README.md +4 -0
- package/node_modules/protobufjs/ext/debug/index.js +71 -0
- package/node_modules/protobufjs/ext/descriptor/README.md +5 -0
- package/node_modules/protobufjs/ext/descriptor/index.d.ts +2 -0
- package/node_modules/protobufjs/ext/descriptor/index.js +2 -0
- package/node_modules/protobufjs/ext/descriptor.d.ts +87 -0
- package/node_modules/protobufjs/ext/descriptor.generated.d.ts +417 -0
- package/node_modules/protobufjs/ext/descriptor.js +1356 -0
- package/node_modules/protobufjs/ext/protojson.LICENSE +201 -0
- package/node_modules/protobufjs/ext/protojson.d.ts +20 -0
- package/node_modules/protobufjs/ext/protojson.generated.d.ts +49 -0
- package/node_modules/protobufjs/ext/protojson.js +951 -0
- package/node_modules/protobufjs/ext/textformat.d.ts +19 -0
- package/node_modules/protobufjs/ext/textformat.generated.d.ts +33 -0
- package/node_modules/protobufjs/ext/textformat.js +1276 -0
- package/node_modules/protobufjs/google/LICENSE +27 -0
- package/node_modules/protobufjs/google/README.md +1 -0
- package/node_modules/protobufjs/google/api/annotations.json +85 -0
- package/node_modules/protobufjs/google/api/annotations.proto +11 -0
- package/node_modules/protobufjs/google/api/http.json +87 -0
- package/node_modules/protobufjs/google/api/http.proto +31 -0
- package/node_modules/protobufjs/google/protobuf/api.json +124 -0
- package/node_modules/protobufjs/google/protobuf/api.proto +34 -0
- package/node_modules/protobufjs/google/protobuf/compiler/plugin.json +126 -0
- package/node_modules/protobufjs/google/protobuf/compiler/plugin.proto +47 -0
- package/node_modules/protobufjs/google/protobuf/descriptor.json +1465 -0
- package/node_modules/protobufjs/google/protobuf/descriptor.proto +527 -0
- package/node_modules/protobufjs/google/protobuf/source_context.json +21 -0
- package/node_modules/protobufjs/google/protobuf/source_context.proto +7 -0
- package/node_modules/protobufjs/google/protobuf/type.json +209 -0
- package/node_modules/protobufjs/google/protobuf/type.proto +89 -0
- package/node_modules/protobufjs/index.d.ts +3203 -0
- package/node_modules/protobufjs/index.js +4 -0
- package/node_modules/protobufjs/light.d.ts +2 -0
- package/node_modules/protobufjs/light.js +4 -0
- package/node_modules/protobufjs/minimal.d.ts +2 -0
- package/node_modules/protobufjs/minimal.js +4 -0
- package/node_modules/protobufjs/package.json +93 -0
- package/node_modules/protobufjs/src/common.js +405 -0
- package/node_modules/protobufjs/src/converter.js +352 -0
- package/node_modules/protobufjs/src/decoder.js +279 -0
- package/node_modules/protobufjs/src/encoder.js +123 -0
- package/node_modules/protobufjs/src/enum.js +239 -0
- package/node_modules/protobufjs/src/field.js +505 -0
- package/node_modules/protobufjs/src/index-light.js +104 -0
- package/node_modules/protobufjs/src/index-minimal.js +35 -0
- package/node_modules/protobufjs/src/index.js +12 -0
- package/node_modules/protobufjs/src/mapfield.js +144 -0
- package/node_modules/protobufjs/src/message.js +137 -0
- package/node_modules/protobufjs/src/method.js +183 -0
- package/node_modules/protobufjs/src/namespace.js +574 -0
- package/node_modules/protobufjs/src/object.js +392 -0
- package/node_modules/protobufjs/src/oneof.js +233 -0
- package/node_modules/protobufjs/src/parse.js +1111 -0
- package/node_modules/protobufjs/src/reader.js +788 -0
- package/node_modules/protobufjs/src/reader_buffer.js +77 -0
- package/node_modules/protobufjs/src/root.js +424 -0
- package/node_modules/protobufjs/src/roots.js +18 -0
- package/node_modules/protobufjs/src/rpc/service.js +155 -0
- package/node_modules/protobufjs/src/rpc.js +36 -0
- package/node_modules/protobufjs/src/service.js +206 -0
- package/node_modules/protobufjs/src/tokenize.js +421 -0
- package/node_modules/protobufjs/src/type.js +676 -0
- package/node_modules/protobufjs/src/types.js +196 -0
- package/node_modules/protobufjs/src/typescript.js +25 -0
- package/node_modules/protobufjs/src/util/aspromise.d.ts +13 -0
- package/node_modules/protobufjs/src/util/aspromise.js +52 -0
- package/node_modules/protobufjs/src/util/base64.d.ts +32 -0
- package/node_modules/protobufjs/src/util/base64.js +146 -0
- package/node_modules/protobufjs/src/util/codegen.d.ts +31 -0
- package/node_modules/protobufjs/src/util/codegen.js +118 -0
- package/node_modules/protobufjs/src/util/eventemitter.d.ts +45 -0
- package/node_modules/protobufjs/src/util/eventemitter.js +86 -0
- package/node_modules/protobufjs/src/util/fetch.d.ts +56 -0
- package/node_modules/protobufjs/src/util/fetch.js +112 -0
- package/node_modules/protobufjs/src/util/float.d.ts +83 -0
- package/node_modules/protobufjs/src/util/float.js +335 -0
- package/node_modules/protobufjs/src/util/fs.js +11 -0
- package/node_modules/protobufjs/src/util/longbits.js +204 -0
- package/node_modules/protobufjs/src/util/minimal.js +511 -0
- package/node_modules/protobufjs/src/util/path.d.ts +22 -0
- package/node_modules/protobufjs/src/util/path.js +100 -0
- package/node_modules/protobufjs/src/util/patterns.js +7 -0
- package/node_modules/protobufjs/src/util/pool.d.ts +32 -0
- package/node_modules/protobufjs/src/util/pool.js +48 -0
- package/node_modules/protobufjs/src/util/utf8.d.ts +24 -0
- package/node_modules/protobufjs/src/util/utf8.js +190 -0
- package/node_modules/protobufjs/src/util.js +264 -0
- package/node_modules/protobufjs/src/verifier.js +185 -0
- package/node_modules/protobufjs/src/wrappers.js +106 -0
- package/node_modules/protobufjs/src/writer.js +700 -0
- package/node_modules/protobufjs/src/writer_buffer.js +100 -0
- package/node_modules/protobufjs/tsconfig.json +6 -0
- package/node_modules/tardis-dev/LICENSE +373 -0
- package/node_modules/tardis-dev/README.md +275 -0
- package/node_modules/tardis-dev/dist/apikeyaccessinfo.d.ts +11 -0
- package/node_modules/tardis-dev/dist/apikeyaccessinfo.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/apikeyaccessinfo.js +13 -0
- package/node_modules/tardis-dev/dist/apikeyaccessinfo.js.map +1 -0
- package/node_modules/tardis-dev/dist/binarysplit.d.ts +8 -0
- package/node_modules/tardis-dev/dist/binarysplit.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/binarysplit.js +41 -0
- package/node_modules/tardis-dev/dist/binarysplit.js.map +1 -0
- package/node_modules/tardis-dev/dist/boundedqueue.d.ts +19 -0
- package/node_modules/tardis-dev/dist/boundedqueue.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/boundedqueue.js +96 -0
- package/node_modules/tardis-dev/dist/boundedqueue.js.map +1 -0
- package/node_modules/tardis-dev/dist/clearcache.d.ts +4 -0
- package/node_modules/tardis-dev/dist/clearcache.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/clearcache.js +48 -0
- package/node_modules/tardis-dev/dist/clearcache.js.map +1 -0
- package/node_modules/tardis-dev/dist/combine.d.ts +14 -0
- package/node_modules/tardis-dev/dist/combine.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/combine.js +97 -0
- package/node_modules/tardis-dev/dist/combine.js.map +1 -0
- package/node_modules/tardis-dev/dist/computable/booksnapshot.d.ts +14 -0
- package/node_modules/tardis-dev/dist/computable/booksnapshot.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/computable/booksnapshot.js +248 -0
- package/node_modules/tardis-dev/dist/computable/booksnapshot.js.map +1 -0
- package/node_modules/tardis-dev/dist/computable/computable.d.ts +8 -0
- package/node_modules/tardis-dev/dist/computable/computable.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/computable/computable.js +72 -0
- package/node_modules/tardis-dev/dist/computable/computable.js.map +1 -0
- package/node_modules/tardis-dev/dist/computable/context.d.ts +4 -0
- package/node_modules/tardis-dev/dist/computable/context.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/computable/context.js +9 -0
- package/node_modules/tardis-dev/dist/computable/context.js.map +1 -0
- package/node_modules/tardis-dev/dist/computable/index.d.ts +4 -0
- package/node_modules/tardis-dev/dist/computable/index.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/computable/index.js +4 -0
- package/node_modules/tardis-dev/dist/computable/index.js.map +1 -0
- package/node_modules/tardis-dev/dist/computable/tradebar.d.ts +11 -0
- package/node_modules/tardis-dev/dist/computable/tradebar.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/computable/tradebar.js +132 -0
- package/node_modules/tardis-dev/dist/computable/tradebar.js.map +1 -0
- package/node_modules/tardis-dev/dist/consts.d.ts +66 -0
- package/node_modules/tardis-dev/dist/consts.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/consts.js +573 -0
- package/node_modules/tardis-dev/dist/consts.js.map +1 -0
- package/node_modules/tardis-dev/dist/debug.d.ts +3 -0
- package/node_modules/tardis-dev/dist/debug.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/debug.js +3 -0
- package/node_modules/tardis-dev/dist/debug.js.map +1 -0
- package/node_modules/tardis-dev/dist/downloaddatasets.d.ts +25 -0
- package/node_modules/tardis-dev/dist/downloaddatasets.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/downloaddatasets.js +118 -0
- package/node_modules/tardis-dev/dist/downloaddatasets.js.map +1 -0
- package/node_modules/tardis-dev/dist/exchangedetails.d.ts +91 -0
- package/node_modules/tardis-dev/dist/exchangedetails.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/exchangedetails.js +8 -0
- package/node_modules/tardis-dev/dist/exchangedetails.js.map +1 -0
- package/node_modules/tardis-dev/dist/filter.d.ts +8 -0
- package/node_modules/tardis-dev/dist/filter.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/filter.js +51 -0
- package/node_modules/tardis-dev/dist/filter.js.map +1 -0
- package/node_modules/tardis-dev/dist/foreachconcurrent.d.ts +2 -0
- package/node_modules/tardis-dev/dist/foreachconcurrent.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/foreachconcurrent.js +28 -0
- package/node_modules/tardis-dev/dist/foreachconcurrent.js.map +1 -0
- package/node_modules/tardis-dev/dist/handy.d.ts +102 -0
- package/node_modules/tardis-dev/dist/handy.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/handy.js +706 -0
- package/node_modules/tardis-dev/dist/handy.js.map +1 -0
- package/node_modules/tardis-dev/dist/index.d.ts +17 -0
- package/node_modules/tardis-dev/dist/index.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/index.js +17 -0
- package/node_modules/tardis-dev/dist/index.js.map +1 -0
- package/node_modules/tardis-dev/dist/instrumentinfo.d.ts +105 -0
- package/node_modules/tardis-dev/dist/instrumentinfo.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/instrumentinfo.js +59 -0
- package/node_modules/tardis-dev/dist/instrumentinfo.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/ascendex.d.ts +10 -0
- package/node_modules/tardis-dev/dist/mappers/ascendex.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/ascendex.js +146 -0
- package/node_modules/tardis-dev/dist/mappers/ascendex.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/binance.d.ts +32 -0
- package/node_modules/tardis-dev/dist/mappers/binance.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/binance.js +420 -0
- package/node_modules/tardis-dev/dist/mappers/binance.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/binancedex.d.ts +9 -0
- package/node_modules/tardis-dev/dist/mappers/binancedex.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/binancedex.js +120 -0
- package/node_modules/tardis-dev/dist/mappers/binancedex.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/binanceeuropeanoptions.d.ts +10 -0
- package/node_modules/tardis-dev/dist/mappers/binanceeuropeanoptions.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/binanceeuropeanoptions.js +389 -0
- package/node_modules/tardis-dev/dist/mappers/binanceeuropeanoptions.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/bitfinex.d.ts +16 -0
- package/node_modules/tardis-dev/dist/mappers/bitfinex.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/bitfinex.js +352 -0
- package/node_modules/tardis-dev/dist/mappers/bitfinex.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/bitflyer.d.ts +9 -0
- package/node_modules/tardis-dev/dist/mappers/bitflyer.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/bitflyer.js +121 -0
- package/node_modules/tardis-dev/dist/mappers/bitflyer.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/bitget.d.ts +16 -0
- package/node_modules/tardis-dev/dist/mappers/bitget.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/bitget.js +335 -0
- package/node_modules/tardis-dev/dist/mappers/bitget.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/bitmex.d.ts +11 -0
- package/node_modules/tardis-dev/dist/mappers/bitmex.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/bitmex.js +248 -0
- package/node_modules/tardis-dev/dist/mappers/bitmex.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/bitnomial.d.ts +8 -0
- package/node_modules/tardis-dev/dist/mappers/bitnomial.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/bitnomial.js +91 -0
- package/node_modules/tardis-dev/dist/mappers/bitnomial.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/bitstamp.d.ts +8 -0
- package/node_modules/tardis-dev/dist/mappers/bitstamp.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/bitstamp.js +151 -0
- package/node_modules/tardis-dev/dist/mappers/bitstamp.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/blockchaincom.d.ts +8 -0
- package/node_modules/tardis-dev/dist/mappers/blockchaincom.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/blockchaincom.js +65 -0
- package/node_modules/tardis-dev/dist/mappers/blockchaincom.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/bullish.d.ts +11 -0
- package/node_modules/tardis-dev/dist/mappers/bullish.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/bullish.js +234 -0
- package/node_modules/tardis-dev/dist/mappers/bullish.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/bybit.d.ts +66 -0
- package/node_modules/tardis-dev/dist/mappers/bybit.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/bybit.js +601 -0
- package/node_modules/tardis-dev/dist/mappers/bybit.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/bybitspot.d.ts +96 -0
- package/node_modules/tardis-dev/dist/mappers/bybitspot.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/bybitspot.js +99 -0
- package/node_modules/tardis-dev/dist/mappers/bybitspot.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/coinbase.d.ts +9 -0
- package/node_modules/tardis-dev/dist/mappers/coinbase.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/coinbase.js +176 -0
- package/node_modules/tardis-dev/dist/mappers/coinbase.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/coinbaseinternational.d.ts +10 -0
- package/node_modules/tardis-dev/dist/mappers/coinbaseinternational.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/coinbaseinternational.js +210 -0
- package/node_modules/tardis-dev/dist/mappers/coinbaseinternational.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/coinflex.d.ts +9 -0
- package/node_modules/tardis-dev/dist/mappers/coinflex.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/coinflex.js +111 -0
- package/node_modules/tardis-dev/dist/mappers/coinflex.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/cryptocom.d.ts +25 -0
- package/node_modules/tardis-dev/dist/mappers/cryptocom.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/cryptocom.js +219 -0
- package/node_modules/tardis-dev/dist/mappers/cryptocom.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/cryptofacilities.d.ts +11 -0
- package/node_modules/tardis-dev/dist/mappers/cryptofacilities.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/cryptofacilities.js +199 -0
- package/node_modules/tardis-dev/dist/mappers/cryptofacilities.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/delta.d.ts +10 -0
- package/node_modules/tardis-dev/dist/mappers/delta.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/delta.js +205 -0
- package/node_modules/tardis-dev/dist/mappers/delta.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/deribit.d.ts +12 -0
- package/node_modules/tardis-dev/dist/mappers/deribit.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/deribit.js +278 -0
- package/node_modules/tardis-dev/dist/mappers/deribit.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/dydx.d.ts +9 -0
- package/node_modules/tardis-dev/dist/mappers/dydx.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/dydx.js +188 -0
- package/node_modules/tardis-dev/dist/mappers/dydx.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/dydxv4.d.ts +10 -0
- package/node_modules/tardis-dev/dist/mappers/dydxv4.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/dydxv4.js +189 -0
- package/node_modules/tardis-dev/dist/mappers/dydxv4.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/ftx.d.ts +16 -0
- package/node_modules/tardis-dev/dist/mappers/ftx.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/ftx.js +222 -0
- package/node_modules/tardis-dev/dist/mappers/ftx.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/gateio.d.ts +9 -0
- package/node_modules/tardis-dev/dist/mappers/gateio.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/gateio.js +370 -0
- package/node_modules/tardis-dev/dist/mappers/gateio.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/gateiofutures.d.ts +10 -0
- package/node_modules/tardis-dev/dist/mappers/gateiofutures.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/gateiofutures.js +183 -0
- package/node_modules/tardis-dev/dist/mappers/gateiofutures.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/gemini.d.ts +9 -0
- package/node_modules/tardis-dev/dist/mappers/gemini.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/gemini.js +145 -0
- package/node_modules/tardis-dev/dist/mappers/gemini.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/hitbtc.d.ts +8 -0
- package/node_modules/tardis-dev/dist/mappers/hitbtc.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/hitbtc.js +76 -0
- package/node_modules/tardis-dev/dist/mappers/hitbtc.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/huobi.d.ts +125 -0
- package/node_modules/tardis-dev/dist/mappers/huobi.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/huobi.js +529 -0
- package/node_modules/tardis-dev/dist/mappers/huobi.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/hyperliquid.d.ts +10 -0
- package/node_modules/tardis-dev/dist/mappers/hyperliquid.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/hyperliquid.js +161 -0
- package/node_modules/tardis-dev/dist/mappers/hyperliquid.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/index.d.ts +788 -0
- package/node_modules/tardis-dev/dist/mappers/index.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/index.js +66 -0
- package/node_modules/tardis-dev/dist/mappers/index.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/kraken.d.ts +9 -0
- package/node_modules/tardis-dev/dist/mappers/kraken.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/kraken.js +238 -0
- package/node_modules/tardis-dev/dist/mappers/kraken.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/kucoin.d.ts +9 -0
- package/node_modules/tardis-dev/dist/mappers/kucoin.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/kucoin.js +237 -0
- package/node_modules/tardis-dev/dist/mappers/kucoin.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/kucoinfutures.d.ts +10 -0
- package/node_modules/tardis-dev/dist/mappers/kucoinfutures.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/kucoinfutures.js +302 -0
- package/node_modules/tardis-dev/dist/mappers/kucoinfutures.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/lighter.d.ts +11 -0
- package/node_modules/tardis-dev/dist/mappers/lighter.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/lighter.js +186 -0
- package/node_modules/tardis-dev/dist/mappers/lighter.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/mapper.d.ts +32 -0
- package/node_modules/tardis-dev/dist/mappers/mapper.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/mapper.js +120 -0
- package/node_modules/tardis-dev/dist/mappers/mapper.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/mexc.d.ts +122 -0
- package/node_modules/tardis-dev/dist/mappers/mexc.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/mexc.js +205 -0
- package/node_modules/tardis-dev/dist/mappers/mexc.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/mexcfutures.d.ts +137 -0
- package/node_modules/tardis-dev/dist/mappers/mexcfutures.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/mexcfutures.js +225 -0
- package/node_modules/tardis-dev/dist/mappers/mexcfutures.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/okex.d.ts +39 -0
- package/node_modules/tardis-dev/dist/mappers/okex.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/okex.js +913 -0
- package/node_modules/tardis-dev/dist/mappers/okex.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/okexspreads.d.ts +69 -0
- package/node_modules/tardis-dev/dist/mappers/okexspreads.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/okexspreads.js +116 -0
- package/node_modules/tardis-dev/dist/mappers/okexspreads.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/phemex.d.ts +9 -0
- package/node_modules/tardis-dev/dist/mappers/phemex.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/phemex.js +406 -0
- package/node_modules/tardis-dev/dist/mappers/phemex.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/poloniex.d.ts +8 -0
- package/node_modules/tardis-dev/dist/mappers/poloniex.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/poloniex.js +207 -0
- package/node_modules/tardis-dev/dist/mappers/poloniex.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/polymarket.d.ts +59 -0
- package/node_modules/tardis-dev/dist/mappers/polymarket.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/polymarket.js +121 -0
- package/node_modules/tardis-dev/dist/mappers/polymarket.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/registry.d.ts +41 -0
- package/node_modules/tardis-dev/dist/mappers/registry.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/registry.js +111 -0
- package/node_modules/tardis-dev/dist/mappers/registry.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/serum.d.ts +19 -0
- package/node_modules/tardis-dev/dist/mappers/serum.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/serum.js +127 -0
- package/node_modules/tardis-dev/dist/mappers/serum.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/upbit.d.ts +8 -0
- package/node_modules/tardis-dev/dist/mappers/upbit.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/upbit.js +78 -0
- package/node_modules/tardis-dev/dist/mappers/upbit.js.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/woox.d.ts +10 -0
- package/node_modules/tardis-dev/dist/mappers/woox.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/mappers/woox.js +488 -0
- package/node_modules/tardis-dev/dist/mappers/woox.js.map +1 -0
- package/node_modules/tardis-dev/dist/okexsymbols.d.ts +3 -0
- package/node_modules/tardis-dev/dist/okexsymbols.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/okexsymbols.js +10 -0
- package/node_modules/tardis-dev/dist/okexsymbols.js.map +1 -0
- package/node_modules/tardis-dev/dist/options.d.ts +13 -0
- package/node_modules/tardis-dev/dist/options.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/options.js +21 -0
- package/node_modules/tardis-dev/dist/options.js.map +1 -0
- package/node_modules/tardis-dev/dist/orderbook.d.ts +23 -0
- package/node_modules/tardis-dev/dist/orderbook.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/orderbook.js +133 -0
- package/node_modules/tardis-dev/dist/orderbook.js.map +1 -0
- package/node_modules/tardis-dev/dist/priceleveltree.d.ts +27 -0
- package/node_modules/tardis-dev/dist/priceleveltree.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/priceleveltree.js +165 -0
- package/node_modules/tardis-dev/dist/priceleveltree.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/binance.d.ts +99 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/binance.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/binance.js +370 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/binance.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/binancedex.d.ts +14 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/binancedex.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/binancedex.js +53 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/binancedex.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/binanceeuropeanoptions.d.ts +14 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/binanceeuropeanoptions.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/binanceeuropeanoptions.js +95 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/binanceeuropeanoptions.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bitfinex.d.ts +36 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bitfinex.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bitfinex.js +73 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bitfinex.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bitflyer.d.ts +9 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bitflyer.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bitflyer.js +36 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bitflyer.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bitget.d.ts +19 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bitget.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bitget.js +61 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bitget.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bitmex.d.ts +11 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bitmex.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bitmex.js +37 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bitmex.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bitnomial.d.ts +11 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bitnomial.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bitnomial.js +52 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bitnomial.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bitstamp.d.ts +10 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bitstamp.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bitstamp.js +57 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bitstamp.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/blockchaincom.d.ts +11 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/blockchaincom.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/blockchaincom.js +37 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/blockchaincom.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bullish.d.ts +18 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bullish.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bullish.js +113 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bullish.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bybit.d.ts +28 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bybit.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bybit.js +95 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/bybit.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/coinbase.d.ts +16 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/coinbase.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/coinbase.js +98 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/coinbase.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/coinbaseinternational.d.ts +10 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/coinbaseinternational.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/coinbaseinternational.js +47 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/coinbaseinternational.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/coinflex.d.ts +8 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/coinflex.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/coinflex.js +23 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/coinflex.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/cryptocom.d.ts +10 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/cryptocom.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/cryptocom.js +43 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/cryptocom.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/cryptofacilities.d.ts +9 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/cryptofacilities.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/cryptofacilities.js +25 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/cryptofacilities.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/delta.d.ts +18 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/delta.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/delta.js +29 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/delta.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/deribit.d.ts +13 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/deribit.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/deribit.js +81 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/deribit.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/dydx.d.ts +8 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/dydx.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/dydx.js +34 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/dydx.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/dydx_v4.d.ts +8 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/dydx_v4.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/dydx_v4.js +33 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/dydx_v4.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/ftx.d.ts +33 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/ftx.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/ftx.js +107 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/ftx.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/gateio.d.ts +9 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/gateio.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/gateio.js +41 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/gateio.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/gateiofutures.d.ts +17 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/gateiofutures.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/gateiofutures.js +68 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/gateiofutures.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/gemini.d.ts +9 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/gemini.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/gemini.js +32 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/gemini.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/hitbtc.d.ts +12 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/hitbtc.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/hitbtc.js +55 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/hitbtc.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/huobi.d.ts +108 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/huobi.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/huobi.js +339 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/huobi.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/hyperliquid.d.ts +10 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/hyperliquid.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/hyperliquid.js +34 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/hyperliquid.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/index.d.ts +6 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/index.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/index.js +119 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/index.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/kraken.d.ts +10 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/kraken.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/kraken.js +41 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/kraken.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/kucoin.d.ts +13 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/kucoin.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/kucoin.js +66 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/kucoin.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/kucoinfutures.d.ts +25 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/kucoinfutures.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/kucoinfutures.js +110 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/kucoinfutures.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/lighter.d.ts +8 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/lighter.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/lighter.js +25 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/lighter.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/mango.d.ts +5 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/mango.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/mango.js +5 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/mango.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/mexc.d.ts +35 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/mexc.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/mexc.js +261 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/mexc.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/mexcfutures.d.ts +25 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/mexcfutures.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/mexcfutures.js +203 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/mexcfutures.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/okex.d.ts +31 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/okex.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/okex.js +147 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/okex.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/okexspreads.d.ts +11 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/okexspreads.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/okexspreads.js +53 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/okexspreads.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/phemex.d.ts +14 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/phemex.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/phemex.js +46 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/phemex.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/poloniex.d.ts +14 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/poloniex.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/poloniex.js +28 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/poloniex.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/polymarket.d.ts +26 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/polymarket.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/polymarket.js +92 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/polymarket.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/realtimefeed.d.ts +75 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/realtimefeed.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/realtimefeed.js +423 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/realtimefeed.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/serum.d.ts +14 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/serum.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/serum.js +58 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/serum.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/staratlas.d.ts +5 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/staratlas.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/staratlas.js +5 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/staratlas.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/upbit.d.ts +8 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/upbit.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/upbit.js +29 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/upbit.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/woox.d.ts +12 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/woox.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/woox.js +77 -0
- package/node_modules/tardis-dev/dist/realtimefeeds/woox.js.map +1 -0
- package/node_modules/tardis-dev/dist/realtimeiterator.d.ts +10 -0
- package/node_modules/tardis-dev/dist/realtimeiterator.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/realtimeiterator.js +106 -0
- package/node_modules/tardis-dev/dist/realtimeiterator.js.map +1 -0
- package/node_modules/tardis-dev/dist/replay.d.ts +42 -0
- package/node_modules/tardis-dev/dist/replay.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/replay.js +417 -0
- package/node_modules/tardis-dev/dist/replay.js.map +1 -0
- package/node_modules/tardis-dev/dist/stream.d.ts +28 -0
- package/node_modules/tardis-dev/dist/stream.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/stream.js +112 -0
- package/node_modules/tardis-dev/dist/stream.js.map +1 -0
- package/node_modules/tardis-dev/dist/types.d.ts +154 -0
- package/node_modules/tardis-dev/dist/types.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/types.js +2 -0
- package/node_modules/tardis-dev/dist/types.js.map +1 -0
- package/node_modules/tardis-dev/dist/worker.d.ts +24 -0
- package/node_modules/tardis-dev/dist/worker.d.ts.map +1 -0
- package/node_modules/tardis-dev/dist/worker.js +143 -0
- package/node_modules/tardis-dev/dist/worker.js.map +1 -0
- package/node_modules/tardis-dev/example.js +171 -0
- package/node_modules/tardis-dev/package.json +85 -0
- package/node_modules/tardis-dev/src/apikeyaccessinfo.ts +25 -0
- package/node_modules/tardis-dev/src/binarysplit.ts +50 -0
- package/node_modules/tardis-dev/src/boundedqueue.ts +118 -0
- package/node_modules/tardis-dev/src/clearcache.ts +62 -0
- package/node_modules/tardis-dev/src/combine.ts +134 -0
- package/node_modules/tardis-dev/src/computable/booksnapshot.ts +327 -0
- package/node_modules/tardis-dev/src/computable/computable.ts +104 -0
- package/node_modules/tardis-dev/src/computable/context.ts +12 -0
- package/node_modules/tardis-dev/src/computable/index.ts +3 -0
- package/node_modules/tardis-dev/src/computable/tradebar.ts +173 -0
- package/node_modules/tardis-dev/src/consts.ts +623 -0
- package/node_modules/tardis-dev/src/debug.ts +3 -0
- package/node_modules/tardis-dev/src/downloaddatasets.ts +193 -0
- package/node_modules/tardis-dev/src/exchangedetails.ts +120 -0
- package/node_modules/tardis-dev/src/filter.ts +69 -0
- package/node_modules/tardis-dev/src/foreachconcurrent.ts +29 -0
- package/node_modules/tardis-dev/src/handy.ts +880 -0
- package/node_modules/tardis-dev/src/index.ts +16 -0
- package/node_modules/tardis-dev/src/instrumentinfo.ts +197 -0
- package/node_modules/tardis-dev/src/mappers/ascendex.ts +210 -0
- package/node_modules/tardis-dev/src/mappers/binance.ts +598 -0
- package/node_modules/tardis-dev/src/mappers/binancedex.ts +180 -0
- package/node_modules/tardis-dev/src/mappers/binanceeuropeanoptions.ts +624 -0
- package/node_modules/tardis-dev/src/mappers/bitfinex.ts +472 -0
- package/node_modules/tardis-dev/src/mappers/bitflyer.ts +199 -0
- package/node_modules/tardis-dev/src/mappers/bitget.ts +490 -0
- package/node_modules/tardis-dev/src/mappers/bitmex.ts +359 -0
- package/node_modules/tardis-dev/src/mappers/bitnomial.ts +134 -0
- package/node_modules/tardis-dev/src/mappers/bitstamp.ts +219 -0
- package/node_modules/tardis-dev/src/mappers/blockchaincom.ts +106 -0
- package/node_modules/tardis-dev/src/mappers/bullish.ts +392 -0
- package/node_modules/tardis-dev/src/mappers/bybit.ts +947 -0
- package/node_modules/tardis-dev/src/mappers/bybitspot.ts +129 -0
- package/node_modules/tardis-dev/src/mappers/coinbase.ts +259 -0
- package/node_modules/tardis-dev/src/mappers/coinbaseinternational.ts +338 -0
- package/node_modules/tardis-dev/src/mappers/coinflex.ts +175 -0
- package/node_modules/tardis-dev/src/mappers/cryptocom.ts +504 -0
- package/node_modules/tardis-dev/src/mappers/cryptofacilities.ts +319 -0
- package/node_modules/tardis-dev/src/mappers/delta.ts +315 -0
- package/node_modules/tardis-dev/src/mappers/deribit.ts +406 -0
- package/node_modules/tardis-dev/src/mappers/dydx.ts +330 -0
- package/node_modules/tardis-dev/src/mappers/dydxv4.ts +349 -0
- package/node_modules/tardis-dev/src/mappers/ftx.ts +307 -0
- package/node_modules/tardis-dev/src/mappers/gateio.ts +543 -0
- package/node_modules/tardis-dev/src/mappers/gateiofutures.ts +290 -0
- package/node_modules/tardis-dev/src/mappers/gemini.ts +225 -0
- package/node_modules/tardis-dev/src/mappers/hitbtc.ts +124 -0
- package/node_modules/tardis-dev/src/mappers/huobi.ts +815 -0
- package/node_modules/tardis-dev/src/mappers/hyperliquid.ts +248 -0
- package/node_modules/tardis-dev/src/mappers/index.ts +140 -0
- package/node_modules/tardis-dev/src/mappers/kraken.ts +382 -0
- package/node_modules/tardis-dev/src/mappers/kucoin.ts +353 -0
- package/node_modules/tardis-dev/src/mappers/kucoinfutures.ts +508 -0
- package/node_modules/tardis-dev/src/mappers/lighter.ts +363 -0
- package/node_modules/tardis-dev/src/mappers/mapper.ts +163 -0
- package/node_modules/tardis-dev/src/mappers/mexc.ts +324 -0
- package/node_modules/tardis-dev/src/mappers/mexcfutures.ts +352 -0
- package/node_modules/tardis-dev/src/mappers/okex.ts +1362 -0
- package/node_modules/tardis-dev/src/mappers/okexspreads.ts +172 -0
- package/node_modules/tardis-dev/src/mappers/phemex.ts +562 -0
- package/node_modules/tardis-dev/src/mappers/poloniex.ts +304 -0
- package/node_modules/tardis-dev/src/mappers/polymarket.ts +204 -0
- package/node_modules/tardis-dev/src/mappers/registry.ts +203 -0
- package/node_modules/tardis-dev/src/mappers/serum.ts +196 -0
- package/node_modules/tardis-dev/src/mappers/upbit.ts +117 -0
- package/node_modules/tardis-dev/src/mappers/woox.ts +700 -0
- package/node_modules/tardis-dev/src/okexsymbols.ts +10 -0
- package/node_modules/tardis-dev/src/options.ts +36 -0
- package/node_modules/tardis-dev/src/orderbook.ts +169 -0
- package/node_modules/tardis-dev/src/priceleveltree.ts +188 -0
- package/node_modules/tardis-dev/src/realtimefeeds/binance.ts +577 -0
- package/node_modules/tardis-dev/src/realtimefeeds/binancedex.ts +64 -0
- package/node_modules/tardis-dev/src/realtimefeeds/binanceeuropeanoptions.ts +132 -0
- package/node_modules/tardis-dev/src/realtimefeeds/bitfinex.ts +83 -0
- package/node_modules/tardis-dev/src/realtimefeeds/bitflyer.ts +41 -0
- package/node_modules/tardis-dev/src/realtimefeeds/bitget.ts +76 -0
- package/node_modules/tardis-dev/src/realtimefeeds/bitmex.ts +42 -0
- package/node_modules/tardis-dev/src/realtimefeeds/bitnomial.ts +60 -0
- package/node_modules/tardis-dev/src/realtimefeeds/bitstamp.ts +70 -0
- package/node_modules/tardis-dev/src/realtimefeeds/blockchaincom.ts +44 -0
- package/node_modules/tardis-dev/src/realtimefeeds/bullish.ts +140 -0
- package/node_modules/tardis-dev/src/realtimefeeds/bybit.ts +123 -0
- package/node_modules/tardis-dev/src/realtimefeeds/coinbase.ts +112 -0
- package/node_modules/tardis-dev/src/realtimefeeds/coinbaseinternational.ts +60 -0
- package/node_modules/tardis-dev/src/realtimefeeds/coinflex.ts +29 -0
- package/node_modules/tardis-dev/src/realtimefeeds/cryptocom.ts +49 -0
- package/node_modules/tardis-dev/src/realtimefeeds/cryptofacilities.ts +30 -0
- package/node_modules/tardis-dev/src/realtimefeeds/delta.ts +35 -0
- package/node_modules/tardis-dev/src/realtimefeeds/deribit.ts +95 -0
- package/node_modules/tardis-dev/src/realtimefeeds/dydx.ts +40 -0
- package/node_modules/tardis-dev/src/realtimefeeds/dydx_v4.ts +39 -0
- package/node_modules/tardis-dev/src/realtimefeeds/ftx.ts +137 -0
- package/node_modules/tardis-dev/src/realtimefeeds/gateio.ts +46 -0
- package/node_modules/tardis-dev/src/realtimefeeds/gateiofutures.ts +91 -0
- package/node_modules/tardis-dev/src/realtimefeeds/gemini.ts +38 -0
- package/node_modules/tardis-dev/src/realtimefeeds/hitbtc.ts +65 -0
- package/node_modules/tardis-dev/src/realtimefeeds/huobi.ts +435 -0
- package/node_modules/tardis-dev/src/realtimefeeds/hyperliquid.ts +41 -0
- package/node_modules/tardis-dev/src/realtimefeeds/index.ts +145 -0
- package/node_modules/tardis-dev/src/realtimefeeds/kraken.ts +48 -0
- package/node_modules/tardis-dev/src/realtimefeeds/kucoin.ts +80 -0
- package/node_modules/tardis-dev/src/realtimefeeds/kucoinfutures.ts +139 -0
- package/node_modules/tardis-dev/src/realtimefeeds/lighter.ts +31 -0
- package/node_modules/tardis-dev/src/realtimefeeds/mango.ts +5 -0
- package/node_modules/tardis-dev/src/realtimefeeds/mexc.ts +327 -0
- package/node_modules/tardis-dev/src/realtimefeeds/mexcfutures.ts +269 -0
- package/node_modules/tardis-dev/src/realtimefeeds/okex.ts +189 -0
- package/node_modules/tardis-dev/src/realtimefeeds/okexspreads.ts +64 -0
- package/node_modules/tardis-dev/src/realtimefeeds/phemex.ts +52 -0
- package/node_modules/tardis-dev/src/realtimefeeds/poloniex.ts +34 -0
- package/node_modules/tardis-dev/src/realtimefeeds/polymarket.ts +112 -0
- package/node_modules/tardis-dev/src/realtimefeeds/realtimefeed.ts +561 -0
- package/node_modules/tardis-dev/src/realtimefeeds/serum.ts +67 -0
- package/node_modules/tardis-dev/src/realtimefeeds/staratlas.ts +5 -0
- package/node_modules/tardis-dev/src/realtimefeeds/upbit.ts +35 -0
- package/node_modules/tardis-dev/src/realtimefeeds/woox.ts +110 -0
- package/node_modules/tardis-dev/src/realtimeiterator.ts +124 -0
- package/node_modules/tardis-dev/src/replay.ts +616 -0
- package/node_modules/tardis-dev/src/stream.ts +186 -0
- package/node_modules/tardis-dev/src/types.ts +178 -0
- package/node_modules/tardis-dev/src/worker.ts +221 -0
- package/node_modules/uWebSockets.js/ESM_wrapper.mjs +53 -0
- package/node_modules/uWebSockets.js/LICENSE +201 -0
- package/node_modules/uWebSockets.js/README.md +6 -0
- package/node_modules/uWebSockets.js/index.d.ts +468 -0
- package/node_modules/uWebSockets.js/package.json +12 -0
- package/node_modules/uWebSockets.js/source_commit +1 -0
- package/node_modules/uWebSockets.js/uws.js +76 -0
- package/node_modules/uWebSockets.js/uws_darwin_arm64_127.node +0 -0
- package/node_modules/uWebSockets.js/uws_darwin_arm64_137.node +0 -0
- package/node_modules/uWebSockets.js/uws_darwin_arm64_147.node +0 -0
- package/node_modules/uWebSockets.js/uws_darwin_x64_127.node +0 -0
- package/node_modules/uWebSockets.js/uws_darwin_x64_137.node +0 -0
- package/node_modules/uWebSockets.js/uws_darwin_x64_147.node +0 -0
- package/node_modules/uWebSockets.js/uws_linux_arm64_127.node +0 -0
- package/node_modules/uWebSockets.js/uws_linux_arm64_137.node +0 -0
- package/node_modules/uWebSockets.js/uws_linux_arm64_147.node +0 -0
- package/node_modules/uWebSockets.js/uws_linux_x64_127.node +0 -0
- package/node_modules/uWebSockets.js/uws_linux_x64_137.node +0 -0
- package/node_modules/uWebSockets.js/uws_linux_x64_147.node +0 -0
- package/node_modules/uWebSockets.js/uws_win32_x64_127.node +0 -0
- package/node_modules/uWebSockets.js/uws_win32_x64_137.node +0 -0
- package/node_modules/uWebSockets.js/uws_win32_x64_147.node +0 -0
- package/node_modules/ws/LICENSE +20 -0
- package/node_modules/ws/README.md +548 -0
- package/node_modules/ws/browser.js +8 -0
- package/node_modules/ws/index.js +22 -0
- package/node_modules/ws/lib/buffer-util.js +131 -0
- package/node_modules/ws/lib/constants.js +19 -0
- package/node_modules/ws/lib/event-target.js +292 -0
- package/node_modules/ws/lib/extension.js +203 -0
- package/node_modules/ws/lib/limiter.js +55 -0
- package/node_modules/ws/lib/permessage-deflate.js +528 -0
- package/node_modules/ws/lib/receiver.js +743 -0
- package/node_modules/ws/lib/sender.js +607 -0
- package/node_modules/ws/lib/stream.js +161 -0
- package/node_modules/ws/lib/subprotocol.js +62 -0
- package/node_modules/ws/lib/validation.js +152 -0
- package/node_modules/ws/lib/websocket-server.js +562 -0
- package/node_modules/ws/lib/websocket.js +1407 -0
- package/node_modules/ws/package.json +74 -0
- package/node_modules/ws/wrapper.mjs +21 -0
- package/package.json +8 -20
- package/src/tardismachine.ts +15 -7
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
import { createReadStream } from 'node:fs';
|
|
2
|
+
import { rm } from 'node:fs/promises';
|
|
3
|
+
import { EventEmitter, once } from 'events';
|
|
4
|
+
import { Worker } from 'worker_threads';
|
|
5
|
+
import { constants, createGunzip, createZstdDecompress } from 'zlib';
|
|
6
|
+
import { BinarySplitBatchStream } from "./binarysplit.js";
|
|
7
|
+
import { clearCacheSync } from "./clearcache.js";
|
|
8
|
+
import { EXCHANGES, EXCHANGE_CHANNELS_INFO } from "./consts.js";
|
|
9
|
+
import { debug } from "./debug.js";
|
|
10
|
+
import { addDays, createNormalizedSymbolFilter, getFilters, parseAsUTCDate, wait } from "./handy.js";
|
|
11
|
+
import { normalizeBookChanges } from "./mappers/index.js";
|
|
12
|
+
import { getOptions } from "./options.js";
|
|
13
|
+
const DATE_MESSAGE_SPLIT_INDEX = 28;
|
|
14
|
+
const CHUNK_SIZE = 256 * 1024;
|
|
15
|
+
// Keep decompression lenient for partial gzip responses.
|
|
16
|
+
// See https://github.com/request/request/pull/2492 and https://github.com/node-fetch/node-fetch/pull/239.
|
|
17
|
+
const GZIP_OPTIONS = {
|
|
18
|
+
chunkSize: CHUNK_SIZE,
|
|
19
|
+
flush: constants.Z_SYNC_FLUSH,
|
|
20
|
+
finishFlush: constants.Z_SYNC_FLUSH
|
|
21
|
+
};
|
|
22
|
+
export async function* replay({ exchange, from, to, filters, skipDecoding = undefined, withDisconnects = undefined, apiKey = undefined, withMicroseconds = undefined, autoCleanup = undefined, waitWhenDataNotYetAvailable = undefined }) {
|
|
23
|
+
let lastMessageWasUndefined = false;
|
|
24
|
+
const lineBatches = replayLineBatches({ exchange, from, to, filters, apiKey, autoCleanup, waitWhenDataNotYetAvailable });
|
|
25
|
+
for await (const bufferLines of lineBatches) {
|
|
26
|
+
// Decode one line batch in a tight loop, then preserve the public one-message-at-a-time iterator.
|
|
27
|
+
const messages = [];
|
|
28
|
+
for (let i = 0; i < bufferLines.length; i++) {
|
|
29
|
+
const bufferLine = bufferLines[i];
|
|
30
|
+
if (bufferLine.length > 0) {
|
|
31
|
+
lastMessageWasUndefined = false;
|
|
32
|
+
if (skipDecoding === true) {
|
|
33
|
+
messages.push({
|
|
34
|
+
localTimestamp: bufferLine.slice(0, DATE_MESSAGE_SPLIT_INDEX),
|
|
35
|
+
message: bufferLine.slice(DATE_MESSAGE_SPLIT_INDEX + 1)
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
const message = parseReplayMessage(exchange, bufferLine);
|
|
40
|
+
const localTimestamp = parseReplayTimestamp(bufferLine);
|
|
41
|
+
if (withMicroseconds) {
|
|
42
|
+
localTimestamp.μs = parseReplayMicroseconds(bufferLine);
|
|
43
|
+
}
|
|
44
|
+
messages.push({ localTimestamp, message });
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
else if (withDisconnects === true && lastMessageWasUndefined === false) {
|
|
48
|
+
lastMessageWasUndefined = true;
|
|
49
|
+
messages.push(undefined);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
// Drain a batch already received from the stream; its iterator surfaces later stream errors on the next read.
|
|
53
|
+
for (let i = 0; i < messages.length; i++) {
|
|
54
|
+
yield messages[i];
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
async function* replayLineBatches({ exchange, from, to, filters, apiKey = undefined, autoCleanup = undefined, waitWhenDataNotYetAvailable = undefined }) {
|
|
59
|
+
validateReplayOptions(exchange, from, to, filters);
|
|
60
|
+
const fromDate = parseAsUTCDate(from);
|
|
61
|
+
const toDate = parseAsUTCDate(to);
|
|
62
|
+
const cachedSlicePaths = new Map();
|
|
63
|
+
let replayError;
|
|
64
|
+
debug('replay for exchange: %s started - from: %s, to: %s, filters: %o', exchange, fromDate.toISOString(), toDate.toISOString(), filters);
|
|
65
|
+
const options = getOptions();
|
|
66
|
+
// initialize worker thread that will fetch and cache data feed slices and "report back" by setting proper key/values in cachedSlicePaths
|
|
67
|
+
const payload = {
|
|
68
|
+
cacheDir: options.cacheDir,
|
|
69
|
+
endpoint: options.endpoint,
|
|
70
|
+
apiKey: apiKey || options.apiKey,
|
|
71
|
+
dataFeedCompression: options.dataFeedCompression,
|
|
72
|
+
userAgent: options._userAgent,
|
|
73
|
+
fromDate,
|
|
74
|
+
toDate,
|
|
75
|
+
exchange,
|
|
76
|
+
filters: filters || [],
|
|
77
|
+
waitWhenDataNotYetAvailable
|
|
78
|
+
};
|
|
79
|
+
const worker = new ReliableWorker(payload);
|
|
80
|
+
worker.on('message', (message) => {
|
|
81
|
+
cachedSlicePaths.set(message.sliceKey, {
|
|
82
|
+
slicePath: message.slicePath,
|
|
83
|
+
sliceSize: message.sliceSize
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
worker.on('error', (err) => {
|
|
87
|
+
debug('worker error %o', err);
|
|
88
|
+
replayError = err;
|
|
89
|
+
});
|
|
90
|
+
try {
|
|
91
|
+
let currentSliceDate = new Date(fromDate);
|
|
92
|
+
// iterate over every minute in <=from,to> date range
|
|
93
|
+
// get cached slice paths, read them as file streams, decompress, split by new lines and yield as messages
|
|
94
|
+
while (currentSliceDate < toDate) {
|
|
95
|
+
const sliceKey = currentSliceDate.toISOString();
|
|
96
|
+
debug('getting slice: %s, exchange: %s', sliceKey, exchange);
|
|
97
|
+
let cachedSlice;
|
|
98
|
+
while (cachedSlice === undefined) {
|
|
99
|
+
cachedSlice = cachedSlicePaths.get(sliceKey);
|
|
100
|
+
// if something went wrong(network issue, auth issue, gunzip issue etc)
|
|
101
|
+
if (replayError !== undefined) {
|
|
102
|
+
throw replayError;
|
|
103
|
+
}
|
|
104
|
+
if (cachedSlice === undefined) {
|
|
105
|
+
// if the requested slice is not ready yet, wait for the worker to report another cached slice
|
|
106
|
+
debug('waiting for slice: %s, exchange: %s', sliceKey, exchange);
|
|
107
|
+
await once(worker, 'message');
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
// response is a path to file on disk let' read it as stream
|
|
111
|
+
const { slicePath: cachedSlicePath, sliceSize } = cachedSlice;
|
|
112
|
+
const isZstdSlice = cachedSlicePath.endsWith('.zst');
|
|
113
|
+
const linesStream = createReadStream(cachedSlicePath, { highWaterMark: CHUNK_SIZE })
|
|
114
|
+
// decompress it while preserving the on-disk cache in the negotiated wire format
|
|
115
|
+
.pipe(isZstdSlice ? createZstdDecompress({ chunkSize: CHUNK_SIZE }) : createGunzip(GZIP_OPTIONS))
|
|
116
|
+
.on('error', function onDecompressionError(err) {
|
|
117
|
+
debug('%s decompression error %o', isZstdSlice ? 'zstd' : 'gzip', err);
|
|
118
|
+
linesStream.destroy(err);
|
|
119
|
+
})
|
|
120
|
+
// and split by new line
|
|
121
|
+
.pipe(new BinarySplitBatchStream())
|
|
122
|
+
.on('error', function onBinarySplitStreamError(err) {
|
|
123
|
+
debug('binary split stream error %o', err);
|
|
124
|
+
linesStream.destroy(err);
|
|
125
|
+
});
|
|
126
|
+
let linesCount = 0;
|
|
127
|
+
for await (const bufferLines of linesStream) {
|
|
128
|
+
linesCount += bufferLines.length;
|
|
129
|
+
yield bufferLines;
|
|
130
|
+
}
|
|
131
|
+
debug('processed slice: %s, exchange: %s, count: %d', sliceKey, exchange, linesCount);
|
|
132
|
+
// remove slice key from the map as it's already processed
|
|
133
|
+
cachedSlicePaths.delete(sliceKey);
|
|
134
|
+
if (autoCleanup) {
|
|
135
|
+
await cleanupSlice(cachedSlicePath);
|
|
136
|
+
}
|
|
137
|
+
// move by the number of minutes covered by this cached response
|
|
138
|
+
currentSliceDate.setUTCMinutes(currentSliceDate.getUTCMinutes() + sliceSize);
|
|
139
|
+
}
|
|
140
|
+
debug('replay for exchange: %s finished - from: %s, to: %s, filters: %o', exchange, fromDate.toISOString(), toDate.toISOString(), filters);
|
|
141
|
+
}
|
|
142
|
+
finally {
|
|
143
|
+
if (autoCleanup) {
|
|
144
|
+
debug('replay for exchange %s auto cleanup started - from: %s, to: %s, filters: %o', exchange, fromDate.toISOString(), toDate.toISOString(), filters);
|
|
145
|
+
let startDate = new Date(fromDate);
|
|
146
|
+
while (startDate < toDate) {
|
|
147
|
+
clearCacheSync(exchange, filters, startDate.getUTCFullYear(), startDate.getUTCMonth() + 1, startDate.getUTCDate());
|
|
148
|
+
startDate = addDays(startDate, 1);
|
|
149
|
+
}
|
|
150
|
+
debug('replay for exchange %s auto cleanup finished - from: %s, to: %s, filters: %o', exchange, fromDate.toISOString(), toDate.toISOString(), filters);
|
|
151
|
+
}
|
|
152
|
+
const underlyingWorker = worker.getUnderlyingWorker();
|
|
153
|
+
if (underlyingWorker !== undefined) {
|
|
154
|
+
await terminateWorker(underlyingWorker, 500);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
function parseReplayMessage(exchange, bufferLine) {
|
|
159
|
+
let messageString = bufferLine.toString('utf8', DATE_MESSAGE_SPLIT_INDEX + 1);
|
|
160
|
+
// hack to handle huobi long numeric id for trades
|
|
161
|
+
if (exchange.startsWith('huobi-') && messageString.includes('.trade.detail')) {
|
|
162
|
+
messageString = messageString.replace(/"id":([0-9]+),/g, '"id":"$1",');
|
|
163
|
+
}
|
|
164
|
+
// hack to handle upbit long numeric id for trades
|
|
165
|
+
if (exchange === 'upbit' && messageString.includes('sequential_id')) {
|
|
166
|
+
messageString = messageString.replace(/"sequential_id":([0-9]+),/g, '"sequential_id":"$1",');
|
|
167
|
+
}
|
|
168
|
+
return JSON.parse(messageString);
|
|
169
|
+
}
|
|
170
|
+
async function cleanupSlice(slicePath) {
|
|
171
|
+
try {
|
|
172
|
+
await rm(slicePath, { force: true });
|
|
173
|
+
}
|
|
174
|
+
catch (e) {
|
|
175
|
+
debug('cleanupSlice error %s %o', slicePath, e);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
function parseReplayMicroseconds(bufferLine) {
|
|
179
|
+
return (bufferLine[23] - 48) * 100 + (bufferLine[24] - 48) * 10 + (bufferLine[25] - 48);
|
|
180
|
+
}
|
|
181
|
+
function parseReplayTimestamp(bufferLine) {
|
|
182
|
+
// Recorder writes yyyy-MM-ddTHH:mm:ss.fffffffZ.
|
|
183
|
+
return new Date(Date.UTC(parseReplayTwoDigits(bufferLine, 0) * 100 + parseReplayTwoDigits(bufferLine, 2), parseReplayTwoDigits(bufferLine, 5) - 1, parseReplayTwoDigits(bufferLine, 8), parseReplayTwoDigits(bufferLine, 11), parseReplayTwoDigits(bufferLine, 14), parseReplayTwoDigits(bufferLine, 17), parseReplayThreeDigits(bufferLine, 20)));
|
|
184
|
+
}
|
|
185
|
+
function parseReplayTwoDigits(bufferLine, start) {
|
|
186
|
+
return (bufferLine[start] - 48) * 10 + (bufferLine[start + 1] - 48);
|
|
187
|
+
}
|
|
188
|
+
function parseReplayThreeDigits(bufferLine, start) {
|
|
189
|
+
return (bufferLine[start] - 48) * 100 + (bufferLine[start + 1] - 48) * 10 + (bufferLine[start + 2] - 48);
|
|
190
|
+
}
|
|
191
|
+
// gracefully terminate worker
|
|
192
|
+
async function terminateWorker(worker, waitTimeout) {
|
|
193
|
+
let cancelWait = () => { };
|
|
194
|
+
const maxWaitGuard = new Promise((resolve) => {
|
|
195
|
+
const timeoutId = setTimeout(resolve, waitTimeout);
|
|
196
|
+
cancelWait = () => clearTimeout(timeoutId);
|
|
197
|
+
});
|
|
198
|
+
const readyToTerminate = new Promise((resolve) => {
|
|
199
|
+
worker.once('message', (signal) => signal === "READY_TO_TERMINATE" /* WorkerSignal.READY_TO_TERMINATE */ && resolve());
|
|
200
|
+
}).then(cancelWait);
|
|
201
|
+
worker.postMessage("BEFORE_TERMINATE" /* WorkerSignal.BEFORE_TERMINATE */);
|
|
202
|
+
await Promise.race([readyToTerminate, maxWaitGuard]);
|
|
203
|
+
await worker.terminate();
|
|
204
|
+
}
|
|
205
|
+
export function replayNormalized({ exchange, symbols, from, to, withDisconnectMessages = undefined, apiKey = undefined, autoCleanup = undefined, waitWhenDataNotYetAvailable = undefined }, ...normalizers) {
|
|
206
|
+
const fromDate = parseAsUTCDate(from);
|
|
207
|
+
const toDate = parseAsUTCDate(to);
|
|
208
|
+
validateReplayNormalizedOptions(fromDate, normalizers);
|
|
209
|
+
const createMappersAt = (localTimestamp) => normalizers.map((normalizer) => normalizer(exchange, localTimestamp));
|
|
210
|
+
const initialMappers = createMappersAt(fromDate);
|
|
211
|
+
const filters = getFilters(initialMappers, symbols);
|
|
212
|
+
// filter normalized messages by symbol as some exchanges do not provide server side filtering so we could end up with messages
|
|
213
|
+
// for symbols we've not requested for
|
|
214
|
+
const segments = getReplayNormalizedSegments(exchange, normalizers, fromDate, toDate);
|
|
215
|
+
if (segments.length <= 1) {
|
|
216
|
+
const filter = createNormalizedSymbolFilter(symbols, filters);
|
|
217
|
+
const lineBatches = replayLineBatches({
|
|
218
|
+
exchange,
|
|
219
|
+
from,
|
|
220
|
+
to,
|
|
221
|
+
filters,
|
|
222
|
+
apiKey,
|
|
223
|
+
autoCleanup,
|
|
224
|
+
waitWhenDataNotYetAvailable
|
|
225
|
+
});
|
|
226
|
+
return normalizeReplayLineBatches(exchange, undefined, lineBatches, initialMappers, createMappersAt, withDisconnectMessages, filter);
|
|
227
|
+
}
|
|
228
|
+
return replayNormalizedSegments();
|
|
229
|
+
async function* replayNormalizedSegments() {
|
|
230
|
+
for (let i = 0; i < segments.length; i++) {
|
|
231
|
+
const { from: segmentFrom, to: segmentTo } = segments[i];
|
|
232
|
+
const segmentMappers = i === 0 ? initialMappers : createMappersAt(segmentFrom);
|
|
233
|
+
const segmentFilters = getFilters(segmentMappers, symbols);
|
|
234
|
+
const segmentFilter = createNormalizedSymbolFilter(symbols, segmentFilters);
|
|
235
|
+
const segmentLineBatches = replayLineBatches({
|
|
236
|
+
exchange,
|
|
237
|
+
from: segmentFrom.toISOString(),
|
|
238
|
+
to: segmentTo.toISOString(),
|
|
239
|
+
filters: segmentFilters,
|
|
240
|
+
apiKey,
|
|
241
|
+
autoCleanup,
|
|
242
|
+
waitWhenDataNotYetAvailable
|
|
243
|
+
});
|
|
244
|
+
yield* normalizeReplayLineBatches(exchange, undefined, segmentLineBatches, segmentMappers, createMappersAt, withDisconnectMessages, segmentFilter);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
async function* normalizeReplayLineBatches(exchange, symbols, lineBatches, initialMappers, createMappersAt, withDisconnectMessages, filter) {
|
|
249
|
+
// This intentionally keeps mapper calls lazy. Custom normalizers must not process later raw messages before the consumer asks for them.
|
|
250
|
+
let previousLocalTimestamp;
|
|
251
|
+
let activeMappers = initialMappers;
|
|
252
|
+
if (activeMappers.length === 0) {
|
|
253
|
+
throw new Error(`Can't normalize data without any normalizers provided`);
|
|
254
|
+
}
|
|
255
|
+
for await (const bufferLines of lineBatches) {
|
|
256
|
+
const decodedMessages = [];
|
|
257
|
+
let decodingFailed = false;
|
|
258
|
+
let decodingError;
|
|
259
|
+
try {
|
|
260
|
+
for (let i = 0; i < bufferLines.length; i++) {
|
|
261
|
+
const bufferLine = bufferLines[i];
|
|
262
|
+
if (bufferLine.length === 0) {
|
|
263
|
+
decodedMessages.push(undefined);
|
|
264
|
+
}
|
|
265
|
+
else {
|
|
266
|
+
const message = parseReplayMessage(exchange, bufferLine);
|
|
267
|
+
const localTimestamp = parseReplayTimestamp(bufferLine);
|
|
268
|
+
localTimestamp.μs = parseReplayMicroseconds(bufferLine);
|
|
269
|
+
decodedMessages.push({ localTimestamp, message });
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
catch (error) {
|
|
274
|
+
decodingFailed = true;
|
|
275
|
+
decodingError = error;
|
|
276
|
+
}
|
|
277
|
+
for (let i = 0; i < decodedMessages.length; i++) {
|
|
278
|
+
const decodedMessage = decodedMessages[i];
|
|
279
|
+
if (decodedMessage === undefined) {
|
|
280
|
+
if (activeMappers === undefined) {
|
|
281
|
+
continue;
|
|
282
|
+
}
|
|
283
|
+
activeMappers = undefined;
|
|
284
|
+
if (withDisconnectMessages === true && previousLocalTimestamp !== undefined) {
|
|
285
|
+
const disconnect = {
|
|
286
|
+
type: 'disconnect',
|
|
287
|
+
exchange,
|
|
288
|
+
localTimestamp: previousLocalTimestamp,
|
|
289
|
+
symbols
|
|
290
|
+
};
|
|
291
|
+
yield disconnect;
|
|
292
|
+
}
|
|
293
|
+
continue;
|
|
294
|
+
}
|
|
295
|
+
const { localTimestamp, message } = decodedMessage;
|
|
296
|
+
if (activeMappers === undefined) {
|
|
297
|
+
activeMappers = createMappersAt(localTimestamp);
|
|
298
|
+
}
|
|
299
|
+
previousLocalTimestamp = localTimestamp;
|
|
300
|
+
for (let mapperIndex = 0; mapperIndex < activeMappers.length; mapperIndex++) {
|
|
301
|
+
const mapper = activeMappers[mapperIndex];
|
|
302
|
+
if (mapper.canHandle(message)) {
|
|
303
|
+
const mappedMessages = mapper.map(message, localTimestamp);
|
|
304
|
+
if (!mappedMessages) {
|
|
305
|
+
continue;
|
|
306
|
+
}
|
|
307
|
+
for (const normalizedMessage of mappedMessages) {
|
|
308
|
+
if (filter === undefined || filter(normalizedMessage.symbol)) {
|
|
309
|
+
yield normalizedMessage;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
if (decodingFailed) {
|
|
316
|
+
throw decodingError;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
function getReplayNormalizedSegments(exchange, normalizers, fromDate, toDate) {
|
|
321
|
+
const fromTime = fromDate.valueOf();
|
|
322
|
+
const toTime = toDate.valueOf();
|
|
323
|
+
if (Number.isFinite(fromTime) === false || Number.isFinite(toTime) === false || fromTime >= toTime) {
|
|
324
|
+
return [{ from: fromDate, to: toDate }];
|
|
325
|
+
}
|
|
326
|
+
const switchTimes = new Set();
|
|
327
|
+
for (const normalizer of normalizers) {
|
|
328
|
+
const switchDates = normalizer.getSwitchDates?.(exchange) ?? [];
|
|
329
|
+
for (const switchDate of switchDates) {
|
|
330
|
+
const switchTime = switchDate.valueOf();
|
|
331
|
+
if (fromTime < switchTime && switchTime < toTime) {
|
|
332
|
+
switchTimes.add(switchTime);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
const switchDates = [...switchTimes].sort((a, b) => a - b).map((switchTime) => new Date(switchTime));
|
|
337
|
+
const segments = [];
|
|
338
|
+
let segmentFrom = fromDate;
|
|
339
|
+
for (const switchDate of switchDates) {
|
|
340
|
+
segments.push({ from: segmentFrom, to: switchDate });
|
|
341
|
+
segmentFrom = switchDate;
|
|
342
|
+
}
|
|
343
|
+
segments.push({ from: segmentFrom, to: toDate });
|
|
344
|
+
return segments;
|
|
345
|
+
}
|
|
346
|
+
function validateReplayOptions(exchange, from, to, filters) {
|
|
347
|
+
if (!exchange || EXCHANGES.includes(exchange) === false) {
|
|
348
|
+
throw new Error(`Invalid "exchange" argument: ${exchange}. Please provide one of the following exchanges: ${EXCHANGES.join(', ')}.`);
|
|
349
|
+
}
|
|
350
|
+
if (!from || isNaN(Date.parse(from))) {
|
|
351
|
+
throw new Error(`Invalid "from" argument: ${from}. Please provide valid date string.`);
|
|
352
|
+
}
|
|
353
|
+
if (!to || isNaN(Date.parse(to))) {
|
|
354
|
+
throw new Error(`Invalid "to" argument: ${to}. Please provide valid date string.`);
|
|
355
|
+
}
|
|
356
|
+
if (parseAsUTCDate(to) < parseAsUTCDate(from)) {
|
|
357
|
+
throw new Error(`Invalid "to" and "from" arguments combination. Please provide "to" date that is later than "from" date.`);
|
|
358
|
+
}
|
|
359
|
+
if (filters && filters.length > 0) {
|
|
360
|
+
for (let i = 0; i < filters.length; i++) {
|
|
361
|
+
const filter = filters[i];
|
|
362
|
+
if (!filter.channel || EXCHANGE_CHANNELS_INFO[exchange].includes(filter.channel) === false) {
|
|
363
|
+
throw new Error(`Invalid "filters[].channel" argument: ${filter.channel}. Please provide one of the following channels: ${EXCHANGE_CHANNELS_INFO[exchange].join(', ')}.`);
|
|
364
|
+
}
|
|
365
|
+
if (filter.symbols && Array.isArray(filter.symbols) === false) {
|
|
366
|
+
throw new Error(`Invalid "filters[].symbols" argument: ${filter.symbols}. Please provide array of symbol strings`);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
function validateReplayNormalizedOptions(fromDate, normalizers) {
|
|
372
|
+
const hasBookChangeNormalizer = normalizers.some((n) => n === normalizeBookChanges);
|
|
373
|
+
const dateDoesNotStartAtTheBeginningOfTheDay = fromDate.getUTCHours() !== 0 || fromDate.getUTCMinutes() !== 0;
|
|
374
|
+
if (hasBookChangeNormalizer && dateDoesNotStartAtTheBeginningOfTheDay) {
|
|
375
|
+
debug('Initial order book snapshots are available only at 00:00 UTC');
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
class ReliableWorker extends EventEmitter {
|
|
379
|
+
_payload;
|
|
380
|
+
_errorsCount = 0;
|
|
381
|
+
_worker = undefined;
|
|
382
|
+
constructor(_payload) {
|
|
383
|
+
super();
|
|
384
|
+
this._payload = _payload;
|
|
385
|
+
this._initWorker();
|
|
386
|
+
}
|
|
387
|
+
_initWorker() {
|
|
388
|
+
this._worker = new Worker(new URL('./worker.js', import.meta.url), {
|
|
389
|
+
workerData: this._payload
|
|
390
|
+
});
|
|
391
|
+
this._worker.on('message', (message) => {
|
|
392
|
+
this.emit('message', message);
|
|
393
|
+
});
|
|
394
|
+
this._worker.on('error', this._handleError);
|
|
395
|
+
this._worker.on('exit', (code) => {
|
|
396
|
+
debug('worker finished with code: %d', code);
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
_handleError = async (err) => {
|
|
400
|
+
debug('underlying worker error %o', err);
|
|
401
|
+
if (err.message.includes('HttpError') === false && this._errorsCount < 30) {
|
|
402
|
+
this._errorsCount++;
|
|
403
|
+
const delayMS = Math.min(Math.pow(2, this._errorsCount) * 1000, 120 * 1000);
|
|
404
|
+
debug('re-init worker after: %d ms', delayMS);
|
|
405
|
+
await wait(delayMS);
|
|
406
|
+
// it was most likely unhandled socket hang up error, let's retry first with new worker and don't emit error right away
|
|
407
|
+
this._initWorker();
|
|
408
|
+
}
|
|
409
|
+
else {
|
|
410
|
+
this.emit('error', err);
|
|
411
|
+
}
|
|
412
|
+
};
|
|
413
|
+
getUnderlyingWorker() {
|
|
414
|
+
return this._worker;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
//# sourceMappingURL=replay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replay.js","sourceRoot":"","sources":["../src/replay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAA;AACrC,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,MAAM,CAAA;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAC/D,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,OAAO,EAAE,4BAA4B,EAAE,UAAU,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AACpG,OAAO,EAAyB,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AASzC,MAAM,wBAAwB,GAAG,EAAE,CAAA;AACnC,MAAM,UAAU,GAAG,GAAG,GAAG,IAAI,CAAA;AAC7B,yDAAyD;AACzD,0GAA0G;AAC1G,MAAM,YAAY,GAAG;IACnB,SAAS,EAAE,UAAU;IACrB,KAAK,EAAE,SAAS,CAAC,YAAY;IAC7B,WAAW,EAAE,SAAS,CAAC,YAAY;CACpC,CAAA;AAKD,MAAM,CAAC,KAAK,SAAS,CAAC,CAAC,MAAM,CAA2E,EACtG,QAAQ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AM,IAAI,CAAC,OAAO,CAAC,CAAA;YACnB,uHAAuH;YACvH,IAAI,CAAC,WAAW,EAAE,CAAA;QACpB,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAA;QACzB,CAAC;IACH,CAAC,CAAA;IAEM,mBAAmB;QACxB,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;CACF"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { MapperFactory } from './mappers/index.ts';
|
|
2
|
+
import { Disconnect, Exchange, FilterForExchange } from './types.ts';
|
|
3
|
+
type MapperOutput<T> = T extends MapperFactory<any, infer U> ? U : never;
|
|
4
|
+
type StreamNormalizedMessage<U extends readonly MapperFactory<any, any>[], Z extends boolean> = Z extends true ? MapperOutput<U[number]> | Disconnect : MapperOutput<U[number]>;
|
|
5
|
+
export declare function stream<T extends Exchange, U extends boolean = false>({ exchange, filters, timeoutIntervalMS, withDisconnects, onError }: StreamOptions<T, U>): AsyncIterableIterator<U extends true ? {
|
|
6
|
+
localTimestamp: Date;
|
|
7
|
+
message: any;
|
|
8
|
+
} | undefined : {
|
|
9
|
+
localTimestamp: Date;
|
|
10
|
+
message: any;
|
|
11
|
+
}>;
|
|
12
|
+
export type StreamOptions<T extends Exchange, U extends boolean = false> = {
|
|
13
|
+
exchange: T;
|
|
14
|
+
filters: FilterForExchange[T][];
|
|
15
|
+
timeoutIntervalMS?: number;
|
|
16
|
+
withDisconnects?: U;
|
|
17
|
+
onError?: (error: Error) => void;
|
|
18
|
+
};
|
|
19
|
+
export type StreamNormalizedOptions<T extends Exchange, U extends boolean = false> = {
|
|
20
|
+
exchange: T;
|
|
21
|
+
symbols?: string[];
|
|
22
|
+
timeoutIntervalMS?: number;
|
|
23
|
+
withDisconnectMessages?: U;
|
|
24
|
+
onError?: (error: Error) => void;
|
|
25
|
+
};
|
|
26
|
+
export declare function streamNormalized<T extends Exchange, U extends MapperFactory<T, any>[], Z extends boolean = false>({ exchange, symbols, timeoutIntervalMS, withDisconnectMessages, onError }: StreamNormalizedOptions<T, Z>, ...normalizers: U): AsyncIterableIterator<StreamNormalizedMessage<U, Z>>;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=stream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../src/stream.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAGlD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAU,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAE5E,KAAK,YAAY,CAAC,CAAC,IAAI,CAAC,SAAS,aAAa,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AACxE,KAAK,uBAAuB,CAAC,CAAC,SAAS,SAAS,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,SAAS,OAAO,IAAI,CAAC,SAAS,IAAI,GAC1G,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,UAAU,GACpC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;AAkD3B,wBAAgB,MAAM,CAAC,CAAC,SAAS,QAAQ,EAAE,CAAC,SAAS,OAAO,GAAG,KAAK,EAAE,EACpE,QAAQ,EACR,OAAO,EACP,iBAAyB,EACzB,eAA2B,EAC3B,OAAmB,EACpB,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,qBAAqB,CAC5C,CAAC,SAAS,IAAI,GAAG;IAAE,cAAc,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,GAAG,CAAA;CAAE,GAAG,SAAS,GAAG;IAAE,cAAc,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,GAAG,CAAA;CAAE,CAC7G,CASA;AA+ED,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,QAAQ,EAAE,CAAC,SAAS,OAAO,GAAG,KAAK,IAAI;IACzE,QAAQ,EAAE,CAAC,CAAA;IACX,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAA;IAC/B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,eAAe,CAAC,EAAE,CAAC,CAAA;IACnB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;CACjC,CAAA;AAED,MAAM,MAAM,uBAAuB,CAAC,CAAC,SAAS,QAAQ,EAAE,CAAC,SAAS,OAAO,GAAG,KAAK,IAAI;IACnF,QAAQ,EAAE,CAAC,CAAA;IACX,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,sBAAsB,CAAC,EAAE,CAAC,CAAA;IAC1B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;CACjC,CAAA;AAED,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,QAAQ,EAAE,CAAC,SAAS,aAAa,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,SAAS,OAAO,GAAG,KAAK,EAC/G,EAAE,QAAQ,EAAE,OAAO,EAAE,iBAAyB,EAAE,sBAAkC,EAAE,OAAmB,EAAE,EAAE,uBAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,EACxI,GAAG,WAAW,EAAE,CAAC,GAChB,qBAAqB,CAAC,uBAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAUtD"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { debug } from "./debug.js";
|
|
2
|
+
import { createNormalizedSymbolFilter, getFilters, normalizeMessages } from "./handy.js";
|
|
3
|
+
import { createManagedRealTimeIterator } from "./realtimeiterator.js";
|
|
4
|
+
import { createRealTimeFeed } from "./realtimefeeds/index.js";
|
|
5
|
+
async function* _stream({ exchange, filters, timeoutIntervalMS = 10000, withDisconnects = undefined, onError = undefined }, state) {
|
|
6
|
+
validateStreamOptions(filters);
|
|
7
|
+
const realTimeFeed = createRealTimeFeed(exchange, filters, timeoutIntervalMS, onError);
|
|
8
|
+
const messages = realTimeFeed[Symbol.asyncIterator]();
|
|
9
|
+
state.activeIterator = messages;
|
|
10
|
+
try {
|
|
11
|
+
while (true) {
|
|
12
|
+
const result = await messages.next();
|
|
13
|
+
if (result.done) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const message = result.value;
|
|
17
|
+
if (message.__disconnect__ === true) {
|
|
18
|
+
// __disconnect__ message means that websocket connection has been closed
|
|
19
|
+
// notify about it by yielding undefined if flag is set
|
|
20
|
+
if (withDisconnects) {
|
|
21
|
+
yield undefined;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
yield {
|
|
26
|
+
localTimestamp: new Date(),
|
|
27
|
+
message
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
finally {
|
|
33
|
+
if (state.activeIterator === messages) {
|
|
34
|
+
state.activeIterator = undefined;
|
|
35
|
+
await messages.return?.();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export function stream({ exchange, filters, timeoutIntervalMS = 10000, withDisconnects = undefined, onError = undefined }) {
|
|
40
|
+
const state = {};
|
|
41
|
+
const iterator = _stream({ exchange, filters, timeoutIntervalMS, withDisconnects, onError }, state);
|
|
42
|
+
return createManagedRealTimeIterator(iterator, () => {
|
|
43
|
+
const activeIterator = state.activeIterator;
|
|
44
|
+
state.activeIterator = undefined;
|
|
45
|
+
return activeIterator?.return?.();
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
async function* _streamNormalized({ exchange, symbols, timeoutIntervalMS = 10000, withDisconnectMessages = undefined, onError = undefined }, state, ...normalizers) {
|
|
49
|
+
while (state.closed === false) {
|
|
50
|
+
try {
|
|
51
|
+
const createMappers = (localTimestamp) => normalizers.map((m) => m(exchange, localTimestamp));
|
|
52
|
+
const mappers = createMappers(new Date());
|
|
53
|
+
const filters = getFilters(mappers, symbols);
|
|
54
|
+
const messages = stream({
|
|
55
|
+
exchange,
|
|
56
|
+
withDisconnects: true,
|
|
57
|
+
timeoutIntervalMS,
|
|
58
|
+
filters,
|
|
59
|
+
onError
|
|
60
|
+
});
|
|
61
|
+
state.activeIterator = messages;
|
|
62
|
+
// filter normalized messages by symbol as some exchanges do not offer subscribing to specific symbols for some of the channels
|
|
63
|
+
// for example Phemex market24h channel
|
|
64
|
+
const filter = createNormalizedSymbolFilter(symbols, filters);
|
|
65
|
+
const normalizedMessages = normalizeMessages(exchange, symbols, messages, mappers, createMappers, withDisconnectMessages, filter, new Date());
|
|
66
|
+
for await (const message of normalizedMessages) {
|
|
67
|
+
yield message;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
if (state.closed) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
if (onError !== undefined) {
|
|
75
|
+
onError(error);
|
|
76
|
+
}
|
|
77
|
+
debug('%s normalize messages error: %o, retrying with new connection...', exchange, error);
|
|
78
|
+
if (withDisconnectMessages) {
|
|
79
|
+
// yield it as disconnect as well if flag is set
|
|
80
|
+
const disconnect = {
|
|
81
|
+
type: 'disconnect',
|
|
82
|
+
exchange,
|
|
83
|
+
localTimestamp: new Date(),
|
|
84
|
+
symbols
|
|
85
|
+
};
|
|
86
|
+
yield disconnect;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
function validateStreamOptions(filters) {
|
|
92
|
+
if (!filters) {
|
|
93
|
+
throw new Error(`Invalid "filters" argument. Please provide filters array`);
|
|
94
|
+
}
|
|
95
|
+
for (let i = 0; i < filters.length; i++) {
|
|
96
|
+
const filter = filters[i];
|
|
97
|
+
if (filter.symbols && Array.isArray(filter.symbols) === false) {
|
|
98
|
+
throw new Error(`Invalid "filters[].symbols" argument: ${filter.symbols}. Please provide array of symbol strings`);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
export function streamNormalized({ exchange, symbols, timeoutIntervalMS = 10000, withDisconnectMessages = undefined, onError = undefined }, ...normalizers) {
|
|
103
|
+
const state = { closed: false };
|
|
104
|
+
const iterator = _streamNormalized({ exchange, symbols, timeoutIntervalMS, withDisconnectMessages, onError }, state, ...normalizers);
|
|
105
|
+
return createManagedRealTimeIterator(iterator, () => {
|
|
106
|
+
state.closed = true;
|
|
107
|
+
const activeIterator = state.activeIterator;
|
|
108
|
+
state.activeIterator = undefined;
|
|
109
|
+
return activeIterator?.return?.();
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=stream.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream.js","sourceRoot":"","sources":["../src/stream.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,4BAA4B,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAExF,OAAO,EAAE,6BAA6B,EAAgC,MAAM,uBAAuB,CAAA;AACnG,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAiB7D,KAAK,SAAS,CAAC,CAAC,OAAO,CACrB,EAAE,QAAQ,EAAE,OAAO,EAAE,iBAAiB,GAAG,KAAK,EAAE,eAAe,GAAG,SAAS,EAAE,OAAO,GAAG,SAAS,EAAuB,EACvH,KAAkB;IAElB,qBAAqB,CAAC,OAAO,CAAC,CAAA;IAE9B,MAAM,YAAY,GAAG,kBAAkB,CAAC,QAAQ,EAAE,OAAO,EAAE,iBAAiB,EAAE,OAAO,CAAC,CAAA;IACtF,MAAM,QAAQ,GAAG,YAAY,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAA;IACrD,KAAK,CAAC,cAAc,GAAG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