BKC Oracle
  • About
    • About BKC Oracle
    • Connect with MetaMask
  • Features
    • Data feeds
    • Verifiable Random Function (VRF)
  • How to
    • Using Data Feed
    • Using VRF
  • Examples
    • Data Feed Consumer
    • VRF Consumer
  • Utilities
    • Contract Addresses
      • Bitkub Mainnet
      • Bitkub Testnet
    • Data Feed Proxy Contract Interface
      • AggregatorInterface’s Methods
      • AggregatorV3Interface’s Methods
    • Key Hash
  • Deprecated
    • What’s dashboard?
      • How to manage subscriptions?
      • How to add a new subscription?
      • How to convert KUB to KKUB?
    • Interface Requirement of a Consumer Contract
    • How to subscribe to data oracle?
      • Monthly subscription
      • Annual subscription
  • Links
    • Get KDEV
Powered by GitBook
On this page
  1. Utilities
  2. Data Feed Proxy Contract Interface

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)

PreviousData Feed Proxy Contract InterfaceNextAggregatorV3Interface’s Methods

Last updated 3 years ago