# tardis-client

[![PyPi](https://img.shields.io/pypi/v/tardis-client.svg)](https://pypi.org/project/tardis-client/)
[![Python](https://img.shields.io/pypi/pyversions/tardis-client.svg)](https://pypi.org/project/tardis-client/)
<a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>

`tardis-client` is deprecated and frozen.

This package has been replaced by [`tardis-dev`](https://pypi.org/project/tardis-dev/), the unified Python package for replay, dataset downloads, exchange metadata, and cache helpers.

This `1.4.2` release does not introduce new features. Its purpose is to point existing `tardis-client` users to the migration path.

## Migrate To `tardis-dev`

Migration notice:

- https://docs.tardis.dev/python-client/migration-notice

Install commands:

```bash
pip uninstall tardis-client
pip install tardis-dev
```

## Old To New

### Replay

Old:

```python
from tardis_client import TardisClient, Channel

client = TardisClient(api_key="YOUR_API_KEY")

async for item in client.replay(
    exchange="bitmex",
    from_date="2019-06-01",
    to_date="2019-06-02",
    filters=[Channel("trade", ["XBTUSD"])],
):
    print(item)
```

New:

```python
from tardis_dev import Channel, replay

async for item in replay(
    exchange="bitmex",
    from_date="2019-06-01",
    to_date="2019-06-02",
    filters=[Channel("trade", ["XBTUSD"])],
    api_key="YOUR_API_KEY",
):
    print(item)
```

### Cache Cleanup

Old:

```python
from tardis_client import TardisClient

client = TardisClient()
client.clear_cache()
```

New:

```python
from tardis_dev import clear_cache

clear_cache()
```

### Dataset Downloads

The replacement package also includes dataset downloads directly from the top level:

```python
from tardis_dev import download_datasets

download_datasets(
    exchange="deribit",
    data_types=["trades"],
    symbols=["BTC-PERPETUAL"],
    from_date="2024-01-01",
    to_date="2024-01-02",
    api_key="YOUR_API_KEY",
)
```

## Support Status

- no new features will be added to `tardis-client`
- new Python development continues in `tardis-dev`
- future migration guidance will live in the docs, not in this package

## License

MPL-2.0
