Prices can then be queried with GetPrice{ .. }, GetPrices{ .. }, and GetAllPrices{ .. }.

Query Messages

GetPrice { .. }
pub enum QueryMsg {
    /// Returns the price of a single asset
    #[returns(PriceInfo)]
    GetPrice { asset: AssetInfo },
}
RUST

GetPrices { .. }
pub enum QueryMsg {
    /// Returns the price of multiple assets
    #[returns(neptune_common::asset::AssetMap<PriceInfo> )]
    GetPrices { assets: Vec<AssetInfo> },
}
RUST

GetAllPrices { .. }
pub enum QueryMsg {
    /// Returns the price of all assets
    #[returns(neptune_common::asset::AssetMap<PriceInfo> )]
    GetAllPrices { start_after: Option<AssetInfo>, limit: Option<u32> },
}
RUST

Price Oracle Query Response

PriceInfo is defined below in this Common Structure.

To return successfully, the time_last_updated must be acceptable.

PriceInfo
pub struct PriceInfo {
    pub price:             Decimal256,
    pub time_last_updated: Timestamp,
}
RUST