serverHTTP API Reference

Historical market data feeds, exchange metadata and more

circle-info

Base API Endpoint: https://api.tardis.dev/v1

/data-feeds/:exchange

GET https://api.tardis.dev/v1/data-feeds/:exchange

Provides historical cryptocurrency market data feed for requested exchange in minute by minute slices in new line delimited JSON format (NDJSON) with addition of local timestamp at the beginning of each line - in ISO 8601 format. JSON message in each line is a data message in exchange-native format.

Empty lines in response are being used as markers for disconnect events that occurred when collecting the data.

Requests must include Accept-Encoding: gzip header. Responses are gzip compressed (content-encoding: gzip) and each one contains one minute of historical market data starting from requested date which is from date plus minute offset param.

Parallel request to this endpoint are supported and can speed up overall data fetching process substantially, but using more than ~60 parallel requests doesn't bring speed benefits. In order to achieve best performance HTTP 1.1 protocol is recommended, in our testing HTTP 2 was noticeable slower.

As this is relatively low level API you may also want to try official client libraries that are built on top of it and provide more convenient way of consuming historical market data like requesting whole date ranges of data at once instead of minute by minute pagination or providing normalized data format.

Path Parameters

Name
Type
Description

exchange*

string

one of https://api.tardis.dev/v1/exchanges (field id)

Query Parameters

Name
Type
Description

from*

string

requested UTC start date of historical market data feed (e.g.: 2019-04-05 or 2019-04-05T01:02:00.000Z)

offset

number

minute offset that together with from date specifies exact minute slice of historical data that will be returned (e.g.: from date: 2019-04-05 with offset: 2 will provide historical data between 2019-04-05T00:02:00.000Z and 2019-04-05T00:03:00.000Z). Minute boundaries are based on localTimestamp (the time we received the message), not on exchange event timestamps. An empty response for a given offset is normal and means no data was recorded during that minute.

filters

string

URL encoded JSON string with{channel:string, symbols?: string[]}[] format with optional historical market data filters, e.g.: [{"channel":"trade", "symbols":["XBTUSD"]}]

When symbols array is empty or omitted, data for all active symbols is returned.

Symbols are case-sensitive and must match the format returned by the /exchanges/:exchange API. For example, Binance uses lowercase symbols (btcusdt), not uppercase.

In order to get the list of allowed channels and symbols for each exchange usehttps://api.tardis.dev/v1/exchanges/:exchange API (documented below).

Subscriptions with limited scope (e.g., perpetuals data plan) must provide explicit symbols in filters. Omitting symbols on a limited-scope plan will return an entitlement error.

Headers

Name
Type
Description

Authorization

string

For authenticated requests provide Authorization header with value: 'Bearer YOUR_API_KEY'. Without API key historical data feeds for the first day of each month are available.

circle-info

Lines in the response are ordered by capture time. When multiple events share the same millisecond exchange timestamp, use line order as the tie-breaker — see event ordering FAQ.

circle-info
circle-info

See downloadable CSV files documentation and related datasets API if you'd like to access historical tick-level trades, order book snapshots, incremental order book L2 updates, options chains, quotes, derivative tickers and liquidations datasets in daily intervals split by exchange, data type and symbol. It may be faster and more native to your toolkit to access historical data this way.

circle-info

See also Python client library with built-in data caching that provides more convenient access to tick-level historical market data — it returns data for the whole time periods in contrast to HTTP API where single call returns data for single minute time period.

Sample requests

Full BitMEX data feed from 2019-04-01T00:02:00.000Z to 2019-04-01T00:03:00.000Z
BitMEX trades for all instruments from 2019-05-01T00:00:00.000Z to 2019-05-01T00:01:00.000Z
BitMEX trades for XBTUSD from 2019-06-01T00:00:00.000Z to 2019-06-01T00:01:00.000Z
Full Deribit data feed from 2019-06-01T00:10:00.000Z to 2019-06-01T00:11:00.000Z

/exchanges

GET https://api.tardis.dev/v1/exchanges

Gets the list of all supported exchanges that historical market data is available for.

Sample request

List of all supported exchanges that historical market data is available for

/exchanges/:exchange

GET https://api.tardis.dev/v1/exchanges/:exchange

Gets the exchanges details: available symbols, availability dates, available channels, CSV datasets info, incidents etc.

Path Parameters

Name
Type
Description

exchange*

string

one of https://api.tardis.dev/v1/exchanges (field id)

Sample request

BitMEX exchange details

/api-key-info

GET https://api.tardis.dev/v1/api-key-info

Given API_KEY provided in request header provides information about what historical data (exchanges, date ranges, symbols) is available for given API_KEY.

Headers

Name
Type
Description

Authorization*

string

Authorization header with value: 'Bearer YOUR_API_KEY'

Last updated