The Oracle Contract exposes an interface for accessing the latest reported price for assets used by the Nebula Protocol.
Prices are only considered valid for 60 seconds. If no new prices are published after the data has expired, the Nebula Protocol will disable all mint and burn operations until the price feed resumes
{
"owner": String,
"oracle_addr": String,
"base_denom": String
}
owner
: address of the owner of theoracle
contractoracle_addr
: address of the TeFi Oracle Hub contractbase_denom
base denom when calculating prices (uusd
in real cases)
Updates contract variables
{
"update_config": {
"owner": Option<String>,
"oracle_addr": Option<String>,
"base_denom": Option<String>
}
}
owner
: address of the new owner of theoracle
contractoracle_addr
: address of the new TeFi Oracle Hub contractbase_denom
new base denom when calculating prices
Returns general contract parameters
{
"config": {}
}
Returns the latest price by calculating latest_base_price
/latest_quote_price
{
"price": {
"base_asset": AssetInfo,
"quote_asset": AssetInfo
}
}
base_asset
: base asset to calculate the latest pricequote_asset
: quote asset to calculate the latest price