Skip to main content

Forecast Prices

The Smart Charging API is located under https://api.voluespark.com/smart/v1, this should be used as the base URL for all calls to the API.

Fetch forecast prices

Forecast prices consists of spot prices for the next seven days. The data is segmented into 6 hour intervals by default, but this can be adjusted to interval-lengths which are divisible by 24 hours by using the segmentSize query parameter.

A request to /prices/forecast/${priceArea} can be made with the following code:

curl -X 'GET' \
'https://api.voluespark.com/smart/v1/prices/forecast/NO1?segmentSize=6' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <access_token>'

The response of this API call will be a JSON object containing the following properties:

{
"priceArea": "NO1",
"priceUnits": {
"currency": "EUR",
"vat": {
"rate": 1,
"hasVAT": false
},
"energyUnit": "kWh"
},
"segmentOptions": {
"segmentSize": 6
},
"forecastSegments": [
{
"from": "2023-03-31T22:00:00+00:00",
"to": "2023-04-01T03:00:00+00:00",
"averagePrice": 0.07109166666666666
},
{
"from": "2023-04-01T04:00:00+00:00",
"to": "2023-04-01T09:00:00+00:00",
"averagePrice": 0.07731166666666667
},
{
"from": "2023-04-01T10:00:00+00:00",
"to": "2023-04-01T15:00:00+00:00",
"averagePrice": 0.07192
},
...
]
}

Fetch advice regarding forecast prices

The API can give you advice regarding the forecast intervals. The result from this type of query serves as an opinionated advice on when to use electricity, and when to avoid.

To make an API call simply run the following code (substitute parameters with your own values):

curl -X 'POST' \
'https://api.voluespark.com/smart/v1/prices/forecast/NO1/advice' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <access_token>' \
-d '{
"priceUnitsParameters": {
"currency": "EUR",
"energyUnit": "kWh",
"vatRate": null
},
"segmentOptionsParameters": {
"segmentSize": 6
}
}'

The response of this API call will be a JSON object containing the following properties:

{
"priceArea": "NO1",
"priceUnits": {
"currency": "EUR",
"vat": {
"rate": 1,
"hasVAT": false
},
"energyUnit": "kWh"
},
"segmentOptions": {
"segmentSize": 6
},
"forecastAdvice": [
{
"from": "2023-04-02T10:00:00+00:00",
"to": "2023-04-02T15:00:00+00:00",
"averagePrice": 0.06794,
"loss": -0.01134333333333333,
"type": "Good"
},
{
"from": "2023-04-02T16:00:00+00:00",
"to": "2023-04-02T21:00:00+00:00",
"averagePrice": 0.09430833333333333,
"loss": 0.015024999999999997,
"type": "Good"
},
{
"from": "2023-04-02T22:00:00+00:00",
"to": "2023-04-03T03:00:00+00:00",
"averagePrice": 0.10157833333333334,
"loss": 0,
"type": "Avoid"
},
...
]
}

Examples

Below are examples on how the data might be visualized. These can also be viewed in Storybook.

0 - 66 - 1212 - 1818 - 0
1 øre
2 øre
3 øre
5 øre

00 - 06

06 - 12

12 - 18

18 - 00

Fredag 31.03

75

96

75

93

Lørdag 01.04

82

48

99

69

Søndag 02.04

84

40

37

0

Mandag 03.04

24

4

6

2

Tirsdag 04.04

14

77

89

97

Onsdag 05.04

18

86

46

45

Torsdag 06.04

96

85

44

14