Instruments Metadata API

API providing useful instrument metadata (tick sizes, contract multipliers, normalised base and quote currencies, expiration dates etc.)

Instruments metadata API is available only for active pro and business subscriptions.

Authorization

Please provide 'Authorization' header with value: 'Bearer YOUR_API_KEY'.

Single instrument info endpoint

Returns instrument info for provided exchange and symbol.

endpoint URL format

https://api.tardis.dev/v1/instruments/:exchange/:symbol_id

example URLs

response format

changes info returned by the API is meant to be accurate and complete only for contractMultiplier values (we monitor exchanges announcements for that), rest of the changes are done on best effort basis and not always complete.

{
	id: string // symbol id
	datasetId: string // id used for CSV datasets downloads
	exchange: string // exchange id
	baseCurrency: string // normalized, so for example bitmex XBTUSD has base currency set to BTC not XBT
	quoteCurrency: string // normalized, so for example bitfinex BTCUST has quote currency set to USDT, not UST
	type: 'spot' | 'perpetual' | 'future' | 'option'
	active: boolean // indicates if the instrument can currently be traded.
	availableSince: string, // date in ISO format
	availableTo: string | undefined, // date in ISO format
	expiry: string | undefined // in ISO format, only for futures and options 
	priceIncrement: number  // price tick size, price precision can be calculated from it
	amountIncrement: number  // amount tick size, amount/size precision can be calculated from it
	minTradeAmount: number // min order size
	margin: boolean | undefined // set to true for margin enabled spot currency pairs, only available for spot symbols
	makerFee: number // consider it  as illustrative only, as it depends in practice on account traded volume levels, different categories, VIP levels, owning exchange currency etc
	takerFee: number // consider it  as illustrative only, as it depends in practice on account traded volume levels, different categories, VIP levels, owning exchange currency etc
	inverse: boolean | undefined // only for derivatives
	contractType: "move" | "linear_future" | "inverse_future" | "quanto_future" | "linear_perpetual" | "inverse_perpetual" | "quanto_perpetual" | "put_option" | "call_option" | "turbo_put_option" | "turbo_call_option" | "spread" | "interest_rate_swap" | "repo" | "index" // only for derivatives, detailed contract type
	contractMultiplier: number | undefined // only for derivatives
	quanto: boolean | undefined // set to true for quanto instruments, otherwise undefined
  	settlementCurrency: string | undefined // settlement currency, only for quanto instruments as it's different base/quote currency
	strikePrice: number | undefined // strike price, only for options
        optionType: 'call' | 'put' // option type, only for options
	
	changes: undefined | {
		until: string // date in ISO format
		priceIncrement: number | undefined
		amountIncrement: number | undefined
		contractMultiplier: number | undefined
	}[]
} 

sample response

{
  "id": "XBTUSD",
  "datasetId": "XBTUSD",
  "exchange": "bitmex",
  "baseCurrency": "BTC",
  "quoteCurrency": "USD",
  "type": "perpetual",
  "active": true,
  "availableSince": "2019-03-30T00:00:00.000Z",
  "priceIncrement": 0.5,
  "amountIncrement": 1,
  "minTradeAmount": 1,
  "makerFee": -0.00025,
  "takerFee": 0.00075,
  "inverse": true,
  "contractType": "inverse_perpetual",
  "contractMultiplier": 1
}

Instruments filter endpoint

Returns instruments array for given exchange matching provided optional filter

endpoint URL

https://api.tardis.dev/v1/instruments/:exchange?filter={filter_payload}

example URLs

optional filter object format

JSON object, when provided via query string it needs be url encoded.

{
	baseCurrency: string | string[] | undefined
	quoteCurrency: string | string[] | undefined
	type: string | string[] | undefined
	contractType: string | string[] | undefined
	active: boolean | undefined
}

sample request in JavaScript

const  payload = {
	baseCurrency: 'BTC',
	quoteCurrency: ['USD', 'USDT'],
	type: 'perpetual'
}

const headers = {
	Authorization: 'Bearer YOUR_API_KEY'
}

const  encodedPayload = encodeURIComponent(JSON.stringify(payload))
await  fetch(`https://api.tardis.dev/v1/instruments/bitmex?filter=${encodedPayload}`, { headers })

response format

Array of instruments objects as described for single instrument endpoint

Last updated