getBars
Returns bar chart data to track price changes over time.
Returns: BarsResponse
Arguments
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.
The unix timestamp for the start of the requested range.
The unix timestamp for the end of the requested range.
The time frame for each candle. Available options are 1S
, 5S
, 15S
, 30S
, 1
, 5
, 15
, 30
, 60
, 240
, 720
, 1D
, 7D
.
The currency to use for the response. Can be USD
(default) or TOKEN
.
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
.
Whether to remove empty bars from the response. Default is false
.
The token of interest within the token’s top pair. Can be token0
or token1
.
The type of statistics returned. Can be FILTERED
or UNFILTERED
guarantees number of bars returned is at most this number
specify the type of symbol you want to fetch values for (TOKEN | POOL)