tardis-dev built-in normalizers

node v12.22.12
version: 1.0.0
endpointsharetweet
const { streamNormalized, normalizeTrades, normalizeBookChanges, normalizeDerivativeTickers } = require('tardis-dev') async function run() { // or replayNormalized to replay normalized historical data const messages = streamNormalized( { exchange: 'deribit', symbols: ['BTC-PERPETUAL'] }, normalizeTrades, normalizeBookChanges, normalizeDerivativeTickers ) for await (const message of messages) { if (message.type === 'book_change') { console.log('book_change', message) // process normalized book change } if (message.type === 'trade') { console.log('trade', message) // process normalized trade } if (message.type === 'derivative_ticker') { console.log('derivative_ticker', message) // process normalized derivative_ticker } } } run()
Loading…

no comments

    sign in to comment