AggregatorInterface’s Methods

latestAnswer

Get the latest answer stamped onto blockchain.

Returns the latest answer. E.g. the latest token price.

function latestAnswer() external view returns (int256)

latestTimestamp

Get the timestamp of the latest answer stamped onto blockchain.

Returns the latest timestamp. E.g. the timestamp when the latest token price is stamped.

function latestTimestamp() external view returns (uint256)

latestRound

Get the round ID of the latest answer stamped onto blockchain.

Returns uint80 value, which the first 16 bits represent the phase ID of the aggregator this proxy currently points to, the later 64 bits represent the round ID of the latest answer stamped onto the aggregator this proxy points to.

function latestRound() external view returns (uint256)

getAnswer

Get the answer of the input round ID. The input round ID is a uint80 value, the first 16 bits represent the phase ID of an aggregator this proxy once pointed to or currently points to, the later 64 bits represent the round ID of the answer in the aggregator of the phase ID.

Returns the answer of the round ID.

function getAnswer(uint256 roundId) external view returns (int256)

getTimestamp

Get the timestamp of the answer of the input round ID. The input round ID’s details are the same as getTimestamp(uint256 roundId) method.

Returns the timestamp of the answer of the round ID.

function getTimestamp(uint256 roundId) external view returns (uint256)

Last updated