query_prices

Function query_prices 

Source
pub async fn query_prices<TZ>(
    zone: AwattarZone,
    start: Option<DateTime<TZ>>,
    end: Option<DateTime<TZ>>,
) -> Result<Vec<PriceSlot>, AwattarError>
where TZ: TimeZone,
👎Deprecated since 0.2.0: Use PriceData::query instead
Expand description

Query prices from the API in the given zone with an optional start and end DateTime.

Supplying only start returns only prices from start up until start + 24 hours. Supplying start and end returns all prices within the given datetimes (within the limits of the API). Supplying neither start nor end returns all prices starting now, up to 24 hours into the future. Better use query_prices_now() as a convencience function in this case.