Python client for tardis.dev - historical tick-level cryptocurrency market data replay API.
Actively maintained. Last release 5 days ago, commits in 9 of the last 26 weeks. A safe choice.
pip install tardis-devtardis-dev
Python tardis-dev package provides convenient access to tick-level historical cryptocurrency market data in exchange-native format. It focuses on two primary workflows: replaying historical market data and downloading historical market data as CSV files. If you need normalized replay or real-time streaming, use the Node.js client or Tardis Machine.
replay() accepts ISO date strings or Python datetime values. Naive datetimes are treated as UTC.
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())
Features
- historical tick-level market data replay backed by Tardis.dev HTTP API
- support for many cryptocurrency exchanges — see docs.tardis.dev for the full list
Installation
Requires Python 3.11+ installed.
pip install tardis-dev
Development
This repository uses uv for dependency management, locking, builds, and release automation.
uv sync --locked --group dev
uv run black --check tardis_dev tests
uv run pytest tests/ -q -m "not live"
uv build --no-sources