Replaying Historical Data
Replaying historical market data in exchange-native format with the tardis-dev Python package
replay(...)
replay(...)import asyncio
from tardis_dev import Channel, replay
async def main():
async for local_timestamp, message in replay(
exchange="binance",
from_date="2024-03-01",
to_date="2024-03-02",
filters=[
Channel("trade", ["btcusdt"]),
Channel("depth", ["btcusdt"]),
],
api_key="YOUR_API_KEY",
):
print(local_timestamp, message)
asyncio.run(main())replay arguments
name
type
default
description
Channel(name, symbols=None)
Channel(name, symbols=None)name
type
description
type of messages returned by replay
replaysample message
Last updated
Was this helpful?