tardis-dev
Version:
Convenient access to tick-level historical and real-time cryptocurrency market data via Node.js
136 lines • 6.29 kB
JavaScript
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRealTimeFeedFactory = getRealTimeFeedFactory;
exports.createRealTimeFeed = createRealTimeFeed;
exports.setRealTimeFeedFactory = setRealTimeFeedFactory;
const binance_1 = require("./binance");
const binancedex_1 = require("./binancedex");
const bitfinex_1 = require("./bitfinex");
const bitflyer_1 = require("./bitflyer");
const bitmex_1 = require("./bitmex");
const bitstamp_1 = require("./bitstamp");
const bybit_1 = require("./bybit");
const coinbase_1 = require("./coinbase");
const cryptofacilities_1 = require("./cryptofacilities");
const deribit_1 = require("./deribit");
const ftx_1 = require("./ftx");
const gemini_1 = require("./gemini");
const hitbtc_1 = require("./hitbtc");
const huobi_1 = require("./huobi");
const kraken_1 = require("./kraken");
const okex_1 = require("./okex");
const phemex_1 = require("./phemex");
const delta_1 = require("./delta");
const gateio_1 = require("./gateio");
const gateiofutures_1 = require("./gateiofutures");
const poloniex_1 = require("./poloniex");
const coinflex_1 = require("./coinflex");
const binanceoptions_1 = require("./binanceoptions");
const upbit_1 = require("./upbit");
const ascendex_1 = require("./ascendex");
const dydx_1 = require("./dydx");
const serum_1 = require("./serum");
const staratlas_1 = require("./staratlas");
const mango_1 = require("./mango");
const cryptocom_1 = require("./cryptocom");
const kucoin_1 = require("./kucoin");
const bitnomial_1 = require("./bitnomial");
const woox_1 = require("./woox");
const blockchaincom_1 = require("./blockchaincom");
const binanceeuropeanoptions_1 = require("./binanceeuropeanoptions");
const okexspreads_1 = require("./okexspreads");
const kucoinfutures_1 = require("./kucoinfutures");
const dydx_v4_1 = require("./dydx_v4");
const bitget_1 = require("./bitget");
const coinbaseinternational_1 = require("./coinbaseinternational");
const hyperliquid_1 = require("./hyperliquid");
__exportStar(require("./realtimefeed"), exports);
const realTimeFeedsMap = {
bitmex: bitmex_1.BitmexRealTimeFeed,
binance: binance_1.BinanceRealTimeFeed,
'binance-jersey': binance_1.BinanceJerseyRealTimeFeed,
'binance-us': binance_1.BinanceUSRealTimeFeed,
'binance-dex': binancedex_1.BinanceDexRealTimeFeed,
'binance-futures': binance_1.BinanceFuturesRealTimeFeed,
'binance-delivery': binance_1.BinanceDeliveryRealTimeFeed,
bitfinex: bitfinex_1.BitfinexRealTimeFeed,
'bitfinex-derivatives': bitfinex_1.BitfinexRealTimeFeed,
bitflyer: bitflyer_1.BitflyerRealTimeFeed,
bitstamp: bitstamp_1.BitstampRealTimeFeed,
coinbase: coinbase_1.CoinbaseRealTimeFeed,
cryptofacilities: cryptofacilities_1.CryptofacilitiesRealTimeFeed,
deribit: deribit_1.DeribitRealTimeDataFeed,
ftx: ftx_1.FtxRealTimeFeed,
'ftx-us': ftx_1.FtxUSRealTimeFeed,
gemini: gemini_1.GeminiRealTimeFeed,
kraken: kraken_1.KrakenRealTimeFeed,
okex: okex_1.OkexRealTimeFeed,
'okex-futures': okex_1.OkexRealTimeFeed,
'okex-swap': okex_1.OkexRealTimeFeed,
'okex-options': okex_1.OkexOptionsRealTimeFeed,
'huobi-dm': huobi_1.HuobiDMRealTimeFeed,
'huobi-dm-swap': huobi_1.HuobiDMSwapRealTimeFeed,
'huobi-dm-linear-swap': huobi_1.HuobiDMLinearSwapRealTimeFeed,
huobi: huobi_1.HuobiRealTimeFeed,
bybit: bybit_1.BybitRealTimeDataFeed,
okcoin: okex_1.OKCoinRealTimeFeed,
hitbtc: hitbtc_1.HitBtcRealTimeFeed,
phemex: phemex_1.PhemexRealTimeFeed,
delta: delta_1.DeltaRealTimeFeed,
'gate-io': gateio_1.GateIORealTimeFeed,
'gate-io-futures': gateiofutures_1.GateIOFuturesRealTimeFeed,
poloniex: poloniex_1.PoloniexRealTimeFeed,
coinflex: coinflex_1.CoinflexRealTimeFeed,
'binance-options': binanceoptions_1.BinanceOptionsRealTimeFeed,
upbit: upbit_1.UpbitRealTimeFeed,
ascendex: ascendex_1.AscendexRealTimeFeed,
dydx: dydx_1.DydxRealTimeFeed,
serum: serum_1.SerumRealTimeFeed,
'star-atlas': staratlas_1.StarAtlasRealTimeFeed,
'huobi-dm-options': huobi_1.HuobiDMOptionsRealTimeFeed,
mango: mango_1.MangoRealTimeFeed,
'bybit-spot': bybit_1.BybitSpotRealTimeDataFeed,
'bybit-options': bybit_1.BybitOptionsRealTimeDataFeed,
'crypto-com': cryptocom_1.CryptoComRealTimeFeed,
'crypto-com-derivatives': cryptocom_1.CryptoComRealTimeFeed,
kucoin: kucoin_1.KucoinRealTimeFeed,
bitnomial: bitnomial_1.BitnomialRealTimeFeed,
'woo-x': woox_1.WooxRealTimeFeed,
'blockchain-com': blockchaincom_1.BlockchainComRealTimeFeed,
'binance-european-options': binanceeuropeanoptions_1.BinanceEuropeanOptionsRealTimeFeed,
'okex-spreads': okexspreads_1.OkexSpreadsRealTimeFeed,
'kucoin-futures': kucoinfutures_1.KucoinFuturesRealTimeFeed,
'dydx-v4': dydx_v4_1.DydxV4RealTimeFeed,
bitget: bitget_1.BitgetRealTimeFeed,
'bitget-futures': bitget_1.BitgetFuturesRealTimeFeed,
'coinbase-international': coinbaseinternational_1.CoinbaseInternationalRealTimeFeed,
hyperliquid: hyperliquid_1.HyperliquidRealTimeFeed
};
function getRealTimeFeedFactory(exchange) {
if (realTimeFeedsMap[exchange]) {
return realTimeFeedsMap[exchange];
}
throw new Error(`not supported exchange ${exchange}`);
}
function createRealTimeFeed(exchange, filters, timeoutIntervalMS, onError) {
const RealTimeFeedFactory = getRealTimeFeedFactory(exchange);
return new RealTimeFeedFactory(exchange, filters, timeoutIntervalMS, onError);
}
function setRealTimeFeedFactory(exchange, realTimeFeed) {
realTimeFeedsMap[exchange] = realTimeFeed;
}
//# sourceMappingURL=index.js.map