tardis-dev 13.4.12 → 13.4.13
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/dist/consts.d.ts +3 -1
- package/dist/consts.d.ts.map +1 -1
- package/dist/consts.js +8 -2
- package/dist/consts.js.map +1 -1
- package/dist/mappers/bybit.d.ts +1 -1
- package/dist/mappers/bybitspot.d.ts +1 -1
- package/dist/mappers/cryptocom.d.ts +257 -0
- package/dist/mappers/cryptocom.d.ts.map +1 -0
- package/dist/mappers/cryptocom.js +193 -0
- package/dist/mappers/cryptocom.js.map +1 -0
- package/dist/mappers/huobi.d.ts +3 -3
- package/dist/mappers/index.d.ts +4 -4
- package/dist/mappers/index.d.ts.map +1 -1
- package/dist/mappers/index.js +12 -4
- package/dist/mappers/index.js.map +1 -1
- package/dist/realtimefeeds/cryptocom.d.ts +10 -0
- package/dist/realtimefeeds/cryptocom.d.ts.map +1 -0
- package/dist/realtimefeeds/cryptocom.js +49 -0
- package/dist/realtimefeeds/cryptocom.js.map +1 -0
- package/dist/realtimefeeds/cryptocomderivatives.d.ts +10 -0
- package/dist/realtimefeeds/cryptocomderivatives.d.ts.map +1 -0
- package/dist/realtimefeeds/cryptocomderivatives.js +51 -0
- package/dist/realtimefeeds/cryptocomderivatives.js.map +1 -0
- package/dist/realtimefeeds/index.d.ts.map +1 -1
- package/dist/realtimefeeds/index.js +5 -1
- package/dist/realtimefeeds/index.js.map +1 -1
- package/package.json +1 -1
- package/src/consts.ts +10 -2
- package/src/mappers/cryptocom.ts +395 -0
- package/src/mappers/index.ts +12 -4
- package/src/realtimefeeds/cryptocom.ts +48 -0
- package/src/realtimefeeds/cryptocomderivatives.ts +50 -0
- package/src/realtimefeeds/index.ts +5 -1
package/dist/consts.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const EXCHANGES: readonly ["bitmex", "deribit", "binance-futures", "binance-delivery", "binance-options", "binance", "ftx", "okex-futures", "okex-options", "okex-swap", "okex", "huobi-dm", "huobi-dm-swap", "huobi-dm-linear-swap", "huobi", "bitfinex-derivatives", "bitfinex", "coinbase", "cryptofacilities", "kraken", "bitstamp", "gemini", "poloniex", "bybit", "bybit-spot", "phemex", "delta", "ftx-us", "binance-us", "gate-io-futures", "gate-io", "okcoin", "bitflyer", "hitbtc", "coinflex", "binance-jersey", "binance-dex", "upbit", "ascendex", "dydx", "serum", "mango", "huobi-dm-options", "star-atlas"];
|
|
1
|
+
export declare const EXCHANGES: readonly ["bitmex", "deribit", "binance-futures", "binance-delivery", "binance-options", "binance", "ftx", "okex-futures", "okex-options", "okex-swap", "okex", "huobi-dm", "huobi-dm-swap", "huobi-dm-linear-swap", "huobi", "bitfinex-derivatives", "bitfinex", "coinbase", "cryptofacilities", "kraken", "bitstamp", "gemini", "poloniex", "bybit", "bybit-spot", "phemex", "delta", "ftx-us", "binance-us", "gate-io-futures", "gate-io", "okcoin", "bitflyer", "hitbtc", "coinflex", "binance-jersey", "binance-dex", "upbit", "ascendex", "dydx", "serum", "mango", "huobi-dm-options", "star-atlas", "crypto-com", "crypto-com-derivatives"];
|
|
2
2
|
export declare const EXCHANGE_CHANNELS_INFO: {
|
|
3
3
|
bitmex: readonly ["trade", "orderBookL2", "liquidation", "connected", "announcement", "chat", "publicNotifications", "instrument", "settlement", "funding", "insurance", "orderBookL2_25", "orderBook10", "quote", "quoteBin1m", "quoteBin5m", "quoteBin1h", "quoteBin1d", "tradeBin1m", "tradeBin5m", "tradeBin1h", "tradeBin1d"];
|
|
4
4
|
coinbase: readonly ["match", "subscriptions", "received", "open", "done", "change", "l2update", "ticker", "snapshot", "last_match", "full_snapshot"];
|
|
@@ -44,5 +44,7 @@ export declare const EXCHANGE_CHANNELS_INFO: {
|
|
|
44
44
|
'star-atlas': readonly ["recent_trades", "trade", "quote", "l2snapshot", "l2update", "l3snapshot", "open", "fill", "change", "done"];
|
|
45
45
|
'huobi-dm-options': readonly ["trade", "detail", "depth", "bbo", "open_interest", "option_market_index", "option_index"];
|
|
46
46
|
mango: readonly ["recent_trades", "trade", "quote", "l2snapshot", "l2update", "l3snapshot", "open", "fill", "change", "done"];
|
|
47
|
+
'crypto-com': string[];
|
|
48
|
+
'crypto-com-derivatives': string[];
|
|
47
49
|
};
|
|
48
50
|
//# sourceMappingURL=consts.d.ts.map
|
package/dist/consts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,qnBA+CZ,CAAA;AA+UV,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+ClC,CAAA"}
|
package/dist/consts.js
CHANGED
|
@@ -45,7 +45,9 @@ exports.EXCHANGES = [
|
|
|
45
45
|
'serum',
|
|
46
46
|
'mango',
|
|
47
47
|
'huobi-dm-options',
|
|
48
|
-
'star-atlas'
|
|
48
|
+
'star-atlas',
|
|
49
|
+
'crypto-com',
|
|
50
|
+
'crypto-com-derivatives'
|
|
49
51
|
];
|
|
50
52
|
const BINANCE_CHANNELS = ['trade', 'aggTrade', 'ticker', 'depth', 'depthSnapshot', 'bookTicker', 'recentTrades', 'borrowInterest'];
|
|
51
53
|
const BINANCE_DEX_CHANNELS = ['trades', 'marketDiff', 'depthSnapshot', 'ticker'];
|
|
@@ -339,6 +341,8 @@ const MANGO_CHANNELS = [
|
|
|
339
341
|
];
|
|
340
342
|
const HUOBI_DM_OPTIONS_CHANNELS = ['trade', 'detail', 'depth', 'bbo', 'open_interest', 'option_market_index', 'option_index'];
|
|
341
343
|
const BYBIT_SPOT_CHANNELS = ['trade', 'bookTicker', 'depth'];
|
|
344
|
+
const CRYPTO_COM_CHANNELS = ['trade', 'book', 'ticker'];
|
|
345
|
+
const CRYPTO_COM_DERIVATIVES = ['trade', 'book', 'ticker', 'settlement', 'index', 'mark', 'funding'];
|
|
342
346
|
exports.EXCHANGE_CHANNELS_INFO = {
|
|
343
347
|
bitmex: BITMEX_CHANNELS,
|
|
344
348
|
coinbase: COINBASE_CHANNELS,
|
|
@@ -383,6 +387,8 @@ exports.EXCHANGE_CHANNELS_INFO = {
|
|
|
383
387
|
serum: SERUM_CHANNELS,
|
|
384
388
|
'star-atlas': SERUM_CHANNELS,
|
|
385
389
|
'huobi-dm-options': HUOBI_DM_OPTIONS_CHANNELS,
|
|
386
|
-
mango: MANGO_CHANNELS
|
|
390
|
+
mango: MANGO_CHANNELS,
|
|
391
|
+
'crypto-com': CRYPTO_COM_CHANNELS,
|
|
392
|
+
'crypto-com-derivatives': CRYPTO_COM_DERIVATIVES
|
|
387
393
|
};
|
|
388
394
|
//# sourceMappingURL=consts.js.map
|
package/dist/consts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG;IACvB,QAAQ;IACR,SAAS;IACT,iBAAiB;IACjB,kBAAkB;IAClB,iBAAiB;IACjB,SAAS;IACT,KAAK;IACL,cAAc;IACd,cAAc;IACd,WAAW;IACX,MAAM;IACN,UAAU;IACV,eAAe;IACf,sBAAsB;IACtB,OAAO;IACP,sBAAsB;IACtB,UAAU;IACV,UAAU;IACV,kBAAkB;IAClB,QAAQ;IACR,UAAU;IACV,QAAQ;IACR,UAAU;IACV,OAAO;IACP,YAAY;IACZ,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,YAAY;IACZ,iBAAiB;IACjB,SAAS;IACT,QAAQ;IACR,UAAU;IACV,QAAQ;IACR,UAAU;IACV,gBAAgB;IAChB,aAAa;IACb,OAAO;IACP,UAAU;IACV,MAAM;IACN,OAAO;IACP,OAAO;IACP,kBAAkB;IAClB,YA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;IACvC,sBAAsB,EAAE,6BAA6B;IACrD,KAAK,EAAE,cAAc;IACrB,YAAY,EAAE,mBAAmB;IACjC,MAAM,EAAE,eAAe;IACvB,MAAM,EAAE,eAAe;IACvB,QAAQ,EAAE,iBAAiB;IAC3B,MAAM,EAAE,eAAe;IACvB,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,gBAAgB;IAC3B,iBAAiB,EAAE,wBAAwB;IAC3C,QAAQ,EAAE,iBAAiB;IAC3B,iBAAiB,EAAE,wBAAwB;IAC3C,KAAK,EAAE,cAAc;IACrB,QAAQ,EAAE,iBAAiB;IAC3B,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,cAAc;IACrB,YAAY,EAAE,cAAc;IAC5B,kBAAkB,EAAE,yBAAyB;IAC7C,KAAK,EAAE,cAAc;IACrB,YAAY,EAAE,mBAAmB;IACjC,wBAAwB,EAAE,sBAAsB;CACjD,CAAA"}
|
package/dist/mappers/bybit.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export declare class BybitBookChangeMapper implements Mapper<'bybit', BookChange
|
|
|
25
25
|
map(message: BybitBookSnapshotDataMessage | BybitBookSnapshotUpdateMessage, localTimestamp: Date): Generator<{
|
|
26
26
|
readonly type: "book_change";
|
|
27
27
|
readonly symbol: string;
|
|
28
|
-
readonly exchange: "bitmex" | "deribit" | "binance-futures" | "binance-delivery" | "binance-options" | "binance" | "ftx" | "okex-futures" | "okex-options" | "okex-swap" | "okex" | "huobi-dm" | "huobi-dm-swap" | "huobi-dm-linear-swap" | "huobi" | "bitfinex-derivatives" | "bitfinex" | "coinbase" | "cryptofacilities" | "kraken" | "bitstamp" | "gemini" | "poloniex" | "bybit" | "bybit-spot" | "phemex" | "delta" | "ftx-us" | "binance-us" | "gate-io-futures" | "gate-io" | "okcoin" | "bitflyer" | "hitbtc" | "coinflex" | "binance-jersey" | "binance-dex" | "upbit" | "ascendex" | "dydx" | "serum" | "mango" | "huobi-dm-options" | "star-atlas";
|
|
28
|
+
readonly exchange: "bitmex" | "deribit" | "binance-futures" | "binance-delivery" | "binance-options" | "binance" | "ftx" | "okex-futures" | "okex-options" | "okex-swap" | "okex" | "huobi-dm" | "huobi-dm-swap" | "huobi-dm-linear-swap" | "huobi" | "bitfinex-derivatives" | "bitfinex" | "coinbase" | "cryptofacilities" | "kraken" | "bitstamp" | "gemini" | "poloniex" | "bybit" | "bybit-spot" | "phemex" | "delta" | "ftx-us" | "binance-us" | "gate-io-futures" | "gate-io" | "okcoin" | "bitflyer" | "hitbtc" | "coinflex" | "binance-jersey" | "binance-dex" | "upbit" | "ascendex" | "dydx" | "serum" | "mango" | "huobi-dm-options" | "star-atlas" | "crypto-com" | "crypto-com-derivatives";
|
|
29
29
|
readonly isSnapshot: boolean;
|
|
30
30
|
readonly bids: {
|
|
31
31
|
price: number;
|
|
@@ -21,7 +21,7 @@ export declare class BybitSpotBookChangeMapper implements Mapper<'bybit-spot', B
|
|
|
21
21
|
map(message: BybitSpotDepthMessage, localTimestamp: Date): Generator<{
|
|
22
22
|
readonly type: "book_change";
|
|
23
23
|
readonly symbol: "RENUSDT";
|
|
24
|
-
readonly exchange: "bitmex" | "deribit" | "binance-futures" | "binance-delivery" | "binance-options" | "binance" | "ftx" | "okex-futures" | "okex-options" | "okex-swap" | "okex" | "huobi-dm" | "huobi-dm-swap" | "huobi-dm-linear-swap" | "huobi" | "bitfinex-derivatives" | "bitfinex" | "coinbase" | "cryptofacilities" | "kraken" | "bitstamp" | "gemini" | "poloniex" | "bybit" | "bybit-spot" | "phemex" | "delta" | "ftx-us" | "binance-us" | "gate-io-futures" | "gate-io" | "okcoin" | "bitflyer" | "hitbtc" | "coinflex" | "binance-jersey" | "binance-dex" | "upbit" | "ascendex" | "dydx" | "serum" | "mango" | "huobi-dm-options" | "star-atlas";
|
|
24
|
+
readonly exchange: "bitmex" | "deribit" | "binance-futures" | "binance-delivery" | "binance-options" | "binance" | "ftx" | "okex-futures" | "okex-options" | "okex-swap" | "okex" | "huobi-dm" | "huobi-dm-swap" | "huobi-dm-linear-swap" | "huobi" | "bitfinex-derivatives" | "bitfinex" | "coinbase" | "cryptofacilities" | "kraken" | "bitstamp" | "gemini" | "poloniex" | "bybit" | "bybit-spot" | "phemex" | "delta" | "ftx-us" | "binance-us" | "gate-io-futures" | "gate-io" | "okcoin" | "bitflyer" | "hitbtc" | "coinflex" | "binance-jersey" | "binance-dex" | "upbit" | "ascendex" | "dydx" | "serum" | "mango" | "huobi-dm-options" | "star-atlas" | "crypto-com" | "crypto-com-derivatives";
|
|
25
25
|
readonly isSnapshot: true;
|
|
26
26
|
readonly bids: {
|
|
27
27
|
price: number;
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { BookChange, Exchange, BookTicker, Trade, DerivativeTicker } from '../types';
|
|
2
|
+
import { Mapper } from './mapper';
|
|
3
|
+
export declare class CryptoComTradesMapper implements Mapper<'crypto-com' | 'crypto-com-derivatives', Trade> {
|
|
4
|
+
private readonly _exchange;
|
|
5
|
+
constructor(_exchange: Exchange);
|
|
6
|
+
canHandle(message: CryptoComTradeMessage): boolean;
|
|
7
|
+
getFilters(symbols?: string[]): {
|
|
8
|
+
readonly channel: "trade";
|
|
9
|
+
readonly symbols: string[] | undefined;
|
|
10
|
+
}[];
|
|
11
|
+
map(message: CryptoComTradeMessage, localTimestamp: Date): IterableIterator<Trade>;
|
|
12
|
+
}
|
|
13
|
+
export declare class CryptoComBookChangeMapper implements Mapper<'crypto-com' | 'crypto-com-derivatives', BookChange> {
|
|
14
|
+
protected readonly _exchange: Exchange;
|
|
15
|
+
constructor(_exchange: Exchange);
|
|
16
|
+
canHandle(message: CryptoComBookMessage): boolean;
|
|
17
|
+
getFilters(symbols?: string[]): {
|
|
18
|
+
readonly channel: "book";
|
|
19
|
+
readonly symbols: string[] | undefined;
|
|
20
|
+
}[];
|
|
21
|
+
map(message: CryptoComBookMessage, localTimestamp: Date): Generator<{
|
|
22
|
+
readonly type: "book_change";
|
|
23
|
+
readonly symbol: "ETH_CRO" | "BTCUSD-PERP" | "DOT_USDT";
|
|
24
|
+
readonly exchange: "bitmex" | "deribit" | "binance-futures" | "binance-delivery" | "binance-options" | "binance" | "ftx" | "okex-futures" | "okex-options" | "okex-swap" | "okex" | "huobi-dm" | "huobi-dm-swap" | "huobi-dm-linear-swap" | "huobi" | "bitfinex-derivatives" | "bitfinex" | "coinbase" | "cryptofacilities" | "kraken" | "bitstamp" | "gemini" | "poloniex" | "bybit" | "bybit-spot" | "phemex" | "delta" | "ftx-us" | "binance-us" | "gate-io-futures" | "gate-io" | "okcoin" | "bitflyer" | "hitbtc" | "coinflex" | "binance-jersey" | "binance-dex" | "upbit" | "ascendex" | "dydx" | "serum" | "mango" | "huobi-dm-options" | "star-atlas" | "crypto-com" | "crypto-com-derivatives";
|
|
25
|
+
readonly isSnapshot: boolean;
|
|
26
|
+
readonly bids: {
|
|
27
|
+
price: number;
|
|
28
|
+
amount: number;
|
|
29
|
+
}[];
|
|
30
|
+
readonly asks: {
|
|
31
|
+
price: number;
|
|
32
|
+
amount: number;
|
|
33
|
+
}[];
|
|
34
|
+
readonly timestamp: Date;
|
|
35
|
+
readonly localTimestamp: Date;
|
|
36
|
+
}, void, unknown>;
|
|
37
|
+
private _mapBookLevel;
|
|
38
|
+
}
|
|
39
|
+
export declare class CryptoComBookTickerMapper implements Mapper<'crypto-com' | 'crypto-com-derivatives', BookTicker> {
|
|
40
|
+
protected readonly _exchange: Exchange;
|
|
41
|
+
constructor(_exchange: Exchange);
|
|
42
|
+
canHandle(message: CryptoComTickerMessage): boolean;
|
|
43
|
+
getFilters(symbols?: string[]): {
|
|
44
|
+
readonly channel: "ticker";
|
|
45
|
+
readonly symbols: string[] | undefined;
|
|
46
|
+
}[];
|
|
47
|
+
map(message: CryptoComTickerMessage, localTimestamp: Date): Generator<BookTicker, void, unknown>;
|
|
48
|
+
}
|
|
49
|
+
export declare class CryptoComDerivativeTickerMapper implements Mapper<'crypto-com-derivatives', DerivativeTicker> {
|
|
50
|
+
protected readonly exchange: Exchange;
|
|
51
|
+
private readonly pendingTickerInfoHelper;
|
|
52
|
+
private readonly _indexPrices;
|
|
53
|
+
constructor(exchange: Exchange);
|
|
54
|
+
canHandle(message: CryptoComDerivativesTickerMessage | CryptoComIndexMessage | CryptoComMarkPriceMessage | CryptoComFundingMessage): boolean;
|
|
55
|
+
getFilters(symbols?: string[]): ({
|
|
56
|
+
readonly channel: "ticker";
|
|
57
|
+
readonly symbols: string[] | undefined;
|
|
58
|
+
} | {
|
|
59
|
+
readonly channel: "index";
|
|
60
|
+
readonly symbols: string[];
|
|
61
|
+
} | {
|
|
62
|
+
readonly channel: "mark";
|
|
63
|
+
readonly symbols: string[] | undefined;
|
|
64
|
+
} | {
|
|
65
|
+
readonly channel: "funding";
|
|
66
|
+
readonly symbols: string[] | undefined;
|
|
67
|
+
})[];
|
|
68
|
+
map(message: CryptoComDerivativesTickerMessage | CryptoComIndexMessage | CryptoComMarkPriceMessage | CryptoComFundingMessage, localTimestamp: Date): IterableIterator<DerivativeTicker>;
|
|
69
|
+
}
|
|
70
|
+
declare type CryptoComTradeMessage = {
|
|
71
|
+
method: 'subscribe';
|
|
72
|
+
result: {
|
|
73
|
+
instrument_name: 'ETH_CRO';
|
|
74
|
+
subscription: 'trade.ETH_CRO';
|
|
75
|
+
channel: 'trade';
|
|
76
|
+
data: [
|
|
77
|
+
{
|
|
78
|
+
p: 162.12;
|
|
79
|
+
q: 11.085;
|
|
80
|
+
s: 'BUY';
|
|
81
|
+
d: 1210447366;
|
|
82
|
+
t: 1587523078844;
|
|
83
|
+
dataTime: 0;
|
|
84
|
+
}
|
|
85
|
+
];
|
|
86
|
+
};
|
|
87
|
+
} | {
|
|
88
|
+
id: -1;
|
|
89
|
+
code: 0;
|
|
90
|
+
method: 'subscribe';
|
|
91
|
+
result: {
|
|
92
|
+
channel: 'trade';
|
|
93
|
+
subscription: 'trade.BTCUSD-PERP';
|
|
94
|
+
instrument_name: 'BTCUSD-PERP';
|
|
95
|
+
data: [{
|
|
96
|
+
d: '4611686018439397540';
|
|
97
|
+
t: 1653992578435;
|
|
98
|
+
p: '31603.5';
|
|
99
|
+
q: '0.1000';
|
|
100
|
+
s: 'BUY';
|
|
101
|
+
i: 'BTCUSD-PERP';
|
|
102
|
+
}];
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
declare type CryptoComBookMessage = {
|
|
106
|
+
code: 0;
|
|
107
|
+
method: 'subscribe';
|
|
108
|
+
result: {
|
|
109
|
+
instrument_name: 'ETH_CRO';
|
|
110
|
+
subscription: 'book.ETH_CRO.150';
|
|
111
|
+
channel: 'book';
|
|
112
|
+
depth: 150;
|
|
113
|
+
data: [
|
|
114
|
+
{
|
|
115
|
+
bids: [number, number][];
|
|
116
|
+
asks: [number, number][];
|
|
117
|
+
t: 1659311999933;
|
|
118
|
+
s: 788293808;
|
|
119
|
+
}
|
|
120
|
+
];
|
|
121
|
+
};
|
|
122
|
+
} | {
|
|
123
|
+
code: 0;
|
|
124
|
+
method: 'subscribe';
|
|
125
|
+
result: {
|
|
126
|
+
instrument_name: 'DOT_USDT';
|
|
127
|
+
subscription: 'book.DOT_USDT.150';
|
|
128
|
+
channel: 'book.update';
|
|
129
|
+
depth: 150;
|
|
130
|
+
data: [
|
|
131
|
+
{
|
|
132
|
+
update: {
|
|
133
|
+
bids: [number, number][];
|
|
134
|
+
asks: [number, number][];
|
|
135
|
+
};
|
|
136
|
+
t: 1659312000046;
|
|
137
|
+
s: 763793123;
|
|
138
|
+
}
|
|
139
|
+
];
|
|
140
|
+
};
|
|
141
|
+
} | {
|
|
142
|
+
id: -1;
|
|
143
|
+
code: 0;
|
|
144
|
+
method: 'subscribe';
|
|
145
|
+
result: {
|
|
146
|
+
channel: 'book.update';
|
|
147
|
+
subscription: 'book.BTCUSD-PERP.50';
|
|
148
|
+
instrument_name: 'BTCUSD-PERP';
|
|
149
|
+
depth: 50;
|
|
150
|
+
data: [
|
|
151
|
+
{
|
|
152
|
+
update: {
|
|
153
|
+
asks: [string, string][];
|
|
154
|
+
bids: [string, string][];
|
|
155
|
+
};
|
|
156
|
+
t: 1653992578436;
|
|
157
|
+
tt: 1653992578428;
|
|
158
|
+
u: 72560693920;
|
|
159
|
+
pu: 72560688000;
|
|
160
|
+
cs: 380529173;
|
|
161
|
+
}
|
|
162
|
+
];
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
declare type CryptoComTickerMessage = {
|
|
166
|
+
code: 0;
|
|
167
|
+
method: 'subscribe';
|
|
168
|
+
result: {
|
|
169
|
+
instrument_name: 'GODS_USDT';
|
|
170
|
+
subscription: 'ticker.GODS_USDT';
|
|
171
|
+
channel: 'ticker';
|
|
172
|
+
data: [
|
|
173
|
+
{
|
|
174
|
+
i: 'GODS_USDT';
|
|
175
|
+
b: 0.4262;
|
|
176
|
+
k: 0.4272;
|
|
177
|
+
a: 0.4272;
|
|
178
|
+
t: 1659311999946;
|
|
179
|
+
v: 100623.01;
|
|
180
|
+
vv: 42986.1541;
|
|
181
|
+
h: 0.4624;
|
|
182
|
+
l: 0.4229;
|
|
183
|
+
c: -0.0062;
|
|
184
|
+
pc: -1.4302;
|
|
185
|
+
}
|
|
186
|
+
];
|
|
187
|
+
};
|
|
188
|
+
} | CryptoComDerivativesTickerMessage;
|
|
189
|
+
declare type CryptoComDerivativesTickerMessage = {
|
|
190
|
+
id: -1;
|
|
191
|
+
code: 0;
|
|
192
|
+
method: 'subscribe';
|
|
193
|
+
result: {
|
|
194
|
+
channel: 'ticker';
|
|
195
|
+
instrument_name: 'BTCUSD-PERP';
|
|
196
|
+
subscription: 'ticker.BTCUSD-PERP';
|
|
197
|
+
data: [
|
|
198
|
+
{
|
|
199
|
+
h: '32222.5';
|
|
200
|
+
l: '30240.0';
|
|
201
|
+
a: '31611.0';
|
|
202
|
+
c: '0.0320';
|
|
203
|
+
b: '31613.0';
|
|
204
|
+
k: '31613.5';
|
|
205
|
+
i: 'BTCUSD-PERP';
|
|
206
|
+
v: '13206.4884';
|
|
207
|
+
vv: '433945264.39';
|
|
208
|
+
oi: '318.5162';
|
|
209
|
+
t: 1653992543383;
|
|
210
|
+
}
|
|
211
|
+
];
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
declare type CryptoComIndexMessage = {
|
|
215
|
+
id: -1;
|
|
216
|
+
method: 'subscribe';
|
|
217
|
+
code: 0;
|
|
218
|
+
result: {
|
|
219
|
+
instrument_name: 'BTCUSD-INDEX';
|
|
220
|
+
subscription: 'index.BTCUSD-INDEX';
|
|
221
|
+
channel: 'index';
|
|
222
|
+
data: [{
|
|
223
|
+
v: '31601.35';
|
|
224
|
+
t: 1653992545000;
|
|
225
|
+
}];
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
declare type CryptoComMarkPriceMessage = {
|
|
229
|
+
id: 1;
|
|
230
|
+
method: 'subscribe';
|
|
231
|
+
code: 0;
|
|
232
|
+
result: {
|
|
233
|
+
instrument_name: 'BTCUSD-PERP';
|
|
234
|
+
subscription: 'mark.BTCUSD-PERP';
|
|
235
|
+
channel: 'mark';
|
|
236
|
+
data: [{
|
|
237
|
+
v: '31606.3';
|
|
238
|
+
t: 1653992543000;
|
|
239
|
+
}];
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
declare type CryptoComFundingMessage = {
|
|
243
|
+
id: -1;
|
|
244
|
+
method: 'subscribe';
|
|
245
|
+
code: 0;
|
|
246
|
+
result: {
|
|
247
|
+
instrument_name: 'BTCUSD-PERP';
|
|
248
|
+
subscription: 'funding.BTCUSD-PERP';
|
|
249
|
+
channel: 'funding';
|
|
250
|
+
data: [{
|
|
251
|
+
v: '0.00000700';
|
|
252
|
+
t: 1653992579000;
|
|
253
|
+
}];
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
export {};
|
|
257
|
+
//# sourceMappingURL=cryptocom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cryptocom.d.ts","sourceRoot":"","sources":["../../src/mappers/cryptocom.ts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AM,EAAE,WAAW,CAAA;IACnB,IAAI,EAAE,CAAC,CAAA;IACP,MAAM,EAAE;QACN,eAAe,EAAE,aAAa,CAAA;QAC9B,YAAY,EAAE,qBAAqB,CAAA;QACnC,OAAO,EAAE,SAAS,CAAA;QAClB,IAAI,EAAE,CAAC;YAAE,CAAC,EAAE,YAAY,CAAC;YAAC,CAAC,EAAE,aAAa,CAAA;SAAE,CAAC,CAAA;KAC9C,CAAA;CACF,CAAA"}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CryptoComDerivativeTickerMapper = exports.CryptoComBookTickerMapper = exports.CryptoComBookChangeMapper = exports.CryptoComTradesMapper = void 0;
|
|
4
|
+
const handy_1 = require("../handy");
|
|
5
|
+
const mapper_1 = require("./mapper");
|
|
6
|
+
class CryptoComTradesMapper {
|
|
7
|
+
constructor(_exchange) {
|
|
8
|
+
this._exchange = _exchange;
|
|
9
|
+
}
|
|
10
|
+
canHandle(message) {
|
|
11
|
+
return message.result !== undefined && message.result.channel === 'trade';
|
|
12
|
+
}
|
|
13
|
+
getFilters(symbols) {
|
|
14
|
+
symbols = (0, handy_1.upperCaseSymbols)(symbols);
|
|
15
|
+
return [
|
|
16
|
+
{
|
|
17
|
+
channel: 'trade',
|
|
18
|
+
symbols
|
|
19
|
+
}
|
|
20
|
+
];
|
|
21
|
+
}
|
|
22
|
+
*map(message, localTimestamp) {
|
|
23
|
+
message.result.data.reverse();
|
|
24
|
+
for (const item of message.result.data) {
|
|
25
|
+
const trade = {
|
|
26
|
+
type: 'trade',
|
|
27
|
+
symbol: message.result.instrument_name,
|
|
28
|
+
exchange: this._exchange,
|
|
29
|
+
id: item.d.toString(),
|
|
30
|
+
price: Number(item.p),
|
|
31
|
+
amount: Number(item.q),
|
|
32
|
+
side: item.s === 'BUY' ? 'buy' : 'sell',
|
|
33
|
+
timestamp: new Date(item.t),
|
|
34
|
+
localTimestamp
|
|
35
|
+
};
|
|
36
|
+
yield trade;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.CryptoComTradesMapper = CryptoComTradesMapper;
|
|
41
|
+
class CryptoComBookChangeMapper {
|
|
42
|
+
constructor(_exchange) {
|
|
43
|
+
this._exchange = _exchange;
|
|
44
|
+
}
|
|
45
|
+
canHandle(message) {
|
|
46
|
+
return message.result !== undefined && message.result.channel.startsWith('book');
|
|
47
|
+
}
|
|
48
|
+
getFilters(symbols) {
|
|
49
|
+
symbols = (0, handy_1.upperCaseSymbols)(symbols);
|
|
50
|
+
return [
|
|
51
|
+
{
|
|
52
|
+
channel: 'book',
|
|
53
|
+
symbols
|
|
54
|
+
}
|
|
55
|
+
];
|
|
56
|
+
}
|
|
57
|
+
*map(message, localTimestamp) {
|
|
58
|
+
if (message.result.data === undefined || message.result.data[0] === undefined) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
const bids = (message.result.channel === 'book' ? message.result.data[0].bids : message.result.data[0].update.bids) || [];
|
|
62
|
+
const asks = (message.result.channel === 'book' ? message.result.data[0].asks : message.result.data[0].update.asks) || [];
|
|
63
|
+
yield {
|
|
64
|
+
type: 'book_change',
|
|
65
|
+
symbol: message.result.instrument_name,
|
|
66
|
+
exchange: this._exchange,
|
|
67
|
+
isSnapshot: message.result.channel === 'book',
|
|
68
|
+
bids: bids.map(this._mapBookLevel),
|
|
69
|
+
asks: asks.map(this._mapBookLevel),
|
|
70
|
+
timestamp: new Date(message.result.data[0].t),
|
|
71
|
+
localTimestamp
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
_mapBookLevel(level) {
|
|
75
|
+
return { price: Number(level[0]), amount: Number(level[1]) };
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
exports.CryptoComBookChangeMapper = CryptoComBookChangeMapper;
|
|
79
|
+
class CryptoComBookTickerMapper {
|
|
80
|
+
constructor(_exchange) {
|
|
81
|
+
this._exchange = _exchange;
|
|
82
|
+
}
|
|
83
|
+
canHandle(message) {
|
|
84
|
+
return message.result !== undefined && message.result.channel === 'ticker';
|
|
85
|
+
}
|
|
86
|
+
getFilters(symbols) {
|
|
87
|
+
symbols = (0, handy_1.upperCaseSymbols)(symbols);
|
|
88
|
+
return [
|
|
89
|
+
{
|
|
90
|
+
channel: 'ticker',
|
|
91
|
+
symbols
|
|
92
|
+
}
|
|
93
|
+
];
|
|
94
|
+
}
|
|
95
|
+
*map(message, localTimestamp) {
|
|
96
|
+
for (const item of message.result.data) {
|
|
97
|
+
const bookTicker = {
|
|
98
|
+
type: 'book_ticker',
|
|
99
|
+
symbol: message.result.instrument_name,
|
|
100
|
+
exchange: this._exchange,
|
|
101
|
+
askAmount: undefined,
|
|
102
|
+
askPrice: item.k !== undefined && item.k !== null ? Number(item.k) : undefined,
|
|
103
|
+
bidPrice: item.b !== undefined && item.b !== null ? Number(item.b) : undefined,
|
|
104
|
+
bidAmount: undefined,
|
|
105
|
+
timestamp: new Date(item.t),
|
|
106
|
+
localTimestamp: localTimestamp
|
|
107
|
+
};
|
|
108
|
+
yield bookTicker;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
exports.CryptoComBookTickerMapper = CryptoComBookTickerMapper;
|
|
113
|
+
class CryptoComDerivativeTickerMapper {
|
|
114
|
+
constructor(exchange) {
|
|
115
|
+
this.exchange = exchange;
|
|
116
|
+
this.pendingTickerInfoHelper = new mapper_1.PendingTickerInfoHelper();
|
|
117
|
+
this._indexPrices = new Map();
|
|
118
|
+
}
|
|
119
|
+
canHandle(message) {
|
|
120
|
+
if (message.result === undefined) {
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
return (message.result.channel === 'ticker' ||
|
|
124
|
+
message.result.channel === 'index' ||
|
|
125
|
+
message.result.channel === 'mark' ||
|
|
126
|
+
message.result.channel === 'funding');
|
|
127
|
+
}
|
|
128
|
+
getFilters(symbols) {
|
|
129
|
+
symbols = (0, handy_1.upperCaseSymbols)(symbols);
|
|
130
|
+
let indexes = [];
|
|
131
|
+
if (symbols !== undefined) {
|
|
132
|
+
indexes = [...new Set(symbols.map((s) => `${s.split('-')[0]}-INDEX`))];
|
|
133
|
+
}
|
|
134
|
+
const filters = [
|
|
135
|
+
{
|
|
136
|
+
channel: 'ticker',
|
|
137
|
+
symbols
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
channel: 'index',
|
|
141
|
+
symbols: indexes
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
channel: 'mark',
|
|
145
|
+
symbols
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
channel: 'funding',
|
|
149
|
+
symbols
|
|
150
|
+
}
|
|
151
|
+
];
|
|
152
|
+
return filters;
|
|
153
|
+
}
|
|
154
|
+
*map(message, localTimestamp) {
|
|
155
|
+
if (message.result.channel === 'index') {
|
|
156
|
+
this._indexPrices.set(message.result.instrument_name.split('-')[0], Number(message.result.data[0].v));
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
const pendingTickerInfo = this.pendingTickerInfoHelper.getPendingTickerInfo(message.result.instrument_name, this.exchange);
|
|
160
|
+
const lastIndexPrice = this._indexPrices.get(message.result.instrument_name.split('-')[0]);
|
|
161
|
+
if (lastIndexPrice !== undefined) {
|
|
162
|
+
pendingTickerInfo.updateIndexPrice(lastIndexPrice);
|
|
163
|
+
}
|
|
164
|
+
if (message.result.channel === 'ticker') {
|
|
165
|
+
if (message.result.data[0].a !== null && message.result.data[0].a !== undefined) {
|
|
166
|
+
pendingTickerInfo.updateLastPrice(Number(message.result.data[0].a));
|
|
167
|
+
}
|
|
168
|
+
if (message.result.data[0].oi !== null && message.result.data[0].oi !== undefined) {
|
|
169
|
+
pendingTickerInfo.updateOpenInterest(Number(message.result.data[0].oi));
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
if (message.result.channel === 'mark') {
|
|
173
|
+
if (message.result.data[0].v !== null && message.result.data[0].v !== undefined) {
|
|
174
|
+
pendingTickerInfo.updateMarkPrice(Number(message.result.data[0].v));
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
if (message.result.channel === 'funding') {
|
|
178
|
+
if (message.result.data[0].v !== null && message.result.data[0].v !== undefined) {
|
|
179
|
+
pendingTickerInfo.updateFundingRate(Number(message.result.data[0].v));
|
|
180
|
+
const nextFundingTimestamp = new Date(message.result.data[0].t);
|
|
181
|
+
nextFundingTimestamp.setUTCHours(nextFundingTimestamp.getUTCHours() + 1);
|
|
182
|
+
nextFundingTimestamp.setUTCMinutes(0, 0, 0);
|
|
183
|
+
pendingTickerInfo.updateFundingTimestamp(nextFundingTimestamp);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
pendingTickerInfo.updateTimestamp(new Date(message.result.data[0].t));
|
|
187
|
+
if (pendingTickerInfo.hasChanged()) {
|
|
188
|
+
yield pendingTickerInfo.getSnapshot(localTimestamp);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
exports.CryptoComDerivativeTickerMapper = CryptoComDerivativeTickerMapper;
|
|
193
|
+
//# sourceMappingURL=cryptocom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cryptocom.js","sourceRoot":"","sources":["../../src/mappers/cryptocom.ts"],"names":[],"mappings":";;;AAAA,oCAA2C;AAE3C,qCAA0D;AAE1D,MAAa,qBAAqB;IAChC,YAA6B,SAAmB;QAAnB,cAAS,GAAT,SAAS,CAAU;IAAG,CAAC;IACpD,SAAS,CAAC,OAA8B;QACtC,OAAO,OAAO,CAAC,MAAM,KAAK,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,OAAO,KAAK,OAAO,CAAA;IAC3E,CAAC;IAED,UAAU,CAAC,OAAkB;QAC3B,OAAO,GAAG,IAAA,wBAAgB,EAAC,OAAO,CAAC,CAAA;QAEnC,OAAO;YACL;gBACE,OAAO,EAAE,OAAO;gBAChB,OAA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AAC,CAAA;QAErE,IAAI,iBAAiB,CAAC,UAAU,EAAE,EAAE;YAClC,MAAM,iBAAiB,CAAC,WAAW,CAAC,cAAc,CAAC,CAAA;SACpD;IACH,CAAC;CACF;AA/FD,0EA+FC"}
|
package/dist/mappers/huobi.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export declare class HuobiBookChangeMapper implements Mapper<'huobi' | 'huobi-dm
|
|
|
22
22
|
map(message: HuobiDepthDataMessage, localTimestamp: Date): Generator<{
|
|
23
23
|
readonly type: "book_change";
|
|
24
24
|
readonly symbol: string;
|
|
25
|
-
readonly exchange: "bitmex" | "deribit" | "binance-futures" | "binance-delivery" | "binance-options" | "binance" | "ftx" | "okex-futures" | "okex-options" | "okex-swap" | "okex" | "huobi-dm" | "huobi-dm-swap" | "huobi-dm-linear-swap" | "huobi" | "bitfinex-derivatives" | "bitfinex" | "coinbase" | "cryptofacilities" | "kraken" | "bitstamp" | "gemini" | "poloniex" | "bybit" | "bybit-spot" | "phemex" | "delta" | "ftx-us" | "binance-us" | "gate-io-futures" | "gate-io" | "okcoin" | "bitflyer" | "hitbtc" | "coinflex" | "binance-jersey" | "binance-dex" | "upbit" | "ascendex" | "dydx" | "serum" | "mango" | "huobi-dm-options" | "star-atlas";
|
|
25
|
+
readonly exchange: "bitmex" | "deribit" | "binance-futures" | "binance-delivery" | "binance-options" | "binance" | "ftx" | "okex-futures" | "okex-options" | "okex-swap" | "okex" | "huobi-dm" | "huobi-dm-swap" | "huobi-dm-linear-swap" | "huobi" | "bitfinex-derivatives" | "bitfinex" | "coinbase" | "cryptofacilities" | "kraken" | "bitstamp" | "gemini" | "poloniex" | "bybit" | "bybit-spot" | "phemex" | "delta" | "ftx-us" | "binance-us" | "gate-io-futures" | "gate-io" | "okcoin" | "bitflyer" | "hitbtc" | "coinflex" | "binance-jersey" | "binance-dex" | "upbit" | "ascendex" | "dydx" | "serum" | "mango" | "huobi-dm-options" | "star-atlas" | "crypto-com" | "crypto-com-derivatives";
|
|
26
26
|
readonly isSnapshot: boolean;
|
|
27
27
|
readonly bids: {
|
|
28
28
|
price: number;
|
|
@@ -51,7 +51,7 @@ export declare class HuobiMBPBookChangeMapper implements Mapper<'huobi', BookCha
|
|
|
51
51
|
map(message: HuobiMBPDataMessage | HuobiMBPSnapshot, localTimestamp: Date): Generator<{
|
|
52
52
|
readonly type: "book_change";
|
|
53
53
|
readonly symbol: string;
|
|
54
|
-
readonly exchange: "bitmex" | "deribit" | "binance-futures" | "binance-delivery" | "binance-options" | "binance" | "ftx" | "okex-futures" | "okex-options" | "okex-swap" | "okex" | "huobi-dm" | "huobi-dm-swap" | "huobi-dm-linear-swap" | "huobi" | "bitfinex-derivatives" | "bitfinex" | "coinbase" | "cryptofacilities" | "kraken" | "bitstamp" | "gemini" | "poloniex" | "bybit" | "bybit-spot" | "phemex" | "delta" | "ftx-us" | "binance-us" | "gate-io-futures" | "gate-io" | "okcoin" | "bitflyer" | "hitbtc" | "coinflex" | "binance-jersey" | "binance-dex" | "upbit" | "ascendex" | "dydx" | "serum" | "mango" | "huobi-dm-options" | "star-atlas";
|
|
54
|
+
readonly exchange: "bitmex" | "deribit" | "binance-futures" | "binance-delivery" | "binance-options" | "binance" | "ftx" | "okex-futures" | "okex-options" | "okex-swap" | "okex" | "huobi-dm" | "huobi-dm-swap" | "huobi-dm-linear-swap" | "huobi" | "bitfinex-derivatives" | "bitfinex" | "coinbase" | "cryptofacilities" | "kraken" | "bitstamp" | "gemini" | "poloniex" | "bybit" | "bybit-spot" | "phemex" | "delta" | "ftx-us" | "binance-us" | "gate-io-futures" | "gate-io" | "okcoin" | "bitflyer" | "hitbtc" | "coinflex" | "binance-jersey" | "binance-dex" | "upbit" | "ascendex" | "dydx" | "serum" | "mango" | "huobi-dm-options" | "star-atlas" | "crypto-com" | "crypto-com-derivatives";
|
|
55
55
|
readonly isSnapshot: false;
|
|
56
56
|
readonly bids: {
|
|
57
57
|
price: number;
|
|
@@ -66,7 +66,7 @@ export declare class HuobiMBPBookChangeMapper implements Mapper<'huobi', BookCha
|
|
|
66
66
|
} | {
|
|
67
67
|
readonly type: "book_change";
|
|
68
68
|
readonly symbol: string;
|
|
69
|
-
readonly exchange: "bitmex" | "deribit" | "binance-futures" | "binance-delivery" | "binance-options" | "binance" | "ftx" | "okex-futures" | "okex-options" | "okex-swap" | "okex" | "huobi-dm" | "huobi-dm-swap" | "huobi-dm-linear-swap" | "huobi" | "bitfinex-derivatives" | "bitfinex" | "coinbase" | "cryptofacilities" | "kraken" | "bitstamp" | "gemini" | "poloniex" | "bybit" | "bybit-spot" | "phemex" | "delta" | "ftx-us" | "binance-us" | "gate-io-futures" | "gate-io" | "okcoin" | "bitflyer" | "hitbtc" | "coinflex" | "binance-jersey" | "binance-dex" | "upbit" | "ascendex" | "dydx" | "serum" | "mango" | "huobi-dm-options" | "star-atlas";
|
|
69
|
+
readonly exchange: "bitmex" | "deribit" | "binance-futures" | "binance-delivery" | "binance-options" | "binance" | "ftx" | "okex-futures" | "okex-options" | "okex-swap" | "okex" | "huobi-dm" | "huobi-dm-swap" | "huobi-dm-linear-swap" | "huobi" | "bitfinex-derivatives" | "bitfinex" | "coinbase" | "cryptofacilities" | "kraken" | "bitstamp" | "gemini" | "poloniex" | "bybit" | "bybit-spot" | "phemex" | "delta" | "ftx-us" | "binance-us" | "gate-io-futures" | "gate-io" | "okcoin" | "bitflyer" | "hitbtc" | "coinflex" | "binance-jersey" | "binance-dex" | "upbit" | "ascendex" | "dydx" | "serum" | "mango" | "huobi-dm-options" | "star-atlas" | "crypto-com" | "crypto-com-derivatives";
|
|
70
70
|
readonly isSnapshot: true;
|
|
71
71
|
readonly bids: {
|
|
72
72
|
price: number;
|