tardis-machine
Advanced tools
Comparing version 3.8.0 to 3.9.0
@@ -43,3 +43,3 @@ "use strict"; | ||
// not 100% sure that's necessary since we're returning ndjson in fact, not json | ||
res.setHeader('Content-Type', 'application/json'); | ||
res.setHeader('Content-Type', 'application/x-json-stream'); | ||
let buffers = []; | ||
@@ -46,0 +46,0 @@ let totalMessagesCount = 0; |
@@ -40,3 +40,3 @@ "use strict"; | ||
const BATCH_SIZE = 32; | ||
res.setHeader('Content-Type', 'application/json'); | ||
res.setHeader('Content-Type', 'application/x-json-stream'); | ||
let buffers = []; | ||
@@ -43,0 +43,0 @@ let totalMessagesCount = 0; |
@@ -455,2 +455,18 @@ "use strict"; | ||
}; | ||
const kucoinMapper = { | ||
canHandle: (message) => { | ||
return message.type === 'subscribe'; | ||
}, | ||
map: (message) => { | ||
// "topic": "/market/ticker:BTC-USDT,ETH-USDT", | ||
const parts = message.topic.split(':'); | ||
const symbols = parts[1].split(','); | ||
return [ | ||
{ | ||
channel: parts[0].substring(1), | ||
symbols | ||
} | ||
]; | ||
} | ||
}; | ||
exports.subscriptionsMappers = { | ||
@@ -502,4 +518,5 @@ bitmex: bitmexMapper, | ||
'crypto-com': cryptoComMapper, | ||
'crypto-com-derivatives': cryptoComMapper | ||
'crypto-com-derivatives': cryptoComMapper, | ||
kucoin: kucoinMapper | ||
}; | ||
//# sourceMappingURL=subscriptionsmappers.js.map |
{ | ||
"name": "tardis-machine", | ||
"version": "3.8.0", | ||
"version": "3.9.0", | ||
"engines": { | ||
@@ -62,3 +62,3 @@ "node": ">=12" | ||
"is-docker": "^2.2.1", | ||
"tardis-dev": "^13.5.0", | ||
"tardis-dev": "^13.6.1", | ||
"uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.10.0", | ||
@@ -65,0 +65,0 @@ "yargs": "^17.5.1" |
@@ -49,3 +49,3 @@ import { once } from 'events' | ||
// not 100% sure that's necessary since we're returning ndjson in fact, not json | ||
res.setHeader('Content-Type', 'application/json') | ||
res.setHeader('Content-Type', 'application/x-json-stream') | ||
@@ -52,0 +52,0 @@ let buffers: Buffer[] = [] |
@@ -46,3 +46,3 @@ import { once } from 'events' | ||
res.setHeader('Content-Type', 'application/json') | ||
res.setHeader('Content-Type', 'application/x-json-stream') | ||
@@ -49,0 +49,0 @@ let buffers: string[] = [] |
@@ -527,2 +527,21 @@ import { Exchange, Filter } from 'tardis-dev' | ||
const kucoinMapper: SubscriptionMapper = { | ||
canHandle: (message: any) => { | ||
return message.type === 'subscribe' | ||
}, | ||
map: (message: any) => { | ||
// "topic": "/market/ticker:BTC-USDT,ETH-USDT", | ||
const parts = message.topic.split(':') as string[] | ||
const symbols = parts[1].split(',') | ||
return [ | ||
{ | ||
channel: parts[0].substring(1), | ||
symbols | ||
} | ||
] | ||
} | ||
} | ||
export const subscriptionsMappers: { [key in Exchange]: SubscriptionMapper } = { | ||
@@ -574,3 +593,4 @@ bitmex: bitmexMapper, | ||
'crypto-com': cryptoComMapper, | ||
'crypto-com-derivatives': cryptoComMapper | ||
'crypto-com-derivatives': cryptoComMapper, | ||
kucoin: kucoinMapper | ||
} | ||
@@ -577,0 +597,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
183251
3181
Updatedtardis-dev@^13.6.1