API Version: v0.3.0 Not using latest version (v0.3.1)

AggregatorInterface v0.3.0 API Reference

AggregatorInterface

Basic price feed interface.

AggregatorInterface

Events

AnswerUpdated

Emitted when the answer is updated.

event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 updatedAt);

Parameters

NameTypeDescription
currentint256- The updated answer.
roundIduint256- The round ID for which the answer was updated.
updatedAtuint256- The timestamp when the answer was updated.

NewRound

Emitted when a new round is started.

event NewRound(uint256 indexed roundId, address indexed startedBy, uint256 startedAt);

Parameters

NameTypeDescription
roundIduint256- The round ID of the new round.
startedByaddress- The address of the account that started the round.
startedAtuint256- The timestamp when the round was started.

Functions

getAnswer

Gets the answer for a specific round ID.

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

Parameters

NameTypeDescription
roundIduint256- The round ID to get the answer for.

Returns

NameTypeDescription
<none>int256int256 - The answer for the given round ID.

getTimestamp

Gets the timestamp for a specific round ID.

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

Parameters

NameTypeDescription
roundIduint256- The round ID to get the timestamp for.

Returns

NameTypeDescription
<none>uint256uint256 - The timestamp for the given round ID.

latestAnswer

Gets the latest answer from the aggregator.

function latestAnswer() external view returns (int256);

Returns

NameTypeDescription
<none>int256int256 - The latest answer.

latestRound

Gets the latest round ID from the aggregator.

function latestRound() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256uint256 - The latest round ID.

latestTimestamp

Gets the timestamp of the latest answer from the aggregator.

function latestTimestamp() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256uint256 - The timestamp of the latest answer.

Get the latest Chainlink content straight to your inbox.