pythonPython Client

Install, configure and use tardis-client and tardis-dev Python packages

There are two Python packages for different workflows:

Package
Use for
Install

tardis-dev

CSV dataset downloads (datasets.download())

pip install tardis-dev

tardis-client

Raw data replay (TardisClient.replay())

pip install tardis-client

Python tardis-client GitHub repository

Python tardis-clientarrow-up-right provides simple and intuitive way of accessing Tardis.dev historical market data API. Detailed and most up to date documentation & installation instructions can be found on GitHubarrow-up-right, but the gist of it is that you provide exchange name, historical date ranges and optional filters (channel names are the same as exchange's channels in real-time WebSocket feeds, same for symbols) and you receive an Async Generatorarrow-up-right that provides market data message for each iteration. Local disk-based caching is being done transparently in the background. Cached data is stored on disk in compressed form (GZIP) and decompressed on demand when reading the data. See example snippet below that shows how to replay some of the historical BitMEX data.

circle-info

Requires Python 3.7.0+.

When symbols list is empty or omitted in filters, data for all active symbols is returned.

circle-info

The replay API fetches data one minute at a time. Avoid blocking the async loop with slow I/O (e.g., synchronous file writes) inside the iteration — use async I/O or buffer writes to prevent slowdowns and timeouts.

Examples

BitMEX historical trades and order book data replay

Saving Deribit historical index data to CSV file

Last updated