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,81 @@
|
|
|
1
|
+
import { wait } from "../handy.js";
|
|
2
|
+
import { RealTimeFeedBase } from "./realtimefeed.js";
|
|
3
|
+
export class DeribitRealTimeDataFeed extends RealTimeFeedBase {
|
|
4
|
+
get wssURL() {
|
|
5
|
+
if (this._hasCredentials) {
|
|
6
|
+
return 'wss://www.deribit.com/ws/api/v2';
|
|
7
|
+
}
|
|
8
|
+
else {
|
|
9
|
+
return 'wss://streams.deribit.com/ws/api/v2';
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
_hasCredentials = process.env.DERIBIT_API_CLIENT_ID !== undefined && process.env.DERIBIT_API_CLIENT_SECRET !== undefined;
|
|
13
|
+
channelsWithIntervals = ['book', 'perpetual', 'trades', 'ticker'];
|
|
14
|
+
mapToSubscribeMessages(filters) {
|
|
15
|
+
const hasCredentials = this._hasCredentials;
|
|
16
|
+
const channels = filters
|
|
17
|
+
.map((filter) => {
|
|
18
|
+
if (!filter.symbols || filter.symbols.length === 0) {
|
|
19
|
+
throw new Error('DeribitRealTimeDataFeed requires explicitly specified symbols when subscribing to live feed');
|
|
20
|
+
}
|
|
21
|
+
return filter.symbols.map((symbol) => {
|
|
22
|
+
const suffix = this.channelsWithIntervals.includes(filter.channel) ? (hasCredentials ? '.raw' : '.100ms') : '';
|
|
23
|
+
return `${filter.channel}.${symbol}${suffix}`;
|
|
24
|
+
});
|
|
25
|
+
})
|
|
26
|
+
.flatMap((f) => f);
|
|
27
|
+
return [
|
|
28
|
+
{
|
|
29
|
+
jsonrpc: '2.0',
|
|
30
|
+
id: 3,
|
|
31
|
+
method: hasCredentials ? 'private/subscribe' : 'public/subscribe',
|
|
32
|
+
params: {
|
|
33
|
+
channels
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
];
|
|
37
|
+
}
|
|
38
|
+
messageIsError(message) {
|
|
39
|
+
return message.error !== undefined;
|
|
40
|
+
}
|
|
41
|
+
async onConnected() {
|
|
42
|
+
// set heartbeat so deribit won't close connection prematurely
|
|
43
|
+
// https://docs.deribit.com/v2/#public-set_heartbeat
|
|
44
|
+
this.send({
|
|
45
|
+
jsonrpc: '2.0',
|
|
46
|
+
method: 'public/set_heartbeat',
|
|
47
|
+
id: 0,
|
|
48
|
+
params: {
|
|
49
|
+
interval: 10
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
if (this._hasCredentials) {
|
|
53
|
+
this.send({
|
|
54
|
+
jsonrpc: '2.0',
|
|
55
|
+
method: 'public/auth',
|
|
56
|
+
id: 1,
|
|
57
|
+
params: {
|
|
58
|
+
grant_type: 'client_credentials',
|
|
59
|
+
client_id: process.env.DERIBIT_API_CLIENT_ID,
|
|
60
|
+
client_secret: process.env.DERIBIT_API_CLIENT_SECRET
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
await wait(10);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
messageIsHeartbeat(msg) {
|
|
67
|
+
return msg.method === 'heartbeat';
|
|
68
|
+
}
|
|
69
|
+
onMessage(msg) {
|
|
70
|
+
// respond with public/test message to keep connection alive
|
|
71
|
+
if (msg.params !== undefined && msg.params.type === 'test_request') {
|
|
72
|
+
this.send({
|
|
73
|
+
jsonrpc: '2.0',
|
|
74
|
+
method: 'public/test',
|
|
75
|
+
id: 0,
|
|
76
|
+
params: {}
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=deribit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deribit.js","sourceRoot":"","sources":["../../src/realtimefeeds/deribit.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Filter } from '../types.ts';
|
|
2
|
+
import { RealTimeFeedBase } from './realtimefeed.ts';
|
|
3
|
+
export declare class DydxRealTimeFeed extends RealTimeFeedBase {
|
|
4
|
+
protected readonly wssURL = "wss://api.dydx.exchange/v3/ws";
|
|
5
|
+
protected mapToSubscribeMessages(filters: Filter<string>[]): any[];
|
|
6
|
+
protected messageIsError(message: any): boolean;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=dydx.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dydx.d.ts","sourceRoot":"","sources":["../../src/realtimefeeds/dydx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEpD,qBAAa,gBAAiB,SAAQ,gBAAgB;IACpD,SAAS,CAAC,QAAQ,CAAC,MAAM,mCAAkC;IAE3D,SAAS,CAAC,sBAAsB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,GAAG,EAAE;IA8BlE,SAAS,CAAC,cAAc,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO;CAGhD"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { RealTimeFeedBase } from "./realtimefeed.js";
|
|
2
|
+
export class DydxRealTimeFeed extends RealTimeFeedBase {
|
|
3
|
+
wssURL = 'wss://api.dydx.exchange/v3/ws';
|
|
4
|
+
mapToSubscribeMessages(filters) {
|
|
5
|
+
const subs = filters
|
|
6
|
+
.map((filter) => {
|
|
7
|
+
if (filter.channel === 'v3_markets') {
|
|
8
|
+
return [
|
|
9
|
+
{
|
|
10
|
+
type: 'subscribe',
|
|
11
|
+
channel: 'v3_markets'
|
|
12
|
+
}
|
|
13
|
+
];
|
|
14
|
+
}
|
|
15
|
+
if (!filter.symbols || filter.symbols.length === 0) {
|
|
16
|
+
throw new Error('DydxRealTimeFeed requires explicitly specified symbols when subscribing to live feed');
|
|
17
|
+
}
|
|
18
|
+
return filter.symbols.map((symbol) => {
|
|
19
|
+
return {
|
|
20
|
+
type: 'subscribe',
|
|
21
|
+
channel: filter.channel,
|
|
22
|
+
id: symbol,
|
|
23
|
+
includeOffsets: filter.channel === 'v3_orderbook' ? true : undefined
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
})
|
|
27
|
+
.flatMap((f) => f);
|
|
28
|
+
return subs;
|
|
29
|
+
}
|
|
30
|
+
messageIsError(message) {
|
|
31
|
+
return message.type === 'error';
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=dydx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dydx.js","sourceRoot":"","sources":["../../src/realtimefeeds/dydx.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEpD,MAAM,OAAO,gBAAiB,SAAQ,gBAAgB;IACjC,MAAM,GAAG,+BAA+B,CAAA;IAEjD,sBAAsB,CAAC,OAAyB;QACxD,MAAM,IAAI,GAAG,OAAO;aACjB,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;YACd,IAAI,MAAM,CAAC,OAAO,KAAK,YAAY,EAAE,CAAC;gBACpC,OAAO;oBACL;wBACE,IAAI,EAAE,WAAW;wBACjB,OAAO,EAAE,YAAY;qBACtB;iBACF,CAAA;YACH,CAAC;YAED,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACnD,MAAM,IAAI,KAAK,CAAC,sFAAsF,CAAC,CAAA;YACzG,CAAC;YAED,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;gBACnC,OAAO;oBACL,IAAI,EAAE,WAAW;oBACjB,OAAO,EAAE,MAAM,CAAC,OAAO;oBACvB,EAAE,EAAE,MAAM;oBACV,cAAc,EAAE,MAAM,CAAC,OAAO,KAAK,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;iBACrE,CAAA;YACH,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC;aACD,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAA;QAEpB,OAAO,IAAI,CAAA;IACb,CAAC;IAES,cAAc,CAAC,OAAY;QACnC,OAAO,OAAO,CAAC,IAAI,KAAK,OAAO,CAAA;IACjC,CAAC;CACF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Filter } from '../types.ts';
|
|
2
|
+
import { RealTimeFeedBase } from './realtimefeed.ts';
|
|
3
|
+
export declare class DydxV4RealTimeFeed extends RealTimeFeedBase {
|
|
4
|
+
protected readonly wssURL = "wss://indexer.dydx.trade/v4/ws";
|
|
5
|
+
protected mapToSubscribeMessages(filters: Filter<string>[]): any[];
|
|
6
|
+
protected messageIsError(message: any): boolean;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=dydx_v4.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dydx_v4.d.ts","sourceRoot":"","sources":["../../src/realtimefeeds/dydx_v4.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEpD,qBAAa,kBAAmB,SAAQ,gBAAgB;IACtD,SAAS,CAAC,QAAQ,CAAC,MAAM,oCAAmC;IAE5D,SAAS,CAAC,sBAAsB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,GAAG,EAAE;IA6BlE,SAAS,CAAC,cAAc,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO;CAGhD"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { RealTimeFeedBase } from "./realtimefeed.js";
|
|
2
|
+
export class DydxV4RealTimeFeed extends RealTimeFeedBase {
|
|
3
|
+
wssURL = 'wss://indexer.dydx.trade/v4/ws';
|
|
4
|
+
mapToSubscribeMessages(filters) {
|
|
5
|
+
const subs = filters
|
|
6
|
+
.map((filter) => {
|
|
7
|
+
if (filter.channel === 'v4_markets') {
|
|
8
|
+
return [
|
|
9
|
+
{
|
|
10
|
+
type: 'subscribe',
|
|
11
|
+
channel: 'v4_markets'
|
|
12
|
+
}
|
|
13
|
+
];
|
|
14
|
+
}
|
|
15
|
+
if (!filter.symbols || filter.symbols.length === 0) {
|
|
16
|
+
throw new Error('DydxV4RealTimeFeed requires explicitly specified symbols when subscribing to live feed');
|
|
17
|
+
}
|
|
18
|
+
return filter.symbols.map((symbol) => {
|
|
19
|
+
return {
|
|
20
|
+
type: 'subscribe',
|
|
21
|
+
channel: filter.channel,
|
|
22
|
+
id: symbol
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
})
|
|
26
|
+
.flatMap((f) => f);
|
|
27
|
+
return subs;
|
|
28
|
+
}
|
|
29
|
+
messageIsError(message) {
|
|
30
|
+
return message.type === 'error';
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=dydx_v4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dydx_v4.js","sourceRoot":"","sources":["../../src/realtimefeeds/dydx_v4.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEpD,MAAM,OAAO,kBAAmB,SAAQ,gBAAgB;IACnC,MAAM,GAAG,gCAAgC,CAAA;IAElD,sBAAsB,CAAC,OAAyB;QACxD,MAAM,IAAI,GAAG,OAAO;aACjB,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;YACd,IAAI,MAAM,CAAC,OAAO,KAAK,YAAY,EAAE,CAAC;gBACpC,OAAO;oBACL;wBACE,IAAI,EAAE,WAAW;wBACjB,OAAO,EAAE,YAAY;qBACtB;iBACF,CAAA;YACH,CAAC;YAED,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACnD,MAAM,IAAI,KAAK,CAAC,wFAAwF,CAAC,CAAA;YAC3G,CAAC;YAED,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;gBACnC,OAAO;oBACL,IAAI,EAAE,WAAW;oBACjB,OAAO,EAAE,MAAM,CAAC,OAAO;oBACvB,EAAE,EAAE,MAAM;iBACX,CAAA;YACH,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC;aACD,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAA;QAEpB,OAAO,IAAI,CAAA;IACb,CAAC;IAES,cAAc,CAAC,OAAY;QACnC,OAAO,OAAO,CAAC,IAAI,KAAK,OAAO,CAAA;IACjC,CAAC;CACF"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Writable } from 'stream';
|
|
2
|
+
import { Filter } from '../types.ts';
|
|
3
|
+
import { RealTimeFeedBase, PoolingClientBase, MultiConnectionRealTimeFeedBase } from './realtimefeed.ts';
|
|
4
|
+
declare abstract class FTXRealTimeFeedBase extends MultiConnectionRealTimeFeedBase {
|
|
5
|
+
protected abstract wssURL: string;
|
|
6
|
+
protected abstract httpURL: string;
|
|
7
|
+
protected _getRealTimeFeeds(exchange: string, filters: Filter<string>[], timeoutIntervalMS?: number, onError?: (error: Error) => void): Generator<FtxSingleConnectionRealTimeFeed | FTXInstrumentInfoClient, void, unknown>;
|
|
8
|
+
}
|
|
9
|
+
declare class FtxSingleConnectionRealTimeFeed extends RealTimeFeedBase {
|
|
10
|
+
protected wssURL: string;
|
|
11
|
+
constructor(exchange: string, filters: Filter<string>[], wssURL: string, timeoutIntervalMS: number | undefined, onError?: (error: Error) => void);
|
|
12
|
+
protected mapToSubscribeMessages(filters: Filter<string>[]): any[];
|
|
13
|
+
protected messageIsError(message: any): boolean;
|
|
14
|
+
protected isIgnoredError(message: any): boolean;
|
|
15
|
+
protected sendCustomPing: () => void;
|
|
16
|
+
protected messageIsHeartbeat(msg: any): boolean;
|
|
17
|
+
}
|
|
18
|
+
declare class FTXInstrumentInfoClient extends PoolingClientBase {
|
|
19
|
+
private readonly _httpURL;
|
|
20
|
+
private readonly _instruments;
|
|
21
|
+
constructor(exchange: string, _httpURL: string, _instruments: string[], onError?: (error: Error) => void);
|
|
22
|
+
protected poolDataToStream(outputStream: Writable): Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
export declare class FtxRealTimeFeed extends FTXRealTimeFeedBase {
|
|
25
|
+
protected wssURL: string;
|
|
26
|
+
protected httpURL: string;
|
|
27
|
+
}
|
|
28
|
+
export declare class FtxUSRealTimeFeed extends FTXRealTimeFeedBase {
|
|
29
|
+
protected wssURL: string;
|
|
30
|
+
protected httpURL: string;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=ftx.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ftx.d.ts","sourceRoot":"","sources":["../../src/realtimefeeds/ftx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAEjC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,+BAA+B,EAAE,MAAM,mBAAmB,CAAA;AAGxG,uBAAe,mBAAoB,SAAQ,+BAA+B;IACxE,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACjC,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IAElC,SAAS,CAAE,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,iBAAiB,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI;CAgBvI;AAED,cAAM,+BAAgC,SAAQ,gBAAgB;IAI1D,SAAS,CAAC,MAAM,EAAE,MAAM;gBAFxB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,EACf,MAAM,EAAE,MAAM,EACxB,iBAAiB,EAAE,MAAM,GAAG,SAAS,EACrC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI;IAKlC,SAAS,CAAC,sBAAsB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,GAAG,EAAE;IAkBlE,SAAS,CAAC,cAAc,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO;IAI/C,SAAS,CAAC,cAAc,CAAC,OAAO,EAAE,GAAG;IAKrC,SAAS,CAAC,cAAc,aAEvB;IAED,SAAS,CAAC,kBAAkB,CAAC,GAAG,EAAE,GAAG;CAGtC;AAED,cAAM,uBAAwB,SAAQ,iBAAiB;IAGnD,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAF7B,QAAQ,EAAE,MAAM,EACC,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EAAE,EACvC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI;cAKlB,gBAAgB,CAAC,YAAY,EAAE,QAAQ;CAyCxD;AAED,qBAAa,eAAgB,SAAQ,mBAAmB;IACtD,SAAS,CAAC,MAAM,SAAqB;IACrC,SAAS,CAAC,OAAO,SAAwB;CAC1C;AAED,qBAAa,iBAAkB,SAAQ,mBAAmB;IACxD,SAAS,CAAC,MAAM,SAAqB;IACrC,SAAS,CAAC,OAAO,SAAuB;CACzC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { RealTimeFeedBase, PoolingClientBase, MultiConnectionRealTimeFeedBase } from "./realtimefeed.js";
|
|
2
|
+
import { batch, getJSON } from "../handy.js";
|
|
3
|
+
class FTXRealTimeFeedBase extends MultiConnectionRealTimeFeedBase {
|
|
4
|
+
*_getRealTimeFeeds(exchange, filters, timeoutIntervalMS, onError) {
|
|
5
|
+
const wsFilters = filters.filter((f) => f.channel !== 'instrument');
|
|
6
|
+
if (wsFilters.length > 0) {
|
|
7
|
+
yield new FtxSingleConnectionRealTimeFeed(exchange, wsFilters, this.wssURL, timeoutIntervalMS, onError);
|
|
8
|
+
}
|
|
9
|
+
const instrumentInfoFilters = filters.filter((f) => f.channel === 'instrument');
|
|
10
|
+
if (instrumentInfoFilters.length > 0) {
|
|
11
|
+
const instruments = instrumentInfoFilters.flatMap((s) => s.symbols);
|
|
12
|
+
if (instruments.length > 0) {
|
|
13
|
+
yield new FTXInstrumentInfoClient(exchange, this.httpURL, instruments, onError);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
class FtxSingleConnectionRealTimeFeed extends RealTimeFeedBase {
|
|
19
|
+
wssURL;
|
|
20
|
+
constructor(exchange, filters, wssURL, timeoutIntervalMS, onError) {
|
|
21
|
+
super(exchange, filters, timeoutIntervalMS, onError);
|
|
22
|
+
this.wssURL = wssURL;
|
|
23
|
+
}
|
|
24
|
+
mapToSubscribeMessages(filters) {
|
|
25
|
+
return filters
|
|
26
|
+
.map((filter) => {
|
|
27
|
+
if (!filter.symbols || filter.symbols.length === 0) {
|
|
28
|
+
throw new Error('FtxRealTimeFeed requires explicitly specified symbols when subscribing to live feed');
|
|
29
|
+
}
|
|
30
|
+
return filter.symbols.map((symbol) => {
|
|
31
|
+
return {
|
|
32
|
+
op: 'subscribe',
|
|
33
|
+
channel: filter.channel,
|
|
34
|
+
market: symbol
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
})
|
|
38
|
+
.flatMap((c) => c);
|
|
39
|
+
}
|
|
40
|
+
messageIsError(message) {
|
|
41
|
+
return message.type === 'error';
|
|
42
|
+
}
|
|
43
|
+
isIgnoredError(message) {
|
|
44
|
+
// ignore market not found errors
|
|
45
|
+
return message.code == 404;
|
|
46
|
+
}
|
|
47
|
+
sendCustomPing = () => {
|
|
48
|
+
this.send({ op: 'ping' });
|
|
49
|
+
};
|
|
50
|
+
messageIsHeartbeat(msg) {
|
|
51
|
+
return msg.type === 'pong';
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
class FTXInstrumentInfoClient extends PoolingClientBase {
|
|
55
|
+
_httpURL;
|
|
56
|
+
_instruments;
|
|
57
|
+
constructor(exchange, _httpURL, _instruments, onError) {
|
|
58
|
+
super(exchange, 5, onError);
|
|
59
|
+
this._httpURL = _httpURL;
|
|
60
|
+
this._instruments = _instruments;
|
|
61
|
+
}
|
|
62
|
+
async poolDataToStream(outputStream) {
|
|
63
|
+
for (const instruments of batch(this._instruments, 10)) {
|
|
64
|
+
await Promise.allSettled(instruments.map(async (instrument) => {
|
|
65
|
+
if (outputStream.destroyed) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
try {
|
|
69
|
+
const responses = await Promise.all([
|
|
70
|
+
getJSON(`${this._httpURL}/futures/${instrument}/stats`, { timeout: 10000 }),
|
|
71
|
+
getJSON(`${this._httpURL}/futures/${instrument}`, { timeout: 10000 })
|
|
72
|
+
]);
|
|
73
|
+
if (responses.some((response) => response.data.success === false)) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
const instrumentMessage = {
|
|
77
|
+
channel: 'instrument',
|
|
78
|
+
generated: true,
|
|
79
|
+
market: instrument,
|
|
80
|
+
type: 'update',
|
|
81
|
+
data: {
|
|
82
|
+
stats: responses[0].data.result,
|
|
83
|
+
info: responses[1].data.result
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
if (outputStream.writable) {
|
|
87
|
+
outputStream.write(instrumentMessage);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
catch (err) {
|
|
91
|
+
if (this.onError !== undefined) {
|
|
92
|
+
this.onError(err);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}));
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
export class FtxRealTimeFeed extends FTXRealTimeFeedBase {
|
|
100
|
+
wssURL = 'wss://ftx.com/ws';
|
|
101
|
+
httpURL = 'https://ftx.com/api';
|
|
102
|
+
}
|
|
103
|
+
export class FtxUSRealTimeFeed extends FTXRealTimeFeedBase {
|
|
104
|
+
wssURL = 'wss://ftx.us/ws/';
|
|
105
|
+
httpURL = 'https://ftx.us/api';
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=ftx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ftx.js","sourceRoot":"","sources":["../../src/realtimefeeds/ftx.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Filter } from '../types.ts';
|
|
2
|
+
import { RealTimeFeedBase } from './realtimefeed.ts';
|
|
3
|
+
export declare class GateIORealTimeFeed extends RealTimeFeedBase {
|
|
4
|
+
protected readonly wssURL = "wss://api.gateio.ws/ws/v4/";
|
|
5
|
+
protected httpURL: string;
|
|
6
|
+
protected mapToSubscribeMessages(filters: Filter<string>[]): any[];
|
|
7
|
+
protected messageIsError(message: any): boolean;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=gateio.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gateio.d.ts","sourceRoot":"","sources":["../../src/realtimefeeds/gateio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEpD,qBAAa,kBAAmB,SAAQ,gBAAgB;IACtD,SAAS,CAAC,QAAQ,CAAC,MAAM,gCAA+B;IACxD,SAAS,CAAC,OAAO,SAAiC;IAElD,SAAS,CAAC,sBAAsB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,GAAG,EAAE;IA+BlE,SAAS,CAAC,cAAc,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO;CAOhD"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { RealTimeFeedBase } from "./realtimefeed.js";
|
|
2
|
+
export class GateIORealTimeFeed extends RealTimeFeedBase {
|
|
3
|
+
wssURL = 'wss://api.gateio.ws/ws/v4/';
|
|
4
|
+
httpURL = 'https://api.gateio.ws/api/v4';
|
|
5
|
+
mapToSubscribeMessages(filters) {
|
|
6
|
+
const payload = filters.map((filter) => {
|
|
7
|
+
if (!filter.symbols || filter.symbols.length === 0) {
|
|
8
|
+
throw new Error('GateIORealTimeFeed requires explicitly specified symbols when subscribing to live feed');
|
|
9
|
+
}
|
|
10
|
+
if (filter.channel === 'obu') {
|
|
11
|
+
return filter.symbols.map((symbol) => {
|
|
12
|
+
return {
|
|
13
|
+
time: new Date().valueOf(),
|
|
14
|
+
channel: `spot.${filter.channel}`,
|
|
15
|
+
event: 'subscribe',
|
|
16
|
+
payload: [`ob.${symbol}.400`]
|
|
17
|
+
};
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
return filter.symbols.map((symbol) => {
|
|
22
|
+
return {
|
|
23
|
+
time: new Date().valueOf(),
|
|
24
|
+
channel: `spot.${filter.channel}`,
|
|
25
|
+
event: 'subscribe',
|
|
26
|
+
method: `${filter.channel}.subscribe`,
|
|
27
|
+
payload: [symbol]
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
return payload.flatMap((f) => f);
|
|
33
|
+
}
|
|
34
|
+
messageIsError(message) {
|
|
35
|
+
if (message.error !== null && message.error !== undefined) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=gateio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gateio.js","sourceRoot":"","sources":["../../src/realtimefeeds/gateio.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEpD,MAAM,OAAO,kBAAmB,SAAQ,gBAAgB;IACnC,MAAM,GAAG,4BAA4B,CAAA;IAC9C,OAAO,GAAG,8BAA8B,CAAA;IAExC,sBAAsB,CAAC,OAAyB;QACxD,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;YACrC,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACnD,MAAM,IAAI,KAAK,CAAC,wFAAwF,CAAC,CAAA;YAC3G,CAAC;YAED,IAAI,MAAM,CAAC,OAAO,KAAK,KAAK,EAAE,CAAC;gBAC7B,OAAO,MAAM,CAAC,OAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;oBACpC,OAAO;wBACL,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE;wBAC1B,OAAO,EAAE,QAAQ,MAAM,CAAC,OAAO,EAAE;wBACjC,KAAK,EAAE,WAAW;wBAClB,OAAO,EAAE,CAAC,MAAM,MAAM,MAAM,CAAC;qBAC9B,CAAA;gBACH,CAAC,CAAC,CAAA;YACJ,CAAC;iBAAM,CAAC;gBACN,OAAO,MAAM,CAAC,OAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;oBACpC,OAAO;wBACL,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE;wBAC1B,OAAO,EAAE,QAAQ,MAAM,CAAC,OAAO,EAAE;wBACjC,KAAK,EAAE,WAAW;wBAClB,MAAM,EAAE,GAAG,MAAM,CAAC,OAAO,YAAY;wBACrC,OAAO,EAAE,CAAC,MAAM,CAAC;qBAClB,CAAA;gBACH,CAAC,CAAC,CAAA;YACJ,CAAC;QACH,CAAC,CAAC,CAAA;QAEF,OAAO,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAA;IAClC,CAAC;IAES,cAAc,CAAC,OAAY;QACnC,IAAI,OAAO,CAAC,KAAK,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAC1D,OAAO,IAAI,CAAA;QACb,CAAC;QAED,OAAO,KAAK,CAAA;IACd,CAAC;CACF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Filter } from '../types.ts';
|
|
2
|
+
import { RealTimeFeedBase, MultiConnectionRealTimeFeedBase } from './realtimefeed.ts';
|
|
3
|
+
export declare class GateIOFuturesRealTimeFeed extends MultiConnectionRealTimeFeedBase {
|
|
4
|
+
protected _getRealTimeFeeds(exchange: string, filters: Filter<string>[], timeoutIntervalMS?: number, onError?: (error: Error) => void): Generator<GateIOFuturesSingleConnectionRealTimeFeed, void, unknown>;
|
|
5
|
+
private _only;
|
|
6
|
+
}
|
|
7
|
+
declare class GateIOFuturesSingleConnectionRealTimeFeed extends RealTimeFeedBase {
|
|
8
|
+
protected readonly wssURL: string;
|
|
9
|
+
protected readonly extraHeaders: {
|
|
10
|
+
'X-Gate-Size-Decimal': string;
|
|
11
|
+
};
|
|
12
|
+
constructor(wsURLSuffix: string, exchange: string, filters: Filter<string>[], timeoutIntervalMS?: number, onError?: (error: Error) => void);
|
|
13
|
+
protected mapToSubscribeMessages(filters: Filter<string>[]): any[];
|
|
14
|
+
protected messageIsError(message: any): boolean;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=gateiofutures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gateiofutures.d.ts","sourceRoot":"","sources":["../../src/realtimefeeds/gateiofutures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,gBAAgB,EAAE,+BAA+B,EAAE,MAAM,mBAAmB,CAAA;AAErF,qBAAa,yBAA0B,SAAQ,+BAA+B;IAC5E,SAAS,CAAE,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,iBAAiB,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI;IAoBtI,OAAO,CAAC,KAAK;CAgBd;AAED,cAAM,yCAA0C,SAAQ,gBAAgB;IACtE,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACjC,SAAS,CAAC,QAAQ,CAAC,YAAY;;MAAiC;gBAG9D,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,EACzB,iBAAiB,CAAC,EAAE,MAAM,EAC1B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI;IAMlC,SAAS,CAAC,sBAAsB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,GAAG,EAAE;IA0BlE,SAAS,CAAC,cAAc,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO;CAOhD"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { RealTimeFeedBase, MultiConnectionRealTimeFeedBase } from "./realtimefeed.js";
|
|
2
|
+
export class GateIOFuturesRealTimeFeed extends MultiConnectionRealTimeFeedBase {
|
|
3
|
+
*_getRealTimeFeeds(exchange, filters, timeoutIntervalMS, onError) {
|
|
4
|
+
const linearContractsFilters = filters.reduce(this._only((s) => s.endsWith('_USDT')), []);
|
|
5
|
+
const inverseContractsFilters = filters.reduce(this._only((s) => s.endsWith('_USDT') === false), []);
|
|
6
|
+
if (linearContractsFilters.length > 0) {
|
|
7
|
+
yield new GateIOFuturesSingleConnectionRealTimeFeed('usdt', exchange, linearContractsFilters, timeoutIntervalMS, onError);
|
|
8
|
+
}
|
|
9
|
+
if (inverseContractsFilters.length > 0) {
|
|
10
|
+
yield new GateIOFuturesSingleConnectionRealTimeFeed('btc', exchange, inverseContractsFilters, timeoutIntervalMS, onError);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
_only(filter) {
|
|
14
|
+
return (prev, current) => {
|
|
15
|
+
if (!current.symbols || current.symbols.length === 0) {
|
|
16
|
+
throw new Error('GateIOFuturesRealTimeFeed requires explicitly specified symbols when subscribing to live feed');
|
|
17
|
+
}
|
|
18
|
+
const symbols = current.symbols.filter(filter);
|
|
19
|
+
if (symbols.length > 0) {
|
|
20
|
+
prev.push({
|
|
21
|
+
channel: current.channel,
|
|
22
|
+
symbols
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return prev;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
class GateIOFuturesSingleConnectionRealTimeFeed extends RealTimeFeedBase {
|
|
30
|
+
wssURL;
|
|
31
|
+
extraHeaders = { 'X-Gate-Size-Decimal': '1' };
|
|
32
|
+
constructor(wsURLSuffix, exchange, filters, timeoutIntervalMS, onError) {
|
|
33
|
+
super(exchange, filters, timeoutIntervalMS, onError);
|
|
34
|
+
this.wssURL = `wss://fx-ws.gateio.ws/v4/ws/${wsURLSuffix}`;
|
|
35
|
+
}
|
|
36
|
+
mapToSubscribeMessages(filters) {
|
|
37
|
+
const payload = filters.flatMap((filter) => {
|
|
38
|
+
if (filter.channel === 'order_book') {
|
|
39
|
+
return filter.symbols.map((symbol) => {
|
|
40
|
+
return {
|
|
41
|
+
event: 'subscribe',
|
|
42
|
+
channel: `futures.${filter.channel}`,
|
|
43
|
+
payload: [symbol, '20', '0'],
|
|
44
|
+
time: Math.floor(new Date().valueOf() / 1000)
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
return [
|
|
50
|
+
{
|
|
51
|
+
event: 'subscribe',
|
|
52
|
+
channel: `futures.${filter.channel}`,
|
|
53
|
+
payload: filter.symbols,
|
|
54
|
+
time: Math.floor(new Date().valueOf() / 1000)
|
|
55
|
+
}
|
|
56
|
+
];
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
return payload;
|
|
60
|
+
}
|
|
61
|
+
messageIsError(message) {
|
|
62
|
+
if (message.error !== null && message.error !== undefined) {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=gateiofutures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gateiofutures.js","sourceRoot":"","sources":["../../src/realtimefeeds/gateiofutures.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Filter } from '../types.ts';
|
|
2
|
+
import { RealTimeFeedBase } from './realtimefeed.ts';
|
|
3
|
+
export declare class GeminiRealTimeFeed extends RealTimeFeedBase {
|
|
4
|
+
protected wssURL: string;
|
|
5
|
+
private readonly channels;
|
|
6
|
+
protected mapToSubscribeMessages(filters: Filter<string>[]): any[];
|
|
7
|
+
protected messageIsError(message: any): boolean;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=gemini.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gemini.d.ts","sourceRoot":"","sources":["../../src/realtimefeeds/gemini.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEpD,qBAAa,kBAAmB,SAAQ,gBAAgB;IACtD,SAAS,CAAC,MAAM,SAAoC;IACpD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA4C;IAErE,SAAS,CAAC,sBAAsB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,GAAG,EAAE;IA2BlE,SAAS,CAAC,cAAc,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO;CAGhD"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { RealTimeFeedBase } from "./realtimefeed.js";
|
|
2
|
+
export class GeminiRealTimeFeed extends RealTimeFeedBase {
|
|
3
|
+
wssURL = 'wss://ws.gemini.com?snapshot=-1';
|
|
4
|
+
channels = new Set(['trade', 'depth', 'bookTicker']);
|
|
5
|
+
mapToSubscribeMessages(filters) {
|
|
6
|
+
const params = filters
|
|
7
|
+
.flatMap((filter) => {
|
|
8
|
+
if (!this.channels.has(filter.channel)) {
|
|
9
|
+
throw new Error(`GeminiRealTimeFeed unsupported channel ${filter.channel}`);
|
|
10
|
+
}
|
|
11
|
+
if (!Array.isArray(filter.symbols) || filter.symbols.length === 0) {
|
|
12
|
+
throw new Error('GeminiRealTimeFeed requires explicitly specified symbols when subscribing to live feed');
|
|
13
|
+
}
|
|
14
|
+
const channel = filter.channel === 'depth' ? 'depth@100ms' : filter.channel;
|
|
15
|
+
return filter.symbols.map((symbol) => `${symbol.toLowerCase()}@${channel}`);
|
|
16
|
+
})
|
|
17
|
+
.filter((value, index, self) => {
|
|
18
|
+
return self.indexOf(value) === index;
|
|
19
|
+
});
|
|
20
|
+
return [
|
|
21
|
+
{
|
|
22
|
+
method: 'SUBSCRIBE',
|
|
23
|
+
params,
|
|
24
|
+
id: 1
|
|
25
|
+
}
|
|
26
|
+
];
|
|
27
|
+
}
|
|
28
|
+
messageIsError(message) {
|
|
29
|
+
return message.result === 'error' || message.error !== undefined || message.status >= 400;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=gemini.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gemini.js","sourceRoot":"","sources":["../../src/realtimefeeds/gemini.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEpD,MAAM,OAAO,kBAAmB,SAAQ,gBAAgB;IAC5C,MAAM,GAAG,iCAAiC,CAAA;IACnC,QAAQ,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC,CAAA;IAE3D,sBAAsB,CAAC,OAAyB;QACxD,MAAM,MAAM,GAAG,OAAO;aACnB,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YAClB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;gBACvC,MAAM,IAAI,KAAK,CAAC,0CAA0C,MAAM,CAAC,OAAO,EAAE,CAAC,CAAA;YAC7E,CAAC;YAED,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAClE,MAAM,IAAI,KAAK,CAAC,wFAAwF,CAAC,CAAA;YAC3G,CAAC;YAED,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAA;YAC3E,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC,WAAW,EAAE,IAAI,OAAO,EAAE,CAAC,CAAA;QAC7E,CAAC,CAAC;aACD,MAAM,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;YAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,CAAA;QACtC,CAAC,CAAC,CAAA;QAEJ,OAAO;YACL;gBACE,MAAM,EAAE,WAAW;gBACnB,MAAM;gBACN,EAAE,EAAE,CAAC;aACN;SACF,CAAA;IACH,CAAC;IAES,cAAc,CAAC,OAAY;QACnC,OAAO,OAAO,CAAC,MAAM,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,KAAK,SAAS,IAAI,OAAO,CAAC,MAAM,IAAI,GAAG,CAAA;IAC3F,CAAC;CACF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Filter } from '../types.ts';
|
|
2
|
+
import { RealTimeFeedBase } from './realtimefeed.ts';
|
|
3
|
+
export declare class HitBtcRealTimeFeed extends RealTimeFeedBase {
|
|
4
|
+
protected wssURL: string;
|
|
5
|
+
protected channelMappings: {
|
|
6
|
+
subscribeOrderbook: string[];
|
|
7
|
+
subscribeTrades: string[];
|
|
8
|
+
};
|
|
9
|
+
protected mapToSubscribeMessages(filters: Filter<string>[]): any[];
|
|
10
|
+
protected messageIsError(message: any): boolean;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=hitbtc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hitbtc.d.ts","sourceRoot":"","sources":["../../src/realtimefeeds/hitbtc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEpD,qBAAa,kBAAmB,SAAQ,gBAAgB;IACtD,SAAS,CAAC,MAAM,SAAkC;IAElD,SAAS,CAAC,eAAe;;;MAGxB;IAED,SAAS,CAAC,sBAAsB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,GAAG,EAAE;IAkDlE,SAAS,CAAC,cAAc,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO;CAGhD"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { RealTimeFeedBase } from "./realtimefeed.js";
|
|
2
|
+
export class HitBtcRealTimeFeed extends RealTimeFeedBase {
|
|
3
|
+
wssURL = 'wss://api.hitbtc.com/api/2/ws';
|
|
4
|
+
channelMappings = {
|
|
5
|
+
subscribeOrderbook: ['snapshotOrderbook', 'updateOrderbook'],
|
|
6
|
+
subscribeTrades: ['updateTrades', 'snapshotTrades']
|
|
7
|
+
};
|
|
8
|
+
mapToSubscribeMessages(filters) {
|
|
9
|
+
const subscriptions = filters
|
|
10
|
+
.map((filter) => {
|
|
11
|
+
if (!filter.symbols || filter.symbols.length === 0) {
|
|
12
|
+
throw new Error('HitBtcRealTimeFeed requires explicitly specified symbols when subscribing to live feed');
|
|
13
|
+
}
|
|
14
|
+
const subscribeToOrderBook = this.channelMappings.subscribeOrderbook.includes(filter.channel);
|
|
15
|
+
const subscribeToTrades = this.channelMappings.subscribeTrades.includes(filter.channel);
|
|
16
|
+
let method;
|
|
17
|
+
if (subscribeToOrderBook) {
|
|
18
|
+
method = 'subscribeOrderbook';
|
|
19
|
+
}
|
|
20
|
+
else if (subscribeToTrades) {
|
|
21
|
+
method = 'subscribeTrades';
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error(`Invalid channel: ${filter.channel}`);
|
|
25
|
+
}
|
|
26
|
+
return filter.symbols.map((symbol) => {
|
|
27
|
+
return {
|
|
28
|
+
method,
|
|
29
|
+
symbol
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
})
|
|
33
|
+
.flatMap((s) => s)
|
|
34
|
+
.reduce((prev, current) => {
|
|
35
|
+
const matchingExisting = prev.find((c) => c.method === current.method && c.symbol === current.symbol);
|
|
36
|
+
if (matchingExisting === undefined) {
|
|
37
|
+
prev.push(current);
|
|
38
|
+
}
|
|
39
|
+
return prev;
|
|
40
|
+
}, []);
|
|
41
|
+
return subscriptions.map((subscription, index) => {
|
|
42
|
+
return {
|
|
43
|
+
method: subscription.method,
|
|
44
|
+
params: {
|
|
45
|
+
symbol: subscription.symbol
|
|
46
|
+
},
|
|
47
|
+
id: index + 1
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
messageIsError(message) {
|
|
52
|
+
return message.error !== undefined;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=hitbtc.js.map
|