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