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,261 @@
|
|
|
1
|
+
import protobuf from 'protobufjs';
|
|
2
|
+
import { CircularBuffer, getJSON, wait } from "../handy.js";
|
|
3
|
+
import { RealTimeFeedBase } from "./realtimefeed.js";
|
|
4
|
+
export class MexcRealTimeFeed extends RealTimeFeedBase {
|
|
5
|
+
static depthChannel = 'spot@public.aggre.depth.v3.api.pb@10ms';
|
|
6
|
+
static depthSnapshotChannel = 'spot@public.aggre.depth.snapshot.v3.api.pb@10ms';
|
|
7
|
+
static jsonObjectStart = '{'.charCodeAt(0);
|
|
8
|
+
static pushDataV3ApiWrapper;
|
|
9
|
+
/**
|
|
10
|
+
* MEXC protobuf docs at @see https://www.mexc.com/api-docs/spot-v3/websocket-market-streams/protocol-buffers-integration
|
|
11
|
+
* and schemas from @see https://github.com/mexcdevelop/websocket-proto, mirrored in tardis-recorder/datafeeds/src/mexc/proto.
|
|
12
|
+
*/
|
|
13
|
+
static pushDataV3ApiWrapperSchema = `
|
|
14
|
+
syntax = "proto3";
|
|
15
|
+
|
|
16
|
+
message PushDataV3ApiWrapper {
|
|
17
|
+
string channel = 1;
|
|
18
|
+
oneof body {
|
|
19
|
+
PublicAggreDepthsV3Api publicAggreDepths = 313;
|
|
20
|
+
PublicAggreDealsV3Api publicAggreDeals = 314;
|
|
21
|
+
PublicAggreBookTickerV3Api publicAggreBookTicker = 315;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
optional string symbol = 3;
|
|
25
|
+
optional string symbolId = 4;
|
|
26
|
+
optional int64 createTime = 5;
|
|
27
|
+
optional int64 sendTime = 6;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
message PublicAggreDealsV3Api {
|
|
31
|
+
repeated PublicAggreDealsV3ApiItem deals = 1;
|
|
32
|
+
string eventType = 2;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
message PublicAggreDealsV3ApiItem {
|
|
36
|
+
string price = 1;
|
|
37
|
+
string quantity = 2;
|
|
38
|
+
int32 tradeType = 3;
|
|
39
|
+
int64 time = 4;
|
|
40
|
+
string tradeId = 5;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
message PublicAggreDepthsV3Api {
|
|
44
|
+
repeated PublicAggreDepthV3ApiItem asks = 1;
|
|
45
|
+
repeated PublicAggreDepthV3ApiItem bids = 2;
|
|
46
|
+
string eventType = 3;
|
|
47
|
+
string fromVersion = 4;
|
|
48
|
+
string toVersion = 5;
|
|
49
|
+
int64 lastOrderCreateTime = 6;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
message PublicAggreDepthV3ApiItem {
|
|
53
|
+
string price = 1;
|
|
54
|
+
string quantity = 2;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
message PublicAggreBookTickerV3Api {
|
|
58
|
+
string bidPrice = 1;
|
|
59
|
+
string bidQuantity = 2;
|
|
60
|
+
string askPrice = 3;
|
|
61
|
+
string askQuantity = 4;
|
|
62
|
+
string version = 5;
|
|
63
|
+
int64 lastOrderCreateTime = 6;
|
|
64
|
+
}
|
|
65
|
+
`;
|
|
66
|
+
pendingDepthSnapshotSymbols = new Set();
|
|
67
|
+
bufferedDepthUpdates = new Map();
|
|
68
|
+
wssURL = 'wss://wbs-api.mexc.com/ws';
|
|
69
|
+
httpURL = 'https://api.mexc.com';
|
|
70
|
+
channels = new Set([
|
|
71
|
+
'spot@public.aggre.deals.v3.api.pb@10ms',
|
|
72
|
+
MexcRealTimeFeed.depthChannel,
|
|
73
|
+
MexcRealTimeFeed.depthSnapshotChannel,
|
|
74
|
+
'spot@public.aggre.bookTicker.v3.api.pb@10ms'
|
|
75
|
+
]);
|
|
76
|
+
mapToSubscribeMessages(filters) {
|
|
77
|
+
const filtersWithSymbols = filters.map((filter) => {
|
|
78
|
+
if (!this.channels.has(filter.channel)) {
|
|
79
|
+
throw new Error(`MexcRealTimeFeed unsupported channel ${filter.channel}`);
|
|
80
|
+
}
|
|
81
|
+
if (!filter.symbols || filter.symbols.length === 0) {
|
|
82
|
+
throw new Error('MexcRealTimeFeed requires explicitly specified symbols when subscribing to live feed');
|
|
83
|
+
}
|
|
84
|
+
return filter;
|
|
85
|
+
});
|
|
86
|
+
const depthSnapshotFilters = filtersWithSymbols.filter((filter) => filter.channel === MexcRealTimeFeed.depthSnapshotChannel);
|
|
87
|
+
this.validateDepthSnapshotFilters(filtersWithSymbols, depthSnapshotFilters);
|
|
88
|
+
this.resetDepthSnapshotTracking(depthSnapshotFilters);
|
|
89
|
+
return [
|
|
90
|
+
{
|
|
91
|
+
method: 'SUBSCRIPTION',
|
|
92
|
+
params: filtersWithSymbols.flatMap((filter) => filter.channel === MexcRealTimeFeed.depthSnapshotChannel
|
|
93
|
+
? []
|
|
94
|
+
: filter.symbols.map((symbol) => `${filter.channel}@${symbol.toUpperCase()}`))
|
|
95
|
+
}
|
|
96
|
+
];
|
|
97
|
+
}
|
|
98
|
+
parseMessage(message) {
|
|
99
|
+
const buffer = Buffer.isBuffer(message) ? message : Buffer.from(message);
|
|
100
|
+
if (buffer.length > 0 && buffer[0] === MexcRealTimeFeed.jsonObjectStart) {
|
|
101
|
+
return JSON.parse(buffer.toString());
|
|
102
|
+
}
|
|
103
|
+
const pushDataV3ApiWrapper = this.getPushDataV3ApiWrapper();
|
|
104
|
+
return pushDataV3ApiWrapper.toObject(pushDataV3ApiWrapper.decode(buffer), {
|
|
105
|
+
longs: String,
|
|
106
|
+
arrays: true
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
messageIsError(message) {
|
|
110
|
+
return message.code !== undefined && message.code !== 0;
|
|
111
|
+
}
|
|
112
|
+
messageIsHeartbeat(message) {
|
|
113
|
+
return message.msg === 'PONG';
|
|
114
|
+
}
|
|
115
|
+
onMessage(message) {
|
|
116
|
+
if (message.channel?.startsWith(MexcRealTimeFeed.depthChannel) !== true ||
|
|
117
|
+
message.symbol === undefined ||
|
|
118
|
+
this.pendingDepthSnapshotSymbols.has(message.symbol) === false) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
const firstVersion = Number(message.publicAggreDepths?.fromVersion);
|
|
122
|
+
const lastVersion = Number(message.publicAggreDepths?.toVersion);
|
|
123
|
+
if (Number.isFinite(firstVersion) === false || Number.isFinite(lastVersion) === false) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
const bufferedUpdates = this.bufferedDepthUpdates.get(message.symbol) ?? new CircularBuffer(2000);
|
|
127
|
+
bufferedUpdates.append({ firstVersion, lastVersion });
|
|
128
|
+
this.bufferedDepthUpdates.set(message.symbol, bufferedUpdates);
|
|
129
|
+
}
|
|
130
|
+
async provideManualSnapshots(filters, shouldCancel) {
|
|
131
|
+
const depthFilter = filters.find((filter) => filter.channel === MexcRealTimeFeed.depthSnapshotChannel);
|
|
132
|
+
if (depthFilter === undefined) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
this.debug('requesting manual snapshots for: %s', depthFilter.symbols);
|
|
136
|
+
for (const symbol of depthFilter.symbols) {
|
|
137
|
+
await this.provideManualSnapshot(symbol.toUpperCase(), shouldCancel);
|
|
138
|
+
}
|
|
139
|
+
this.debug('requested manual snapshots successfully for: %s ', depthFilter.symbols);
|
|
140
|
+
}
|
|
141
|
+
sendCustomPing = () => {
|
|
142
|
+
this.send({ method: 'PING' });
|
|
143
|
+
};
|
|
144
|
+
getPushDataV3ApiWrapper() {
|
|
145
|
+
MexcRealTimeFeed.pushDataV3ApiWrapper ??= protobuf
|
|
146
|
+
.parse(MexcRealTimeFeed.pushDataV3ApiWrapperSchema)
|
|
147
|
+
.root.lookupType('PushDataV3ApiWrapper');
|
|
148
|
+
return MexcRealTimeFeed.pushDataV3ApiWrapper;
|
|
149
|
+
}
|
|
150
|
+
resetDepthSnapshotTracking(filters) {
|
|
151
|
+
this.pendingDepthSnapshotSymbols.clear();
|
|
152
|
+
this.bufferedDepthUpdates.clear();
|
|
153
|
+
for (const filter of filters) {
|
|
154
|
+
for (const symbol of filter.symbols) {
|
|
155
|
+
const upperCaseSymbol = symbol.toUpperCase();
|
|
156
|
+
this.pendingDepthSnapshotSymbols.add(upperCaseSymbol);
|
|
157
|
+
this.bufferedDepthUpdates.set(upperCaseSymbol, new CircularBuffer(2000));
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
validateDepthSnapshotFilters(filters, depthSnapshotFilters) {
|
|
162
|
+
if (depthSnapshotFilters.length === 0) {
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
const depthSymbols = new Set(filters
|
|
166
|
+
.filter((filter) => filter.channel === MexcRealTimeFeed.depthChannel)
|
|
167
|
+
.flatMap((filter) => filter.symbols.map((symbol) => symbol.toUpperCase())));
|
|
168
|
+
for (const filter of depthSnapshotFilters) {
|
|
169
|
+
for (const symbol of filter.symbols) {
|
|
170
|
+
if (depthSymbols.has(symbol.toUpperCase()) === false) {
|
|
171
|
+
throw new Error(`MexcRealTimeFeed requires ${MexcRealTimeFeed.depthChannel} for every ${MexcRealTimeFeed.depthSnapshotChannel} symbol`);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
async provideManualSnapshot(symbol, shouldCancel) {
|
|
177
|
+
const maxSnapshotRounds = 4;
|
|
178
|
+
const maxSnapshotAttemptsPerRound = 3;
|
|
179
|
+
for (let round = 0; round < maxSnapshotRounds; round++) {
|
|
180
|
+
for (let attempt = 1; attempt <= maxSnapshotAttemptsPerRound; attempt++) {
|
|
181
|
+
if (shouldCancel()) {
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
const { data } = await getJSON(`${this.httpURL}/api/v3/depth?symbol=${symbol}&limit=5000`);
|
|
185
|
+
if (this.snapshotResponseIsValid(data) === false) {
|
|
186
|
+
if (attempt < maxSnapshotAttemptsPerRound) {
|
|
187
|
+
await wait(attempt * 1000);
|
|
188
|
+
}
|
|
189
|
+
continue;
|
|
190
|
+
}
|
|
191
|
+
const hasOverlap = await this.waitForSnapshotOverlap(symbol, data.lastUpdateId);
|
|
192
|
+
if (shouldCancel()) {
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
if (hasOverlap === false) {
|
|
196
|
+
this.trimBufferedUpdates(symbol);
|
|
197
|
+
if (attempt < maxSnapshotAttemptsPerRound) {
|
|
198
|
+
await wait(attempt * 1000);
|
|
199
|
+
}
|
|
200
|
+
continue;
|
|
201
|
+
}
|
|
202
|
+
if (hasOverlap === true || attempt === maxSnapshotAttemptsPerRound) {
|
|
203
|
+
this.manualSnapshotsBuffer.push(this.createManualSnapshot(symbol, data));
|
|
204
|
+
this.pendingDepthSnapshotSymbols.delete(symbol);
|
|
205
|
+
this.bufferedDepthUpdates.delete(symbol);
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
throw new Error(`MexcRealTimeFeed could not align depth snapshot for ${symbol}`);
|
|
211
|
+
}
|
|
212
|
+
async waitForSnapshotOverlap(symbol, lastUpdateId) {
|
|
213
|
+
let hasOverlap = this.validateSnapshotOverlap(symbol, lastUpdateId);
|
|
214
|
+
for (let attempt = 0; attempt < 60; attempt++) {
|
|
215
|
+
if (hasOverlap !== undefined) {
|
|
216
|
+
return hasOverlap;
|
|
217
|
+
}
|
|
218
|
+
await wait(100);
|
|
219
|
+
hasOverlap = this.validateSnapshotOverlap(symbol, lastUpdateId);
|
|
220
|
+
}
|
|
221
|
+
return hasOverlap;
|
|
222
|
+
}
|
|
223
|
+
validateSnapshotOverlap(symbol, lastUpdateId) {
|
|
224
|
+
const bufferedUpdates = this.bufferedDepthUpdates.get(symbol);
|
|
225
|
+
for (const update of bufferedUpdates?.items() ?? []) {
|
|
226
|
+
if (update.lastVersion <= lastUpdateId) {
|
|
227
|
+
continue;
|
|
228
|
+
}
|
|
229
|
+
return update.firstVersion <= lastUpdateId + 1 && update.lastVersion >= lastUpdateId + 1;
|
|
230
|
+
}
|
|
231
|
+
return undefined;
|
|
232
|
+
}
|
|
233
|
+
trimBufferedUpdates(symbol) {
|
|
234
|
+
const bufferedUpdates = this.bufferedDepthUpdates.get(symbol);
|
|
235
|
+
if (bufferedUpdates === undefined || bufferedUpdates.count <= 100) {
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
const trimmed = new CircularBuffer(2000);
|
|
239
|
+
for (const update of [...bufferedUpdates.items()].slice(-100)) {
|
|
240
|
+
trimmed.append(update);
|
|
241
|
+
}
|
|
242
|
+
this.bufferedDepthUpdates.set(symbol, trimmed);
|
|
243
|
+
}
|
|
244
|
+
snapshotResponseIsValid(data) {
|
|
245
|
+
return Number.isFinite(data.lastUpdateId) && Array.isArray(data.asks) && Array.isArray(data.bids);
|
|
246
|
+
}
|
|
247
|
+
createManualSnapshot(symbol, data) {
|
|
248
|
+
return {
|
|
249
|
+
channel: `${MexcRealTimeFeed.depthSnapshotChannel}@${symbol}`,
|
|
250
|
+
symbol,
|
|
251
|
+
generated: true,
|
|
252
|
+
publicAggreDepthsSnapshot: {
|
|
253
|
+
lastUpdateId: data.lastUpdateId,
|
|
254
|
+
asks: data.asks,
|
|
255
|
+
bids: data.bids,
|
|
256
|
+
timestamp: data.timestamp
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
//# sourceMappingURL=mexc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mexc.js","sourceRoot":"","sources":["../../src/realtimefeeds/mexc.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAA;AACjC,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAG3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEpD,MAAM,OAAO,gBAAiB,SAAQ,gBAAgB;IAC5C,MAAM,CAAU,YAAY,GAAG,wCAAwC,CAAA;IACvE,MAAM,CAAU,oBAAoB,GAAG,iDAAiD,CAAA;IACxF,MAAM,CAAU,eAAe,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA;IACnD,MAAM,CAAC,oBAAoB,CAA2B;IAC9D;;;OAGG;IACK,MAAM,CAAU,0BAA0B,GAAG;;;;;;;;;;;;;;;;;;;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AAgB,CAAC,oBAAoB,IAAI,MAAM,EAAE;YAC7D,MAAM;YACN,SAAS,EAAE,IAAI;YACf,yBAAyB,EAAE;gBACzB,YAAY,EAAE,IAAI,CAAC,YAAY;gBAC/B,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,SAAS,EAAE,IAAI,CAAC,SAAS;aAC1B;SACF,CAAA;IACH,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Filter } from '../types.ts';
|
|
2
|
+
import { RealTimeFeedBase } from './realtimefeed.ts';
|
|
3
|
+
export declare class MexcFuturesRealTimeFeed extends RealTimeFeedBase {
|
|
4
|
+
private readonly pendingDepthSnapshotSymbols;
|
|
5
|
+
private readonly bufferedDepthUpdates;
|
|
6
|
+
protected readonly wssURL = "wss://contract.mexc.com";
|
|
7
|
+
protected readonly httpURL: string;
|
|
8
|
+
protected readonly channelToSubscriptionMethod: Map<string, string>;
|
|
9
|
+
protected sendCustomPing: () => void;
|
|
10
|
+
protected getWebSocketUrl(): Promise<string>;
|
|
11
|
+
protected mapToSubscribeMessages(filters: Filter<string>[]): any[];
|
|
12
|
+
private resetDepthSnapshotTracking;
|
|
13
|
+
private validateDepthSnapshotFilters;
|
|
14
|
+
protected onMessage(message: any): void;
|
|
15
|
+
protected provideManualSnapshots(filters: Filter<string>[], shouldCancel: () => boolean): Promise<void>;
|
|
16
|
+
protected messageIsError(message: any): boolean;
|
|
17
|
+
protected messageIsHeartbeat(message: any): boolean;
|
|
18
|
+
private provideManualSnapshot;
|
|
19
|
+
private waitForSnapshotOverlap;
|
|
20
|
+
private validateSnapshotOverlap;
|
|
21
|
+
private trimBufferedUpdates;
|
|
22
|
+
private snapshotResponseIsValid;
|
|
23
|
+
private createManualSnapshot;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=mexcfutures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mexcfutures.d.ts","sourceRoot":"","sources":["../../src/realtimefeeds/mexcfutures.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEpD,qBAAa,uBAAwB,SAAQ,gBAAgB;IAC3D,OAAO,CAAC,QAAQ,CAAC,2BAA2B,CAAoB;IAChE,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAgE;IACrG,SAAS,CAAC,QAAQ,CAAC,MAAM,6BAA4B;IACrD,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAA8B;IAChE,SAAS,CAAC,QAAQ,CAAC,2BAA2B,sBAQ5C;IAEF,UAAmB,cAAc,aAEhC;cAEwB,eAAe;cAIrB,sBAAsB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,GAAG,EAAE;IAsC3E,OAAO,CAAC,0BAA0B;IAalC,OAAO,CAAC,4BAA4B;cAkBjB,SAAS,CAAC,OAAO,EAAE,GAAG;cA0BhB,sBAAsB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,YAAY,EAAE,MAAM,OAAO;cAenF,cAAc,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO;cAIrC,kBAAkB,CAAC,OAAO,EAAE,GAAG;YAIpC,qBAAqB;YA4CrB,sBAAsB;IAcpC,OAAO,CAAC,uBAAuB;IAa/B,OAAO,CAAC,mBAAmB;IAa3B,OAAO,CAAC,uBAAuB;IAY/B,OAAO,CAAC,oBAAoB;CAc7B"}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { CircularBuffer, getJSON, wait } from "../handy.js";
|
|
2
|
+
import { RealTimeFeedBase } from "./realtimefeed.js";
|
|
3
|
+
export class MexcFuturesRealTimeFeed extends RealTimeFeedBase {
|
|
4
|
+
pendingDepthSnapshotSymbols = new Set();
|
|
5
|
+
bufferedDepthUpdates = new Map();
|
|
6
|
+
wssURL = 'wss://contract.mexc.com';
|
|
7
|
+
httpURL = 'https://contract.mexc.com';
|
|
8
|
+
channelToSubscriptionMethod = new Map([
|
|
9
|
+
['push.deal', 'sub.deal'],
|
|
10
|
+
['push.depth', 'sub.depth'],
|
|
11
|
+
['push.ticker', 'sub.ticker'],
|
|
12
|
+
['push.index.price', 'sub.index.price'],
|
|
13
|
+
['push.fair.price', 'sub.fair.price'],
|
|
14
|
+
['push.funding.rate', 'sub.funding.rate'],
|
|
15
|
+
['push.contract', 'sub.contract']
|
|
16
|
+
]);
|
|
17
|
+
sendCustomPing = () => {
|
|
18
|
+
this.send({ method: 'ping' });
|
|
19
|
+
};
|
|
20
|
+
async getWebSocketUrl() {
|
|
21
|
+
return 'wss://contract.mexc.com/edge';
|
|
22
|
+
}
|
|
23
|
+
mapToSubscribeMessages(filters) {
|
|
24
|
+
const filtersWithSymbols = filters.map((filter) => {
|
|
25
|
+
if (filter.channel === 'push.contract') {
|
|
26
|
+
return { ...filter, symbols: [] };
|
|
27
|
+
}
|
|
28
|
+
if (filter.channel !== 'push.depth.snapshot' && this.channelToSubscriptionMethod.has(filter.channel) === false) {
|
|
29
|
+
throw new Error(`Unsupported MEXC futures channel ${filter.channel}`);
|
|
30
|
+
}
|
|
31
|
+
if (!filter.symbols || filter.symbols.length === 0) {
|
|
32
|
+
throw new Error('MexcFuturesRealTimeFeed requires explicitly specified symbols when subscribing to live feed');
|
|
33
|
+
}
|
|
34
|
+
return filter;
|
|
35
|
+
});
|
|
36
|
+
const depthSnapshotFilters = filtersWithSymbols.filter((filter) => filter.channel === 'push.depth.snapshot');
|
|
37
|
+
this.validateDepthSnapshotFilters(filtersWithSymbols, depthSnapshotFilters);
|
|
38
|
+
this.resetDepthSnapshotTracking(depthSnapshotFilters);
|
|
39
|
+
return filtersWithSymbols.flatMap((filter) => {
|
|
40
|
+
if (filter.channel === 'push.depth.snapshot') {
|
|
41
|
+
return [];
|
|
42
|
+
}
|
|
43
|
+
if (filter.channel === 'push.contract') {
|
|
44
|
+
return [{ method: this.channelToSubscriptionMethod.get(filter.channel) }];
|
|
45
|
+
}
|
|
46
|
+
return filter.symbols.map((symbol) => ({
|
|
47
|
+
method: this.channelToSubscriptionMethod.get(filter.channel),
|
|
48
|
+
param: { symbol },
|
|
49
|
+
gzip: false
|
|
50
|
+
}));
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
resetDepthSnapshotTracking(filters) {
|
|
54
|
+
this.pendingDepthSnapshotSymbols.clear();
|
|
55
|
+
this.bufferedDepthUpdates.clear();
|
|
56
|
+
for (const filter of filters) {
|
|
57
|
+
for (const symbol of filter.symbols) {
|
|
58
|
+
const upperCaseSymbol = symbol.toUpperCase();
|
|
59
|
+
this.pendingDepthSnapshotSymbols.add(upperCaseSymbol);
|
|
60
|
+
this.bufferedDepthUpdates.set(upperCaseSymbol, new CircularBuffer(2000));
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
validateDepthSnapshotFilters(filters, depthSnapshotFilters) {
|
|
65
|
+
if (depthSnapshotFilters.length === 0) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const depthSymbols = new Set(filters.filter((filter) => filter.channel === 'push.depth').flatMap((filter) => filter.symbols.map((symbol) => symbol.toUpperCase())));
|
|
69
|
+
for (const filter of depthSnapshotFilters) {
|
|
70
|
+
for (const symbol of filter.symbols) {
|
|
71
|
+
if (depthSymbols.has(symbol.toUpperCase()) === false) {
|
|
72
|
+
throw new Error('MexcFuturesRealTimeFeed requires push.depth for every push.depth.snapshot symbol');
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
onMessage(message) {
|
|
78
|
+
if (message.channel !== 'push.depth' ||
|
|
79
|
+
message.symbol === undefined ||
|
|
80
|
+
this.pendingDepthSnapshotSymbols.has(message.symbol) === false) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const firstVersion = Number(message.data?.begin !== undefined && message.data.begin !== null && message.data.begin !== 0
|
|
84
|
+
? message.data.begin
|
|
85
|
+
: message.data?.version);
|
|
86
|
+
const lastVersion = Number(message.data?.end !== undefined && message.data.end !== null && message.data.end !== 0 ? message.data.end : message.data?.version);
|
|
87
|
+
if (Number.isFinite(firstVersion) === false || Number.isFinite(lastVersion) === false) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
const bufferedUpdates = this.bufferedDepthUpdates.get(message.symbol) ?? new CircularBuffer(2000);
|
|
91
|
+
bufferedUpdates.append({ firstVersion, lastVersion });
|
|
92
|
+
this.bufferedDepthUpdates.set(message.symbol, bufferedUpdates);
|
|
93
|
+
}
|
|
94
|
+
async provideManualSnapshots(filters, shouldCancel) {
|
|
95
|
+
const depthFilter = filters.find((filter) => filter.channel === 'push.depth.snapshot');
|
|
96
|
+
if (depthFilter === undefined) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
this.debug('requesting manual snapshots for: %s', depthFilter.symbols);
|
|
100
|
+
for (const symbol of depthFilter.symbols) {
|
|
101
|
+
await this.provideManualSnapshot(symbol.toUpperCase(), shouldCancel);
|
|
102
|
+
}
|
|
103
|
+
this.debug('requested manual snapshots successfully for: %s ', depthFilter.symbols);
|
|
104
|
+
}
|
|
105
|
+
messageIsError(message) {
|
|
106
|
+
return message.channel === 'rs.error' || message.success === false || message.error !== undefined;
|
|
107
|
+
}
|
|
108
|
+
messageIsHeartbeat(message) {
|
|
109
|
+
return message.channel === 'pong';
|
|
110
|
+
}
|
|
111
|
+
async provideManualSnapshot(symbol, shouldCancel) {
|
|
112
|
+
const maxSnapshotRounds = 4;
|
|
113
|
+
const maxSnapshotAttemptsPerRound = 3;
|
|
114
|
+
for (let round = 0; round < maxSnapshotRounds; round++) {
|
|
115
|
+
for (let attempt = 1; attempt <= maxSnapshotAttemptsPerRound; attempt++) {
|
|
116
|
+
if (shouldCancel()) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
const { data } = await getJSON(`${this.httpURL}/api/v1/contract/depth/${symbol}?limit=5000`);
|
|
120
|
+
if (this.snapshotResponseIsValid(data) === false) {
|
|
121
|
+
if (attempt < maxSnapshotAttemptsPerRound) {
|
|
122
|
+
await wait(attempt * 1000);
|
|
123
|
+
}
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
const hasOverlap = await this.waitForSnapshotOverlap(symbol, data.data.version);
|
|
127
|
+
if (shouldCancel()) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
if (hasOverlap === false) {
|
|
131
|
+
this.trimBufferedUpdates(symbol);
|
|
132
|
+
if (attempt < maxSnapshotAttemptsPerRound) {
|
|
133
|
+
await wait(attempt * 1000);
|
|
134
|
+
}
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
if (hasOverlap === true || attempt === maxSnapshotAttemptsPerRound) {
|
|
138
|
+
this.manualSnapshotsBuffer.push(this.createManualSnapshot(symbol, data.data));
|
|
139
|
+
this.pendingDepthSnapshotSymbols.delete(symbol);
|
|
140
|
+
this.bufferedDepthUpdates.delete(symbol);
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
throw new Error(`MexcFuturesRealTimeFeed could not align depth snapshot for ${symbol}`);
|
|
146
|
+
}
|
|
147
|
+
async waitForSnapshotOverlap(symbol, snapshotVersion) {
|
|
148
|
+
let hasOverlap = this.validateSnapshotOverlap(symbol, snapshotVersion);
|
|
149
|
+
for (let attempt = 0; attempt < 60; attempt++) {
|
|
150
|
+
if (hasOverlap !== undefined) {
|
|
151
|
+
return hasOverlap;
|
|
152
|
+
}
|
|
153
|
+
await wait(100);
|
|
154
|
+
hasOverlap = this.validateSnapshotOverlap(symbol, snapshotVersion);
|
|
155
|
+
}
|
|
156
|
+
return hasOverlap;
|
|
157
|
+
}
|
|
158
|
+
validateSnapshotOverlap(symbol, snapshotVersion) {
|
|
159
|
+
const bufferedUpdates = this.bufferedDepthUpdates.get(symbol);
|
|
160
|
+
for (const update of bufferedUpdates?.items() ?? []) {
|
|
161
|
+
if (update.lastVersion <= snapshotVersion) {
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
return update.firstVersion <= snapshotVersion + 1 && update.lastVersion >= snapshotVersion + 1;
|
|
165
|
+
}
|
|
166
|
+
return undefined;
|
|
167
|
+
}
|
|
168
|
+
trimBufferedUpdates(symbol) {
|
|
169
|
+
const bufferedUpdates = this.bufferedDepthUpdates.get(symbol);
|
|
170
|
+
if (bufferedUpdates === undefined || bufferedUpdates.count <= 100) {
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
const trimmed = new CircularBuffer(2000);
|
|
174
|
+
for (const update of [...bufferedUpdates.items()].slice(-100)) {
|
|
175
|
+
trimmed.append(update);
|
|
176
|
+
}
|
|
177
|
+
this.bufferedDepthUpdates.set(symbol, trimmed);
|
|
178
|
+
}
|
|
179
|
+
snapshotResponseIsValid(response) {
|
|
180
|
+
return (response.success === true &&
|
|
181
|
+
response.code === 0 &&
|
|
182
|
+
response.data !== undefined &&
|
|
183
|
+
Number.isFinite(response.data.version) &&
|
|
184
|
+
response.data.version >= 0 &&
|
|
185
|
+
Array.isArray(response.data.asks) &&
|
|
186
|
+
Array.isArray(response.data.bids));
|
|
187
|
+
}
|
|
188
|
+
createManualSnapshot(symbol, data) {
|
|
189
|
+
return {
|
|
190
|
+
channel: 'push.depth.snapshot',
|
|
191
|
+
symbol,
|
|
192
|
+
generated: true,
|
|
193
|
+
data: {
|
|
194
|
+
cts: data.cts,
|
|
195
|
+
asks: data.asks,
|
|
196
|
+
bids: data.bids,
|
|
197
|
+
timestamp: data.timestamp,
|
|
198
|
+
version: data.version
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
//# sourceMappingURL=mexcfutures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mexcfutures.js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D,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChD,CAAC;IAEO,uBAAuB,CAAC,QAA0C;QACxE,OAAO,CACL,QAAQ,CAAC,OAAO,KAAK,IAAI;YACzB,QAAQ,CAAC,IAAI,KAAK,CAAC;YACnB,QAAQ,CAAC,IAAI,KAAK,SAAS;YAC3B,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC;YACtC,QAAQ,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC;YAC1B,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;YACjC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAClC,CAAA;IACH,CAAC;IAEO,oBAAoB,CAAC,MAAc,EAAE,IAAkC;QAC7E,OAAO;YACL,OAAO,EAAE,qBAAqB;YAC9B,MAAM;YACN,SAAS,EAAE,IAAI;YACf,IAAI,EAAE;gBACJ,GAAG,EAAE,IAAI,CAAC,GAAG;gBACb,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB;SACF,CAAA;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Filter } from '../types.ts';
|
|
2
|
+
import { MultiConnectionRealTimeFeedBase, RealTimeFeedBase } from './realtimefeed.ts';
|
|
3
|
+
export declare class OkexRealTimeFeed extends MultiConnectionRealTimeFeedBase {
|
|
4
|
+
protected _getRealTimeFeeds(exchange: string, filters: Filter<string>[], timeoutIntervalMS?: number, onError?: (error: Error) => void): Generator<OkexSingleRealTimeFeed, void, unknown>;
|
|
5
|
+
}
|
|
6
|
+
declare class OkexSingleRealTimeFeed extends RealTimeFeedBase {
|
|
7
|
+
protected wssURL: string;
|
|
8
|
+
constructor(wssURL: string, exchange: string, filters: Filter<string>[], timeoutIntervalMS: number | undefined, onError?: (error: Error) => void);
|
|
9
|
+
private _hasCredentials;
|
|
10
|
+
private secondsSinceEpoch;
|
|
11
|
+
protected onConnected(): Promise<void>;
|
|
12
|
+
protected mapToSubscribeMessages(filters: Filter<string>[]): any[];
|
|
13
|
+
protected messageIsError(message: any): boolean;
|
|
14
|
+
protected isIgnoredError(message: any): boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare class OKCoinRealTimeFeed extends OkexSingleRealTimeFeed {
|
|
17
|
+
constructor(exchange: string, filters: Filter<string>[], timeoutIntervalMS: number | undefined, onError?: (error: Error) => void);
|
|
18
|
+
}
|
|
19
|
+
export declare class OkexOptionsRealTimeFeed extends MultiConnectionRealTimeFeedBase {
|
|
20
|
+
protected _getRealTimeFeeds(exchange: string, filters: Filter<string>[], timeoutIntervalMS?: number, onError?: (error: Error) => void): Generator<OkexOptionsSingleRealTimeFeed, void, unknown>;
|
|
21
|
+
}
|
|
22
|
+
declare class OkexOptionsSingleRealTimeFeed extends OkexSingleRealTimeFeed {
|
|
23
|
+
protected wssURL: string;
|
|
24
|
+
constructor(wssURL: string, exchange: string, filters: Filter<string>[], timeoutIntervalMS: number | undefined, onError?: (error: Error) => void);
|
|
25
|
+
private _defaultIndexes;
|
|
26
|
+
private _defaultOptionSummaryInstrumentFamilies;
|
|
27
|
+
private _channelRequiresIndexNotSymbol;
|
|
28
|
+
protected mapToSubscribeMessages(filters: Filter<string>[]): any[];
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=okex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"okex.d.ts","sourceRoot":"","sources":["../../src/realtimefeeds/okex.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,+BAA+B,EAAE,gBAAgB,EAAE,MAAM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