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
2 øre
3 øre
5 øre
8 øre

00 - 06

06 - 12

12 - 18

18 - 00

Fre

21

41

49

100

Lør

73

81

47

56

Søn

64

15

74

28

Man

19

78

43

41

Tir

13

91

27

30

Ons

52

17

77

22

Tor

75

35

11

14