Skip to main content

Forecast Prices

The base url of the Smart Charging API is https://api.voluespark.com/smart/v1.

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
6 øre
6 øre

00 - 06

06 - 12

12 - 18

18 - 00

Tor

53

61

35

86

Fre

10

20

29

31

Lør

98

96

63

95

Søn

85

85

34

5

Man

91

85

7

48

Tir

18

82

51

70

Ons

20

57

30

20