Skip to main content

Chainlink Oracle

Web3 Sheets Demo: Chainlink

Example Explanation‚Äč

This demonstration uses Chainlink Oracle (which tracks ETH/USDC pricing) and features functions outlined in Custom Functions relating to historical timestamps to track token pricing.

  • A2 =CALLCSTR("2",$A$3,"description()") - returns the name of the Chainlink oracle contract.

  • A5 =CALLINT("",$A$3,A4)*10^-8 - returns the last reported price.

  • A7 =CALLINT("",$A$3,A6) - returns the timestamp of the latest update.


To convert a seconds timestamp to the date format enter the following: =[unix timestamp]/86400+Date(1970,1,1)

  • B2 =CURRENTBLOCK() - returns the current block

  • C10 =BLOCKTOTIMESTAMP(block number) - returns the timestamp in the date format for the requested block number.