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

AggregatorV3Interface v0.3.0 API Reference

AggregatorV3Interface

Extended price feed interface.

AggregatorV3Interface

Functions

decimals

Gets the number of decimals used by the aggregator.

function decimals() external view returns (uint8);

Returns

NameTypeDescription
<none>uint8uint8 - The number of decimals.

description

Gets the description of the aggregator.

function description() external view returns (string memory);

Returns

NameTypeDescription
<none>stringstring memory - The description of the aggregator.

getRoundData

Gets the round data for a specific round ID.

This function should raise "No data present" if no data is available for the given round ID.

function getRoundData(uint80 _roundId)
    external
    view
    returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);

Parameters

NameTypeDescription
_roundIduint80- The round ID to get the data for.

Returns

NameTypeDescription
roundIduint80- The round ID.
answerint256- The answer for the round.
startedAtuint256- The timestamp when the round started.
updatedAtuint256- The timestamp when the round was updated.
answeredInRounduint80- The round ID in which the answer was computed.

latestRoundData

Gets the latest round data.

This function should raise "No data present" if no data is available.

function latestRoundData()
    external
    view
    returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);

Returns

NameTypeDescription
roundIduint80- The latest round ID.
answerint256- The latest answer.
startedAtuint256- The timestamp when the latest round started.
updatedAtuint256- The timestamp when the latest round was updated.
answeredInRounduint80- The round ID in which the latest answer was computed.

version

Gets the version of the aggregator.

function version() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256uint256 - The version of the aggregator.

Get the latest Chainlink content straight to your inbox.