Replaying Historical Data
Replaying historical market data in exchange-native and normalized formats
replay(options)
replay(options)import { replay } from 'tardis-dev'
const messages = replay({
exchange: 'binance',
filters: [
{ channel: 'trade', symbols: ['btcusdt'] },
{ channel: 'depth', symbols: ['btcusdt'] }
],
from: '2024-03-01',
to: '2024-03-02'
})
for await (const { localTimestamp, message } of messages) {
console.log(localTimestamp, message)
}replay options
name
type
default
description
type of messages provided by replay iterator (for await ...of)
replay iterator (for await ...of)sample message
replayNormalized(options, ...normalizers)
replayNormalized(options, ...normalizers)replay normalized options
name
type
default
description
Built-in normalizers
types of messages provided by replayNormalized iterator (for await ...of)
replayNormalized iterator (for await ...of)sample message
Last updated
Was this helpful?