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 @@
|
|
|
1
|
+
{"version":3,"file":"hitbtc.js","sourceRoot":"","sources":["../../src/realtimefeeds/hitbtc.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAA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,EAAE,OAAO,EAAE,EAAE;YAChB,MAAM,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,OAAO,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;YACrG,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;gBACnC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;YACpB,CAAC;YAED,OAAO,IAAI,CAAA;QACb,CAAC,EACD,EAA0C,CAC3C,CAAA;QAEH,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,KAAK,EAAE,EAAE;YAC/C,OAAO;gBACL,MAAM,EAAE,YAAY,CAAC,MAAM;gBAC3B,MAAM,EAAE;oBACN,MAAM,EAAE,YAAY,CAAC,MAAM;iBAC5B;gBACD,EAAE,EAAE,KAAK,GAAG,CAAC;aACd,CAAA;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IAES,cAAc,CAAC,OAAY;QACnC,OAAO,OAAO,CAAC,KAAK,KAAK,SAAS,CAAA;IACpC,CAAC;CACF"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { Filter } from '../types.ts';
|
|
2
|
+
import { RealTimeFeedBase, MultiConnectionRealTimeFeedBase, PoolingClientBase } from './realtimefeed.ts';
|
|
3
|
+
import { Writable } from 'stream';
|
|
4
|
+
declare abstract class HuobiRealTimeFeedBase extends MultiConnectionRealTimeFeedBase {
|
|
5
|
+
protected abstract wssURL: string;
|
|
6
|
+
protected abstract httpURL: string;
|
|
7
|
+
protected abstract suffixes: {
|
|
8
|
+
[key: string]: string;
|
|
9
|
+
};
|
|
10
|
+
private _marketDataChannels;
|
|
11
|
+
private _notificationsChannels;
|
|
12
|
+
protected _getRealTimeFeeds(exchange: string, filters: Filter<string>[], timeoutIntervalMS?: number, onError?: (error: Error) => void): Generator<HuobiMarketDataRealTimeFeed | HuobiNotificationsRealTimeFeed | HuobiOpenInterestClient | HuobiOptionsMarketIndexClient | HuobiOptionsIndexClient, void, unknown>;
|
|
13
|
+
protected getOpenInterestURLPath(symbol: string): string;
|
|
14
|
+
}
|
|
15
|
+
declare class HuobiMarketDataRealTimeFeed extends RealTimeFeedBase {
|
|
16
|
+
protected wssURL: string;
|
|
17
|
+
private readonly _suffixes;
|
|
18
|
+
constructor(exchange: string, filters: Filter<string>[], wssURL: string, _suffixes: {
|
|
19
|
+
[key: string]: string;
|
|
20
|
+
}, timeoutIntervalMS: number | undefined, onError?: (error: Error) => void);
|
|
21
|
+
protected mapToSubscribeMessages(filters: Filter<string>[]): any[];
|
|
22
|
+
protected provideManualSnapshots(filters: Filter<string>[], shouldCancel: () => boolean): Promise<void>;
|
|
23
|
+
protected decompress: (message: any) => Buffer;
|
|
24
|
+
protected messageIsError(message: any): boolean;
|
|
25
|
+
protected isIgnoredError(message: any): boolean;
|
|
26
|
+
protected onMessage(message: any): void;
|
|
27
|
+
protected messageIsHeartbeat(message: any): boolean;
|
|
28
|
+
}
|
|
29
|
+
declare class HuobiNotificationsRealTimeFeed extends RealTimeFeedBase {
|
|
30
|
+
protected wssURL: string;
|
|
31
|
+
constructor(exchange: string, filters: Filter<string>[], wssURL: string, timeoutIntervalMS: number | undefined, onError?: (error: Error) => void);
|
|
32
|
+
protected mapToSubscribeMessages(filters: Filter<string>[]): any[];
|
|
33
|
+
protected decompress: (message: any) => Buffer;
|
|
34
|
+
protected messageIsError(message: any): boolean;
|
|
35
|
+
protected onMessage(message: any): void;
|
|
36
|
+
protected messageIsHeartbeat(message: any): boolean;
|
|
37
|
+
}
|
|
38
|
+
declare class HuobiOpenInterestClient extends PoolingClientBase {
|
|
39
|
+
private readonly _httpURL;
|
|
40
|
+
private readonly _instruments;
|
|
41
|
+
private readonly _getURLPath;
|
|
42
|
+
constructor(exchange: string, _httpURL: string, _instruments: string[], _getURLPath: (symbol: string) => string);
|
|
43
|
+
protected poolDataToStream(outputStream: Writable): Promise<void>;
|
|
44
|
+
}
|
|
45
|
+
declare class HuobiOptionsMarketIndexClient extends PoolingClientBase {
|
|
46
|
+
private readonly _httpURL;
|
|
47
|
+
private readonly _instruments;
|
|
48
|
+
constructor(exchange: string, _httpURL: string, _instruments: string[]);
|
|
49
|
+
protected poolDataToStream(outputStream: Writable): Promise<void>;
|
|
50
|
+
}
|
|
51
|
+
declare class HuobiOptionsIndexClient extends PoolingClientBase {
|
|
52
|
+
private readonly _httpURL;
|
|
53
|
+
private readonly _instruments;
|
|
54
|
+
constructor(exchange: string, _httpURL: string, _instruments: string[]);
|
|
55
|
+
protected poolDataToStream(outputStream: Writable): Promise<void>;
|
|
56
|
+
}
|
|
57
|
+
export declare class HuobiRealTimeFeed extends HuobiRealTimeFeedBase {
|
|
58
|
+
protected wssURL: string;
|
|
59
|
+
protected httpURL: string;
|
|
60
|
+
protected suffixes: {
|
|
61
|
+
trade: string;
|
|
62
|
+
depth: string;
|
|
63
|
+
mbp: string;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
export declare class HuobiDMRealTimeFeed extends HuobiRealTimeFeedBase {
|
|
67
|
+
protected wssURL: string;
|
|
68
|
+
protected httpURL: string;
|
|
69
|
+
protected suffixes: {
|
|
70
|
+
trade: string;
|
|
71
|
+
depth: string;
|
|
72
|
+
basis: string;
|
|
73
|
+
};
|
|
74
|
+
private _contractTypeMap;
|
|
75
|
+
protected getOpenInterestURLPath(symbol: string): string;
|
|
76
|
+
}
|
|
77
|
+
export declare class HuobiDMSwapRealTimeFeed extends HuobiRealTimeFeedBase {
|
|
78
|
+
protected wssURL: string;
|
|
79
|
+
protected httpURL: string;
|
|
80
|
+
protected suffixes: {
|
|
81
|
+
trade: string;
|
|
82
|
+
depth: string;
|
|
83
|
+
basis: string;
|
|
84
|
+
};
|
|
85
|
+
protected getOpenInterestURLPath(symbol: string): string;
|
|
86
|
+
}
|
|
87
|
+
export declare class HuobiDMLinearSwapRealTimeFeed extends HuobiRealTimeFeedBase {
|
|
88
|
+
protected wssURL: string;
|
|
89
|
+
protected httpURL: string;
|
|
90
|
+
protected suffixes: {
|
|
91
|
+
trade: string;
|
|
92
|
+
depth: string;
|
|
93
|
+
basis: string;
|
|
94
|
+
};
|
|
95
|
+
protected getOpenInterestURLPath(symbol: string): string;
|
|
96
|
+
}
|
|
97
|
+
export declare class HuobiDMOptionsRealTimeFeed extends HuobiRealTimeFeedBase {
|
|
98
|
+
protected wssURL: string;
|
|
99
|
+
protected httpURL: string;
|
|
100
|
+
protected suffixes: {
|
|
101
|
+
trade: string;
|
|
102
|
+
depth: string;
|
|
103
|
+
basis: string;
|
|
104
|
+
};
|
|
105
|
+
protected getOpenInterestURLPath(symbol: string): string;
|
|
106
|
+
}
|
|
107
|
+
export {};
|
|
108
|
+
//# sourceMappingURL=huobi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"huobi.d.ts","sourceRoot":"","sources":["../../src/realtimefeeds/huobi.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,gBAAgB,EAAE,+BAA+B,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAExG,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAEjC,uBAAe,qBAAsB,SAAQ,+BAA+B;IAC1E,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACjC,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IAClC,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;IAEtD,OAAO,CAAC,mBAAmB,CAAsC;IACjE,OAAO,CAAC,sBAAsB,CAA0D;IAExF,SAAS,CAAE,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,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AS,CAAC,MAAM,SAA+B;IAC/C,SAAS,CAAC,OAAO,SAA6B;IAE9C,SAAS,CAAC,QAAQ;;;;MAIjB;CACF;AAED,qBAAa,mBAAoB,SAAQ,qBAAqB;IAC5D,SAAS,CAAC,MAAM,SAA0B;IAC1C,SAAS,CAAC,OAAO,SAAgC;IAEjD,SAAS,CAAC,QAAQ;;;;MAIjB;IAED,OAAO,CAAC,gBAAgB,CAKvB;IAED,SAAS,CAAC,sBAAsB,CAAC,MAAM,EAAE,MAAM;CAOhD;AAED,qBAAa,uBAAwB,SAAQ,qBAAqB;IAChE,SAAS,CAAC,MAAM,SAA+B;IAC/C,SAAS,CAAC,OAAO,SAAqC;IAEtD,SAAS,CAAC,QAAQ;;;;MAIjB;IAED,SAAS,CAAC,sBAAsB,CAAC,MAAM,EAAE,MAAM;CAGhD;AAED,qBAAa,6BAA8B,SAAQ,qBAAqB;IACtE,SAAS,CAAC,MAAM,SAAsC;IACtD,SAAS,CAAC,OAAO,SAA4C;IAE7D,SAAS,CAAC,QAAQ;;;;MAIjB;IAED,SAAS,CAAC,sBAAsB,CAAC,MAAM,EAAE,MAAM;CAGhD;AAED,qBAAa,0BAA2B,SAAQ,qBAAqB;IACnE,SAAS,CAAC,MAAM,SAAiC;IACjD,SAAS,CAAC,OAAO,SAAuC;IAExD,SAAS,CAAC,QAAQ;;;;MAIjB;IAED,SAAS,CAAC,sBAAsB,CAAC,MAAM,EAAE,MAAM;CAGhD"}
|
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
import { unzipSync } from 'zlib';
|
|
2
|
+
import { RealTimeFeedBase, MultiConnectionRealTimeFeedBase, PoolingClientBase } from "./realtimefeed.js";
|
|
3
|
+
import { wait, ONE_SEC_IN_MS, batch, getJSON } from "../handy.js";
|
|
4
|
+
class HuobiRealTimeFeedBase extends MultiConnectionRealTimeFeedBase {
|
|
5
|
+
_marketDataChannels = ['depth', 'detail', 'trade', 'bbo'];
|
|
6
|
+
_notificationsChannels = ['funding_rate', 'liquidation_orders', 'contract_info'];
|
|
7
|
+
*_getRealTimeFeeds(exchange, filters, timeoutIntervalMS, onError) {
|
|
8
|
+
const marketByPriceFilters = filters.filter((f) => f.channel === 'mbp');
|
|
9
|
+
if (marketByPriceFilters.length > 0) {
|
|
10
|
+
// https://huobiapi.github.io/docs/spot/v1/en/#market-by-price-incremental-update
|
|
11
|
+
const marketByPriceWSUrl = this.wssURL.replace('/ws', '/feed');
|
|
12
|
+
yield new HuobiMarketDataRealTimeFeed(exchange, marketByPriceFilters, marketByPriceWSUrl, this.suffixes, timeoutIntervalMS, onError);
|
|
13
|
+
}
|
|
14
|
+
const basisFilters = filters.filter((f) => f.channel === 'basis');
|
|
15
|
+
if (basisFilters.length > 0) {
|
|
16
|
+
const basisWSURL = this.wssURL.replace('/ws', '/ws_index').replace('/swap-ws', '/ws_index').replace('/linear-swap-ws', '/ws_index');
|
|
17
|
+
yield new HuobiMarketDataRealTimeFeed(exchange, basisFilters, basisWSURL, this.suffixes, timeoutIntervalMS, onError);
|
|
18
|
+
}
|
|
19
|
+
const marketDataFilters = filters.filter((f) => this._marketDataChannels.includes(f.channel));
|
|
20
|
+
if (marketDataFilters.length > 0) {
|
|
21
|
+
yield new HuobiMarketDataRealTimeFeed(exchange, marketDataFilters, this.wssURL, this.suffixes, timeoutIntervalMS, onError);
|
|
22
|
+
}
|
|
23
|
+
const notificationsFilters = filters.filter((f) => this._notificationsChannels.includes(f.channel));
|
|
24
|
+
if (notificationsFilters.length > 0) {
|
|
25
|
+
const notificationsWSURL = this.wssURL
|
|
26
|
+
.replace('/swap-ws', '/swap-notification')
|
|
27
|
+
.replace('/ws', '/notification')
|
|
28
|
+
.replace('/linear-swap-ws', '/linear-swap-notification');
|
|
29
|
+
yield new HuobiNotificationsRealTimeFeed(exchange, notificationsFilters, notificationsWSURL, timeoutIntervalMS, onError);
|
|
30
|
+
}
|
|
31
|
+
const openInterestFilters = filters.filter((f) => f.channel === 'open_interest');
|
|
32
|
+
if (openInterestFilters.length > 0) {
|
|
33
|
+
const instruments = openInterestFilters.flatMap((s) => s.symbols);
|
|
34
|
+
yield new HuobiOpenInterestClient(exchange, this.httpURL, instruments, this.getOpenInterestURLPath.bind(this));
|
|
35
|
+
}
|
|
36
|
+
const optionMarketIndexFilters = filters.filter((f) => f.channel === 'option_market_index');
|
|
37
|
+
if (optionMarketIndexFilters.length > 0) {
|
|
38
|
+
const instruments = optionMarketIndexFilters.flatMap((s) => s.symbols);
|
|
39
|
+
yield new HuobiOptionsMarketIndexClient(exchange, this.httpURL, instruments);
|
|
40
|
+
}
|
|
41
|
+
const optionIndexFilters = filters.filter((f) => f.channel === 'option_index');
|
|
42
|
+
if (optionIndexFilters.length > 0) {
|
|
43
|
+
const instruments = optionIndexFilters.flatMap((s) => s.symbols);
|
|
44
|
+
yield new HuobiOptionsIndexClient(exchange, this.httpURL, instruments);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
getOpenInterestURLPath(symbol) {
|
|
48
|
+
return symbol;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
class HuobiMarketDataRealTimeFeed extends RealTimeFeedBase {
|
|
52
|
+
wssURL;
|
|
53
|
+
_suffixes;
|
|
54
|
+
constructor(exchange, filters, wssURL, _suffixes, timeoutIntervalMS, onError) {
|
|
55
|
+
super(exchange, filters, timeoutIntervalMS, onError);
|
|
56
|
+
this.wssURL = wssURL;
|
|
57
|
+
this._suffixes = _suffixes;
|
|
58
|
+
}
|
|
59
|
+
mapToSubscribeMessages(filters) {
|
|
60
|
+
return filters
|
|
61
|
+
.map((filter) => {
|
|
62
|
+
if (!filter.symbols || filter.symbols.length === 0) {
|
|
63
|
+
throw new Error('HuobiRealTimeFeed requires explicitly specified symbols when subscribing to live feed');
|
|
64
|
+
}
|
|
65
|
+
return filter.symbols.map((symbol) => {
|
|
66
|
+
const sub = `market.${symbol}.${filter.channel}${this._suffixes[filter.channel] !== undefined ? this._suffixes[filter.channel] : ''}`;
|
|
67
|
+
return {
|
|
68
|
+
id: '1',
|
|
69
|
+
sub,
|
|
70
|
+
data_type: sub.endsWith('.high_freq') ? 'incremental' : undefined
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
})
|
|
74
|
+
.flatMap((s) => s);
|
|
75
|
+
}
|
|
76
|
+
async provideManualSnapshots(filters, shouldCancel) {
|
|
77
|
+
const mbpFilter = filters.find((f) => f.channel === 'mbp');
|
|
78
|
+
if (!mbpFilter) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
await wait(1.5 * ONE_SEC_IN_MS);
|
|
82
|
+
for (let symbol of mbpFilter.symbols) {
|
|
83
|
+
if (shouldCancel()) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
setTimeout(() => {
|
|
87
|
+
if (shouldCancel()) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
this.send({
|
|
91
|
+
id: '1',
|
|
92
|
+
req: `market.${symbol}.mbp.400`
|
|
93
|
+
});
|
|
94
|
+
this.debug('sent mbp.400 "req" for: %s', mbpFilter.symbols);
|
|
95
|
+
}, 3000);
|
|
96
|
+
await wait(50);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
decompress = (message) => {
|
|
100
|
+
message = unzipSync(message);
|
|
101
|
+
return message;
|
|
102
|
+
};
|
|
103
|
+
messageIsError(message) {
|
|
104
|
+
if (message.status === 'error') {
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
isIgnoredError(message) {
|
|
110
|
+
// ignore market not found errors
|
|
111
|
+
if (message['err-msg'] !== undefined && message['err-msg'].includes('invalid symbol ')) {
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
onMessage(message) {
|
|
117
|
+
if (message.ping !== undefined) {
|
|
118
|
+
this.send({
|
|
119
|
+
pong: message.ping
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
messageIsHeartbeat(message) {
|
|
124
|
+
return message.ping !== undefined;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
class HuobiNotificationsRealTimeFeed extends RealTimeFeedBase {
|
|
128
|
+
wssURL;
|
|
129
|
+
constructor(exchange, filters, wssURL, timeoutIntervalMS, onError) {
|
|
130
|
+
super(exchange, filters, timeoutIntervalMS, onError);
|
|
131
|
+
this.wssURL = wssURL;
|
|
132
|
+
}
|
|
133
|
+
mapToSubscribeMessages(filters) {
|
|
134
|
+
return filters
|
|
135
|
+
.map((filter) => {
|
|
136
|
+
if (!filter.symbols || filter.symbols.length === 0) {
|
|
137
|
+
throw new Error('HuobiNotificationsRealTimeFeed requires explicitly specified symbols when subscribing to live feed');
|
|
138
|
+
}
|
|
139
|
+
return filter.symbols.map((symbol) => {
|
|
140
|
+
return {
|
|
141
|
+
op: 'sub',
|
|
142
|
+
cid: '1',
|
|
143
|
+
topic: `public.${symbol}.${filter.channel}`
|
|
144
|
+
};
|
|
145
|
+
});
|
|
146
|
+
})
|
|
147
|
+
.flatMap((s) => s);
|
|
148
|
+
}
|
|
149
|
+
decompress = (message) => {
|
|
150
|
+
message = unzipSync(message);
|
|
151
|
+
return message;
|
|
152
|
+
};
|
|
153
|
+
messageIsError(message) {
|
|
154
|
+
if (message.op === 'error' || message.op === 'close') {
|
|
155
|
+
return true;
|
|
156
|
+
}
|
|
157
|
+
const errorCode = message['err-code'];
|
|
158
|
+
if (errorCode !== undefined && errorCode !== 0) {
|
|
159
|
+
return true;
|
|
160
|
+
}
|
|
161
|
+
return false;
|
|
162
|
+
}
|
|
163
|
+
onMessage(message) {
|
|
164
|
+
if (message.op === 'ping') {
|
|
165
|
+
this.send({
|
|
166
|
+
op: 'pong',
|
|
167
|
+
ts: message.ts
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
messageIsHeartbeat(message) {
|
|
172
|
+
return message.ping !== undefined;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
class HuobiOpenInterestClient extends PoolingClientBase {
|
|
176
|
+
_httpURL;
|
|
177
|
+
_instruments;
|
|
178
|
+
_getURLPath;
|
|
179
|
+
constructor(exchange, _httpURL, _instruments, _getURLPath) {
|
|
180
|
+
super(exchange, 4);
|
|
181
|
+
this._httpURL = _httpURL;
|
|
182
|
+
this._instruments = _instruments;
|
|
183
|
+
this._getURLPath = _getURLPath;
|
|
184
|
+
}
|
|
185
|
+
async poolDataToStream(outputStream) {
|
|
186
|
+
for (const instruments of batch(this._instruments, 10)) {
|
|
187
|
+
await Promise.allSettled(instruments.map(async (instrument) => {
|
|
188
|
+
if (outputStream.destroyed) {
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
const url = `${this._httpURL}/${this._getURLPath(instrument)}`;
|
|
192
|
+
const { data: body } = await getJSON(url, { timeout: 10000 });
|
|
193
|
+
if (body.status !== 'ok') {
|
|
194
|
+
throw new Error(`open interest response error:${JSON.stringify(body)}, url:${url}`);
|
|
195
|
+
}
|
|
196
|
+
const openInterestMessage = {
|
|
197
|
+
ch: `market.${instrument}.open_interest`,
|
|
198
|
+
generated: true,
|
|
199
|
+
data: body.data,
|
|
200
|
+
ts: body.ts
|
|
201
|
+
};
|
|
202
|
+
if (outputStream.writable) {
|
|
203
|
+
outputStream.write(openInterestMessage);
|
|
204
|
+
}
|
|
205
|
+
}));
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
class HuobiOptionsMarketIndexClient extends PoolingClientBase {
|
|
210
|
+
_httpURL;
|
|
211
|
+
_instruments;
|
|
212
|
+
constructor(exchange, _httpURL, _instruments) {
|
|
213
|
+
super(exchange, 4);
|
|
214
|
+
this._httpURL = _httpURL;
|
|
215
|
+
this._instruments = _instruments;
|
|
216
|
+
}
|
|
217
|
+
async poolDataToStream(outputStream) {
|
|
218
|
+
for (const instruments of batch(this._instruments, 10)) {
|
|
219
|
+
await Promise.all(instruments.map(async (instrument) => {
|
|
220
|
+
if (outputStream.destroyed) {
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
const url = `${this._httpURL}/option_market_index?contract_code=${instrument}`;
|
|
224
|
+
const { data: body } = await getJSON(url, { timeout: 10000 });
|
|
225
|
+
if (body.status !== 'ok') {
|
|
226
|
+
throw new Error(`open interest response error:${JSON.stringify(body)}, url:${url}`);
|
|
227
|
+
}
|
|
228
|
+
const marketIndexMessage = {
|
|
229
|
+
ch: `market.${instrument}.option_market_index`,
|
|
230
|
+
generated: true,
|
|
231
|
+
data: body.data[0],
|
|
232
|
+
ts: body.ts
|
|
233
|
+
};
|
|
234
|
+
if (outputStream.writable) {
|
|
235
|
+
outputStream.write(marketIndexMessage);
|
|
236
|
+
}
|
|
237
|
+
}));
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
class HuobiOptionsIndexClient extends PoolingClientBase {
|
|
242
|
+
_httpURL;
|
|
243
|
+
_instruments;
|
|
244
|
+
constructor(exchange, _httpURL, _instruments) {
|
|
245
|
+
super(exchange, 4);
|
|
246
|
+
this._httpURL = _httpURL;
|
|
247
|
+
this._instruments = _instruments;
|
|
248
|
+
}
|
|
249
|
+
async poolDataToStream(outputStream) {
|
|
250
|
+
for (const instruments of batch(this._instruments, 10)) {
|
|
251
|
+
await Promise.allSettled(instruments.map(async (instrument) => {
|
|
252
|
+
if (outputStream.destroyed) {
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
const url = `${this._httpURL}/option_index?symbol=${instrument}`;
|
|
256
|
+
const { data: body } = await getJSON(url, { timeout: 10000 });
|
|
257
|
+
if (body.status !== 'ok') {
|
|
258
|
+
throw new Error(`open interest response error:${JSON.stringify(body)}, url:${url}`);
|
|
259
|
+
}
|
|
260
|
+
const optionIndexMessage = {
|
|
261
|
+
ch: `market.${instrument}.option_index`,
|
|
262
|
+
generated: true,
|
|
263
|
+
data: body.data[0],
|
|
264
|
+
ts: body.ts
|
|
265
|
+
};
|
|
266
|
+
if (outputStream.writable) {
|
|
267
|
+
outputStream.write(optionIndexMessage);
|
|
268
|
+
}
|
|
269
|
+
}));
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
export class HuobiRealTimeFeed extends HuobiRealTimeFeedBase {
|
|
274
|
+
wssURL = 'wss://api-aws.huobi.pro/ws';
|
|
275
|
+
httpURL = 'https://api.huobi.pro/v1';
|
|
276
|
+
suffixes = {
|
|
277
|
+
trade: '.detail',
|
|
278
|
+
depth: '.step0',
|
|
279
|
+
mbp: '.400'
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
export class HuobiDMRealTimeFeed extends HuobiRealTimeFeedBase {
|
|
283
|
+
wssURL = 'wss://api.hbdm.com/ws';
|
|
284
|
+
httpURL = 'https://api.hbdm.com/api/v1';
|
|
285
|
+
suffixes = {
|
|
286
|
+
trade: '.detail',
|
|
287
|
+
depth: '.size_150.high_freq',
|
|
288
|
+
basis: '.1min.close'
|
|
289
|
+
};
|
|
290
|
+
_contractTypeMap = {
|
|
291
|
+
CW: 'this_week',
|
|
292
|
+
NW: 'next_week',
|
|
293
|
+
CQ: 'quarter',
|
|
294
|
+
NQ: 'next_quarter'
|
|
295
|
+
};
|
|
296
|
+
getOpenInterestURLPath(symbol) {
|
|
297
|
+
const split = symbol.split('_');
|
|
298
|
+
const index = split[0];
|
|
299
|
+
const contractType = this._contractTypeMap[split[1]];
|
|
300
|
+
return `contract_open_interest?symbol=${index}&contract_type=${contractType}`;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
export class HuobiDMSwapRealTimeFeed extends HuobiRealTimeFeedBase {
|
|
304
|
+
wssURL = 'wss://api.hbdm.com/swap-ws';
|
|
305
|
+
httpURL = 'https://api.hbdm.com/swap-api/v1';
|
|
306
|
+
suffixes = {
|
|
307
|
+
trade: '.detail',
|
|
308
|
+
depth: '.size_150.high_freq',
|
|
309
|
+
basis: '.1min.close'
|
|
310
|
+
};
|
|
311
|
+
getOpenInterestURLPath(symbol) {
|
|
312
|
+
return `swap_open_interest?contract_code=${symbol}`;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
export class HuobiDMLinearSwapRealTimeFeed extends HuobiRealTimeFeedBase {
|
|
316
|
+
wssURL = 'wss://api.hbdm.com/linear-swap-ws';
|
|
317
|
+
httpURL = 'https://api.hbdm.com/linear-swap-api/v1';
|
|
318
|
+
suffixes = {
|
|
319
|
+
trade: '.detail',
|
|
320
|
+
depth: '.size_150.high_freq',
|
|
321
|
+
basis: '.1min.close'
|
|
322
|
+
};
|
|
323
|
+
getOpenInterestURLPath(symbol) {
|
|
324
|
+
return `swap_open_interest?contract_code=${symbol}`;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
export class HuobiDMOptionsRealTimeFeed extends HuobiRealTimeFeedBase {
|
|
328
|
+
wssURL = 'wss://api.hbdm.com/option-ws';
|
|
329
|
+
httpURL = 'https://api.hbdm.com/option-api/v1';
|
|
330
|
+
suffixes = {
|
|
331
|
+
trade: '.detail',
|
|
332
|
+
depth: '.size_150.high_freq',
|
|
333
|
+
basis: '.1min.close'
|
|
334
|
+
};
|
|
335
|
+
getOpenInterestURLPath(symbol) {
|
|
336
|
+
return `option_open_interest?contract_code=${symbol}`;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
//# sourceMappingURL=huobi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"huobi.js","sourceRoot":"","sources":["../../src/realtimefeeds/huobi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAEhC,OAAO,EAAE,gBAAgB,EAAE,+BAA+B,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AACxG,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAGjE,MAAe,qBAAsB,SAAQ,+BAA+B;IAKlE,mBAA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4B,CAAA;IACrC,OAAO,GAAG,kCAAkC,CAAA;IAE5C,QAAQ,GAAG;QACnB,KAAK,EAAE,SAAS;QAChB,KAAK,EAAE,qBAAqB;QAC5B,KAAK,EAAE,aAAa;KACrB,CAAA;IAES,sBAAsB,CAAC,MAAc;QAC7C,OAAO,oCAAoC,MAAM,EAAE,CAAA;IACrD,CAAC;CACF;AAED,MAAM,OAAO,6BAA8B,SAAQ,qBAAqB;IAC5D,MAAM,GAAG,mCAAmC,CAAA;IAC5C,OAAO,GAAG,yCAAyC,CAAA;IAEnD,QAAQ,GAAG;QACnB,KAAK,EAAE,SAAS;QAChB,KAAK,EAAE,qBAAqB;QAC5B,KAAK,EAAE,aAAa;KACrB,CAAA;IAES,sBAAsB,CAAC,MAAc;QAC7C,OAAO,oCAAoC,MAAM,EAAE,CAAA;IACrD,CAAC;CACF;AAED,MAAM,OAAO,0BAA2B,SAAQ,qBAAqB;IACzD,MAAM,GAAG,8BAA8B,CAAA;IACvC,OAAO,GAAG,oCAAoC,CAAA;IAE9C,QAAQ,GAAG;QACnB,KAAK,EAAE,SAAS;QAChB,KAAK,EAAE,qBAAqB;QAC5B,KAAK,EAAE,aAAa;KACrB,CAAA;IAES,sBAAsB,CAAC,MAAc;QAC7C,OAAO,sCAAsC,MAAM,EAAE,CAAA;IACvD,CAAC;CACF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Filter } from '../types.ts';
|
|
2
|
+
import { RealTimeFeedBase } from './realtimefeed.ts';
|
|
3
|
+
export declare class HyperliquidRealTimeFeed extends RealTimeFeedBase {
|
|
4
|
+
protected wssURL: string;
|
|
5
|
+
protected mapToSubscribeMessages(filters: Filter<string>[]): any[];
|
|
6
|
+
protected messageIsError(message: any): boolean;
|
|
7
|
+
protected messageIsHeartbeat(message: any): boolean;
|
|
8
|
+
protected sendCustomPing: () => void;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=hyperliquid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hyperliquid.d.ts","sourceRoot":"","sources":["../../src/realtimefeeds/hyperliquid.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEpD,qBAAa,uBAAwB,SAAQ,gBAAgB;IAC3D,SAAS,CAAC,MAAM,SAAiC;IAEjD,SAAS,CAAC,sBAAsB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,GAAG,EAAE;IAuBlE,SAAS,CAAC,cAAc,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO;IAI/C,SAAS,CAAC,kBAAkB,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO;IAInD,SAAS,CAAC,cAAc,aAEvB;CACF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { RealTimeFeedBase } from "./realtimefeed.js";
|
|
2
|
+
export class HyperliquidRealTimeFeed extends RealTimeFeedBase {
|
|
3
|
+
wssURL = 'wss://api.hyperliquid.xyz/ws';
|
|
4
|
+
mapToSubscribeMessages(filters) {
|
|
5
|
+
return filters
|
|
6
|
+
.map((filter) => {
|
|
7
|
+
if (!filter.symbols || filter.symbols.length === 0) {
|
|
8
|
+
throw new Error('HyperliquidRealTimeFeed requires explicitly specified symbols when subscribing to live feed');
|
|
9
|
+
}
|
|
10
|
+
return filter.symbols.map((symbol) => {
|
|
11
|
+
const isFastBook = filter.channel === 'fastBook';
|
|
12
|
+
return {
|
|
13
|
+
method: 'subscribe',
|
|
14
|
+
subscription: {
|
|
15
|
+
coin: symbol,
|
|
16
|
+
type: isFastBook ? 'l2Book' : filter.channel,
|
|
17
|
+
fast: isFastBook ? true : undefined
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
});
|
|
21
|
+
})
|
|
22
|
+
.flatMap((f) => f);
|
|
23
|
+
}
|
|
24
|
+
messageIsError(message) {
|
|
25
|
+
return message.channel === 'error';
|
|
26
|
+
}
|
|
27
|
+
messageIsHeartbeat(message) {
|
|
28
|
+
return message.channel === 'pong';
|
|
29
|
+
}
|
|
30
|
+
sendCustomPing = () => {
|
|
31
|
+
this.send({ method: 'ping' });
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=hyperliquid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hyperliquid.js","sourceRoot":"","sources":["../../src/realtimefeeds/hyperliquid.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEpD,MAAM,OAAO,uBAAwB,SAAQ,gBAAgB;IACjD,MAAM,GAAG,8BAA8B,CAAA;IAEvC,sBAAsB,CAAC,OAAyB;QACxD,OAAO,OAAO;aACX,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;YACd,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACnD,MAAM,IAAI,KAAK,CAAC,6FAA6F,CAAC,CAAA;YAChH,CAAC;YAED,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;gBACnC,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,KAAK,UAAU,CAAA;gBAEhD,OAAO;oBACL,MAAM,EAAE,WAAW;oBACnB,YAAY,EAAE;wBACZ,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO;wBAC5C,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;qBACpC;iBACF,CAAA;YACH,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC;aACD,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAA;IACtB,CAAC;IAES,cAAc,CAAC,OAAY;QACnC,OAAO,OAAO,CAAC,OAAO,KAAK,OAAO,CAAA;IACpC,CAAC;IAES,kBAAkB,CAAC,OAAY;QACvC,OAAO,OAAO,CAAC,OAAO,KAAK,MAAM,CAAA;IACnC,CAAC;IAES,cAAc,GAAG,GAAG,EAAE;QAC9B,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;IAC/B,CAAC,CAAA;CACF"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Exchange, Filter } from '../types.ts';
|
|
2
|
+
import { RealTimeFeed } from './realtimefeed.ts';
|
|
3
|
+
export * from './realtimefeed.ts';
|
|
4
|
+
export declare function getRealTimeFeedFactory(exchange: Exchange): RealTimeFeed;
|
|
5
|
+
export declare function createRealTimeFeed(exchange: Exchange, filters: Filter<string>[], timeoutIntervalMS: number | undefined, onError?: (error: Error) => void): import("./realtimefeed.ts").RealTimeFeedIterable;
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/realtimefeeds/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AA6B9C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AA8BhD,cAAc,mBAAmB,CAAA;AAoEjC,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,QAAQ,GAAG,YAAY,CAMvE;AAED,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,EACzB,iBAAiB,EAAE,MAAM,GAAG,SAAS,EACrC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,oDAKjC"}
|