Returns: BarsResponse

Arguments

symbol
String!
required

The ID of the pair or token (pairAddress:networkId or tokenAddress:networkId). If a token contract address is provided, the token’s top pair is used. For example, 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2:1 returns WETH’s top pair on Ethereum.

from
Int!
required

The unix timestamp for the start of the requested range.

to
Int!
required

The unix timestamp for the end of the requested range.

resolution
String!
required

The time frame for each candle. Available options are 1S, 5S, 15S, 30S, 1, 5, 15, 30, 60, 240, 720, 1D, 7D.

currencyCode
String

The currency to use for the response. Can be USD (default) or TOKEN.

removeLeadingNullValues
Boolean

Whether to remove leading null values from the response. To fetch a token’s entire history, set resolution to 1D, from value to 0 and removeLeadingNullValues to true. Default is false.

removeEmptyBars
Boolean

Whether to remove empty bars from the response. Default is false.

quoteToken
QuoteToken

The token of interest within the token’s top pair. Can be token0 or token1.

statsType
TokenPairStatisticsType

The type of statistics returned. Can be FILTERED or UNFILTERED

countback
Int

guarantees number of bars returned is at most this number

symbolType
SymbolType

specify the type of symbol you want to fetch values for (TOKEN | POOL)

Schema

"""Returns bar chart data to track price changes over time."""
getBars(symbol: String!, from: Int!, to: Int!, resolution: String!, currencyCode: String, removeLeadingNullValues: Boolean, removeEmptyBars: Boolean, quoteToken: QuoteToken, statsType: TokenPairStatisticsType, countback: Int, symbolType: SymbolType): BarsResponse