DataFeedDecimals

Chainlink Getter Plugin - DataFeedDecimals

Description

Get the number of decimals present in the response value.

Method

decimals()

Input Parameters

NamePlugin TypeDescription

to

FctAddress

Chainlink Datafeed address

Method Parameters

No required method parameters

Returned Values

NamePlugin TypeDescription

decimals

FctValue

Decimals of the datafeed value

Example

Example with initParams

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

Example without initParams

const dataFeedDecimals = new Chainlink.getter.DataFeedDecimals({ 
  chainId: 1 
})

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

Learn more

Learn more about Chainlink decimals method here

Last updated