Oracle
Encapsulated the call to PythOracle.
Config
owner
CanonicalAddr
The address of the contract's owner
pyth_contract
CanonicalAddr
The address of pyth oracle contract
new_owner*
CanonicalAddr
The address of the contract's new owner
* = optional
InitMsg
owner
string
The address of the contract's owner
pyth_contract
string
The address of pyth oracle contract
ExecuteMsg
ConfigFeedInfo
Set the relevant information for updating oracle.
asset
string
The address of the asset
price_feed_id
string
The pyth price feed id
price_feed_symbol
string
The pyth price feed symbol
price_feed_decimal
u32
The pyth price feed decimal
check_feed_age
bool
Whether to check the age of the price feed
price_feed_age
u64
The maximum age of the price feed in seconds
ChangeOwner
Change the contract owner, only can issued by current owner.
new_owner
string
The address of the new contract owner.
SetConfigFeedValid
Set whether the oracle is available, the default is available, the type is bool.
asset
string
The address of the asset
valid
bool
Whether the oracle is available
ChangePythContract
Change the pyth contract address, only can issued by current owner.
pyth_contract
String
The pyth contract address
QueryMsg
All query messages are described below. A custom struct is defined for each query response.
QueryPrice
Returns the price of the asset.
asset
string
The address of the asset
PriceResponse
asset
string
The address of the asset
emv_price
decimal
The emv price of the asset in the base currency
emv_price_raw
i64
The emv price of the asset in the base currency, multiplied by 10^8
price
decimal
The price of the asset in the quote currency
price_raw
i64
The price of the asset in the quote currency, multiplied by 10^8
last_updated_base
u64
The timestamp of the last update of the price of the asset in the base currency
last_updated_quote
u64
The timestamp of the last update of the price of the asset in the quote currency
QueryPrices
Returns the prices of the assets.
assets
Vec<String>
The list of asset addresses
QueryConfig
Returns information about global config.
ConfigResponse
QueryPythFeederConfig
Returns the pyth feeder config.
asset
string
The address of the asset
PythFeederConfigResponse
price_feed_id
string
The price feed id
price_feed_symbol
string
The price feed symbol
price_feed_decimal
u32
The price feed decimal
price_feed_age
u64
The price feed age
check_feed_age
bool
Whether to check the price feed age
is_valid
bool
Whether the config is valid
QueryExchangeRateByAssetLabel
Returns the exchange rate of the asset label.
base_label
String
The base label
quote_label
String
The quote label
Last updated