AggregatorInterface v0.2.8 API Reference
Basic price feed interface.
AggregatorInterface
event AnswerUpdated(int256 current, uint256 roundId, uint256 updatedAt)
Emitted when the answer is updated.
| Name | Type | Description |
|---|
| current | int256 | - The updated answer. |
| roundId | uint256 | - The round ID for which the answer was updated. |
| updatedAt | uint256 | - The timestamp when the answer was updated. |
event NewRound(uint256 roundId, address startedBy, uint256 startedAt)
Emitted when a new round is started.
| Name | Type | Description |
|---|
| roundId | uint256 | - The round ID of the new round. |
| startedBy | address | - The address of the account that started the round. |
| startedAt | uint256 | - The timestamp when the round was started. |
function getAnswer(uint256 roundId) external view returns (int256)
Gets the answer for a specific round ID.
| Name | Type | Description |
|---|
| roundId | uint256 | - The round ID to get the answer for. |
| Name | Type | Description |
|---|
| [0] | int256 | int256 - The answer for the given round ID. |
function getTimestamp(uint256 roundId) external view returns (uint256)
Gets the timestamp for a specific round ID.
| Name | Type | Description |
|---|
| roundId | uint256 | - The round ID to get the timestamp for. |
| Name | Type | Description |
|---|
| [0] | uint256 | uint256 - The timestamp for the given round ID. |
function latestAnswer() external view returns (int256)
Gets the latest answer from the aggregator.
| Name | Type | Description |
|---|
| [0] | int256 | int256 - The latest answer. |
function latestRound() external view returns (uint256)
Gets the latest round ID from the aggregator.
| Name | Type | Description |
|---|
| [0] | uint256 | uint256 - The latest round ID. |
function latestTimestamp() external view returns (uint256)
Gets the timestamp of the latest answer from the aggregator.
| Name | Type | Description |
|---|
| [0] | uint256 | uint256 - The timestamp of the latest answer. |