Oracle
Last updated
Last updated
The Oracle contract acts as the price source for the Anchor Money Market. Stablecoin-denominated prices of bAssets are periodically reported by oracle feeders, and are made queriable by other smart contracts in the Anchor ecosystem.
UpdateConfig
Updates the configuration of the contract. Can only be issued by the owner.
* = optional
RegisterFeeder
Registers a feeder to the specified asset token.
FeedPrice
Feeds new price data. Can only be issued by the owner.
Config
Gets the Oracle contract configuration.
ConfigResponse
Feeder
Gets the feeder for the specified asset.
FeederResponse
Price
Gets price information for the specified base asset denominated in the quote asset.
* = optional
PriceResponse
Prices
Gets price information for all assets
PricesResponse
Key
Type
Description
owner
CanonicalAddr
Address of contract owner that can feed in price values
base_asset
String
Asset which fed-in prices will be denominated in
Key
Type
Description
owner
String
Address of contract owner that can feed in price values
base_asset
String
Asset which fed-in prices will be denominated in
Key
Type
Description
owner
*
String
Address of new owner
Key
Type
Description
asset
String
Asset to register feeder
feeder
String
Address of feeder to register
Key
Type
Description
prices
Vec<(String, Decimal256)>
Vector of assets and their prices
Key
Type
Description
Key
Type
Description
owner
String
Address of contract owner
base_asset
String
Asset in which fed-in prices will be denominated
Key
Type
Description
asset
String
Asset to get feeder information
Key
Type
Description
asset
String
Asset type
feeder
String
Address of feeder allowed to feed prices for this asset
Key
Type
Description
base
String
Asset for which to get price
quote
String
Asset in which calculated price will be denominated
Key
Type
Description
rate
Decimal256
Price of base
asset denominated in quote
assets
last_updated_base
u64
Unix block timestamp when the base
asset price was last fed in
last_updated_quote
u64
Unix block timestamp when the quote
asset price was last fed in
Key
Type
Description
start_after
*
String
Asset to start query
limit
*
u32
Maximum number of query entries
Key
Type
Description
prices
Vec<PricesResponseElem>
Vector of Asset price information
Key
Type
Description
asset
String
Asset whose price is being read
price
Decimal256
Price of Asset
last_updated_time
u64
Unix block timestamp when the price was last updated