tardis-dev stream market data
const { stream } = require('tardis-dev')
async function run() {
const messages = stream({
exchange: 'bitmex',
filters: [{ channel: 'trade', symbols: ['XBTUSD'] }, { channel: 'orderBookL2', symbols: ['XBTUSD'] }]
})
for await (const {message, localTimestamp} of messages) {
console.log(`${localTimestamp.toISOString()} ${message.action} ${message.table}`)
}
}
run()
no comments