Electricity stock prices
AnyViz offers several external data sources. In addition to weather data and user-defined APIs, spot prices on the electricity market can be retrieved and used in the AnyViz. The data can be configured for display and recording or transferred to a PLC controller.
The electricity prices are available in Euro/MWh as hourly values for the current and the following day. For more details see Description of the data.
When adding the data source, the corresponding zone and the desired interval must be selected:

Depending on the zone, the data is available at 15-minute or 60-minute intervals. For zones that are in the process of conversion, both intervals may be available.
Description of the data

The electricity prices are available in groupings. Each grouping contains the prices in Euro/MWh,
the respective average price PriceAVG
, as well as the minimum and maximum price PriceMIN
and PriceMAX
.
fromNow
In fromNow
, electricity prices are represented starting from the current hour or quarter-hour.
The array Prices
contains up to 34 hourly values or up to 24 quarter-hourly values, with fromNow.Prices[0]
holding the current price.
Prices are updated at every change of hour or quarter-hour.
todayCET
The grouping todayCET
contains the prices of the current day from 00:00 to 24:00 Central European Time.
The array Prices
(with hourly intervals) always contains 24 values. To retrieve the price starting at 14:00, for example, you need to read the value todayCET.Prices[14]
.
The string RawList
(with 15-minute intervals) contains all prices separated by spaces.
tomorrowCET
As soon as the spot prices of the following day are available, they are provided under tomorrowCET
.
As with todayCET, the prices are displayed in the CET time zone. Usually, the prices for the following day are available from 14:00 CET.
Daylight saving time (with hourly intervals)
On the day of the changeover to daylight saving time, the 02:00 value is not present. Instead, the value NaN
is written.
At the changeover to winter time, the mean value of both 02:00 o'clock values is calculated and written in Prices[2]
.
The grouping fromNow
is not affected by this problem.
NaN values
In some constellations, not all prices are available. For example, if the spot prices for the following day are not yet available. To indicate to the PLC and the user that the price information is currently not available, the floating-point value NaN is written. This imaginary number serves as a placeholder until the respective price information is available.
Caution: Every mathematical operation with NaN leads to the result NaN. Therefore, a check for a valid number should always be performed during further processing of the price information.