LatestRoundData

Chainlink Getter Plugin - LatestRoundData

Description

Get the price from the latest round.

Method

latestRoundData()

Input Parameters

Method Parameters

No required method parameters

Returned Values

Example

Example with initParams

const latestRoundData = new Chainlink.getter.LatestRoundData({
   chainId: 1,
   initParams: {
      to: "0x5f4ec3df9cbd43714fe2740f5e3616155c5b8419" // ETH/USD Datafeed
   }
})

Example without initParams

const latestRoundData = new Chainlink.getter.LatestRoundData({ 
  chainId: 1 
})

latestRoundData.input.set({
  to: "0x5f4ec3df9cbd43714fe2740f5e3616155c5b8419" // ETH/USD Datafeed
})

Learn more

Learn more about Chainlink latest round data method here

Last updated