Skip to main content

tardis-dev

PyPi Python Code style: black


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



  • 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


Documentation

See official docs



Examples

Replay historical market data

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"])],
    ):
        print(local_timestamp, message)


asyncio.run(main())

Download CSV datasets

from tardis_dev import download_datasets


download_datasets(
    exchange="binance",
    data_types=["trades", "incremental_book_L2"],
    symbols=["BTCUSDT"],
    from_date="2024-03-01",
    to_date="2024-03-02",
    api_key="YOUR_API_KEY",
)

Migration from tardis-client

This package is the v3 API. Existing tardis-client and tardis_dev.datasets.download() users should migrate to the new top-level functions:

  • replay: TardisClient().replay(...) -> replay(...)
  • datasets: from tardis_dev import datasets; datasets.download(...) -> from tardis_dev import download_datasets
  • cache cleanup: tardis_client.clear_cache() -> clear_cache()

See Migration Notice for the full migration guide.



See the tardis-dev docs for more examples.

Metadata

Release files for tardis-dev 5.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tardis-dev 5.1.1
File Size Uploaded Provenance Actions
tardis_dev-5.1.1.tar.gz 20.5 kB Without provenance Details for tardis_dev-5.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tardis-dev 5.1.1
File Interpreter ABI Platform Actions
tardis_dev-5.1.1-py3-none-any.whl Python 3 none any Details for tardis_dev-5.1.1-py3-none-any.whl

Total release size: 43.7 kB

Release files / tardis_dev-5.1.1.tar.gz

Download URL tardis_dev-5.1.1.tar.gz
Size 20.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f1a54aaa815989db9934cc47aba106e0eeb2804bcfe4fc3f5e1f9f604215e040
BLAKE2b-256 checksum
How to use checksums
42fdb3c1263eeec3b3e05e773198ad1d5f09901950c1cb1f16fcb05710b068b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / tardis_dev-5.1.1-py3-none-any.whl

Download URL tardis_dev-5.1.1-py3-none-any.whl
Size 23.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf8268dfd6fb54bd17a8845fb142d704e64f20663568a1be65bcf2213a78b0bf
BLAKE2b-256 checksum
How to use checksums
19dccce9a6b5d222681759a23bcfe180e7f62b988fab9a796e48371ed6ed7b64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for tardis-dev 5.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

5.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page