tardis-dev stream market data normalized
const { streamNormalized, normalizeTrades, normalizeBookChanges } = require('tardis-dev')
async function run() {
const messages = streamNormalized(
{
exchange: 'bitmex',
symbols: ['XBTUSD', 'ETHUSD']
},
normalizeTrades,
normalizeBookChanges
)
for await (const message of messages) {
console.log(`${message.symbol} ${message.type} ${message.timestamp.toISOString()}`)
}
}
run()
no comments