readOracle
The readOracle
method is designed to retrieve the value from a specific oracle. This enables users to access data fetched by an oracle, which serves as a reliable source of information sourced from external APIs or other data providers.
Usage
As an example, we will utilize the CoinGecko public API oracle, which provides the Ethereum price in USD: CoinGecko Ethereum API.
You can utilize either type of SDK instance, be it the basic IExecOracleFactory
or the IExecOracleReader
, to invoke the readOracle
method.
Return value example
Parameters
cid
Content ID of the Oracle to be read.
Last updated