Links

HTTP API Reference

HTTP based API providing historical market data feeds, supported exchanges details and more
Base API Endpoint: https://api.tardis.dev/v1
get
https://api.tardis.dev/v1
/data-feeds/:exchange
/data-feeds/:exchange
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 the historical data this way.
Python
Node.js
cURL
import json
import requests
def get_data_feeds():
filters = [
{"channel": "trade", "symbols": ["XBTUSD", "ETHUSD"]},
{"channel": "orderBookL2", "symbols": ["XBTUSD", "ETHUSD"]},
]
qs_params = {"from": "2019-07-01", "offset": 3, "filters": json.dumps(filters)}
headers = {"Authorization": "Bearer YOUR_API_KEY"}
url = "https://api.tardis.dev/v1/data-feeds/bitmex"
response = requests.get(url, headers=headers, params=qs_params, stream=True)
for line in response.iter_lines():
# empty lines in response are being used as markers
# for disconnect events that occurred when collecting the data
if len(line) <= 1:
continue
parts = line.decode("utf-8").split(" ")
local_timestamp = parts[0]
message = json.loads(parts[1])
# local_timestamp string marks message arrival timestamp
# message is a message dict as provided by exchange real-time stream
print(local_timestamp, message)
get_data_feeds()
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.
const fetch = require('node-fetch')
const split2 = require('split2')
const serialize = (options) => {
return encodeURIComponent(JSON.stringify(options))
}
async function getDataFeeds() {
const filters = serialize([
{
channel: 'trade',
symbols: ['XBTUSD', 'ETHUSD']
},
{
channel: 'orderBookL2',
symbols: ['XBTUSD', 'ETHUSD']
}
])
const base_url = 'https://api.tardis.dev/v1/data-feeds/bitmex'
const url = `${base_url}?from=2019-07-01&offset=3&filters=${filters}`
const response = await fetch(url)
const lines = response.body.pipe(split2())
for await (const line of lines) {
// empty lines in response are being used as markers
// for disconnect events that occurred when collecting the data
if (line.length === 0) {
continue
}
const parts = line.split(' ')
const localTimestamp = parts[0]
const message = JSON.parse(parts[1])
// localTimestamp string marks message arrival timestamp
// message is a message dict as provided by exchange real-time stream
console.log(localTimestamp, message)
}
}
getDataFeeds()
See also Node.js 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.
curl -g 'https://api.tardis.dev/v1/data-feeds/bitmex?from=2019-07-01&filters=[{"channel":"trade","symbols":["XBTUSD"]}]&offset=3'

Sample requests

https://api.tardis.dev/v1/data-feeds/bitmex?from=2019-04-1&offset=2
api.tardis.dev
Full BitMEX data feed from 2019-04-01T00:02:00.000Z to 2019-04-01T00:03:00.000Z
https://api.tardis.dev/v1/data-feeds/bitmex?from=2019-05-1&filters=[{%22channel%22:%22trade%22}]
api.tardis.dev
BitMEX trades for all instruments from 2019-05-01T00:00:00.000Z to 2019-05-01T00:01:00.000Z
https://api.tardis.dev/v1/data-feeds/deribit?from=2019-06-1&offset=10
api.tardis.dev
Full Deribit data feed from 2019-06-01T00:10:00.000Z to 2019-06-01T00:11:00.000Z
get
https://api.tardis.dev/v1
/exchanges
/exchanges

Sample request

https://api.tardis.dev/v1/exchanges
api.tardis.dev
List of all supported exchanges that historical market data is available for
get
https://api.tardis.dev/v1
/exchanges/:exchange
/exchanges/:exchange

Sample request

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