API Documentation


Examples | Type Definition

The markets field returns an array of Market.

Markets with the same base and quote assets can be aggregated via Volume Weighted Averaging.


All BTC/USD markets

Markets can be filtered using a filter object or a marketSymbol.

A marketSymbol is used for simple and quick filtering of markets. The format is exchangeSymbol:baseSymbol/quoteSymbol. The exchange symbol and initial colon are optional and any of the three can be replaced with an asterisk for a wildcard.

query markets {
  markets(marketSymbol: "btc/usd") {
    ticker {

The filter object enables more complex querying.

query markets {
  markets(filter: { baseSymbol: { _eq: "btc" }, quoteSymbol: { _in: ["usd", "usdt"] } }) {
    ticker {

Filter objects and marketSymbol and can be combined. MarketSymbol will take prescedence.

query markets {
  markets(marketSymbol: "binance:*/usdt", filter: { baseSymbol: { _in: ["ltc", "btc"] } }) {
    ticker {

Type Definitions

OBJECT: Market #

Market where an asset is traded against a quote asset
idUnique identifier for the market
marketTypeMarketTypeType of market
marketStatusMarketStatusStatus of market
marketSymbolStringUnique symbol identifying the market in the format {exchange_symbol}:{base_symbol}/{quote_symbol}
baseSymbolStringBase asset symbol
quoteSymbolStringQuote asset symbol
exchangeSymbolStringExchange symbol
remoteIdStringRemote identifier on the exchange
firstUnixIntThe unix timestamp of the first market data
firstDateStringThe unix timestamp of the first market data as an ISO 8601 formatted string
lastUnixIntThe unix timestamp of the last market update
lastDateStringthe unix timestamp of the last market update as an ISO 8601 formatted string
tickerTickerCurrent market statistics
ohlcvOHLCVCompressed OHLCV for the market. By default returns the newest candles.
Input NameInput TypeInput Description
resolutionTimeResolutionREQUIRED - Size of the time bucket
limitIntNumber of records to return. Can be combined with start to retain the tail.
startIntUnix timestamp to start the time series. Can be combined with limit or end, but not both.
startDateStringStarting date and time in ISO 8601 format
endIntUnix timestamp to end the time series. Must be combined with
endDateStringEnding date and time in ISO 8601 format
sortTimeSortSort direction as NEW_FIRST or OLD_FIRST

OBJECT: Ticker #

Market statistics generated by the lasted market ticks
percentChangeStringPercent change in 24 hours
lastPriceStringLast price
lowPriceStringLowest price in the past 24 hours
highPriceStringHighest price in the past 24 hours
baseVolumeStringBase asset volume traded in past 24 hours
quoteVolumeStringQuote asset volume traded in past 24 hours

Filter and Sort Definitions

INPUT_OBJECT: MarketFilter #

Filter markets for an asset
_and[MarketFilter]And operator
_or[MarketFilter]Or operator
idStringFilterid filters
marketSymbolStringFiltermarketSymbol filters
marketTypeMarketTypeFiltermarketType filters
marketStatusMarketStatusFiltermarketStatus filters
exchangeSymbolStringFilterexchangeSymbol filters
baseSymbolStringFilterbaseSymbol filters
quoteSymbolStringFilterquoteSymbol filters
firstUnixIntFilterfirstUnix filter
lastUnixIntFilterlastUnix filter
baseAssetAssetFilterFilter by base asset
quoteAssetAssetFilterFilter by quote asset
exchangeExchangeFilterFilter by exchange