Chainlink Developers

Welcome to the Chainlink documentation site. You'll find comprehensive guides and documentation to help you start working with Chainlink as quickly as possible, as well as support if you get stuck. Click here for an introductory walkthrough on how to create a Chainlink request on the Ropsten test network!

Building on Chainlink? Click here to get started!

Get Started

API Reference

API reference for AggregatorV3Interface.

Functions

NameDescription
decimalsThe number of decimals in the response.
descriptionThe description of the aggregator that the proxy points to.
getRoundDataGet data from a specific round.
latestRoundDataGet data from the latest round.
versionThe version representing the type of aggregator the proxy points to.

decimals

Get the number of decimals present in the response value.

function decimals() external view returns (uint8)
  • RETURN: The number of decimals.

description

Get the description of the underlying aggregator that the proxy points to.

function description() external view returns (string memory)
  • RETURN: The description of the underlying aggregator.

getRoundData

Get data about a specific round, using the roundId.

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

Parameters

  • roundId: The round ID

Return Values

  • roundId: The round ID.
  • answer: The price.
  • startedAt: Timestamp of when the round started.
  • updatedAt: Timestamp of when the round was updated.
  • answeredInRound: The round ID of the round in which the answer
    • was computed.

latestRoundData

Get the price from the latest round.

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

Return Values

  • roundId: The round ID.
  • answer: The price.
  • startedAt: Timestamp of when the round started.
  • updatedAt: Timestamp of when the round was updated.
  • answeredInRound: The round ID of the round in which the answer
    • was computed.

version

The version representing the type of aggregator the proxy points to.

function version() external view returns (uint256)
  • RETURN: The version number.

Updated 2 months ago


API Reference


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.