Prices
curl --request GET \
--url https://api.energy-hub.io/v1.0.0/tariffs/{tariffId}/prices \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.energy-hub.io/v1.0.0/tariffs/{tariffId}/prices"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.energy-hub.io/v1.0.0/tariffs/{tariffId}/prices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.energy-hub.io/v1.0.0/tariffs/{tariffId}/prices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.energy-hub.io/v1.0.0/tariffs/{tariffId}/prices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.energy-hub.io/v1.0.0/tariffs/{tariffId}/prices")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.energy-hub.io/v1.0.0/tariffs/{tariffId}/prices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body[
[
{
"totalPrice": 0.22,
"energyPrice": 0.05,
"taxAndLevies": 0.17,
"startDate": "2024-07-03T10:26:21.452Z"
},
{
"totalPrice": 0.23,
"energyPrice": 0.06,
"taxAndLevies": 0.17,
"startDate": "2024-07-03T11:26:21.452Z"
},
{
"totalPrice": 0.24,
"energyPrice": 0.07,
"taxAndLevies": 0.17,
"startDate": "2024-07-03T12:26:21.452Z"
},
{
"totalPrice": 0.25,
"energyPrice": 0.08,
"taxAndLevies": 0.17,
"startDate": "2024-07-03T13:26:21.452Z"
},
{
"totalPrice": 0.26,
"energyPrice": 0.09,
"taxAndLevies": 0.17,
"startDate": "2024-07-03T14:26:21.452Z"
},
{
"totalPrice": 0.27,
"energyPrice": 0.1,
"taxAndLevies": 0.17,
"startDate": "2024-07-03T15:26:21.452Z"
},
{
"totalPrice": 0.28,
"energyPrice": 0.11,
"taxAndLevies": 0.17,
"startDate": "2024-07-03T16:26:21.452Z"
},
{
"totalPrice": 0.29,
"energyPrice": 0.12,
"taxAndLevies": 0.17,
"startDate": "2024-07-03T17:26:21.452Z"
},
{
"totalPrice": 0.3,
"energyPrice": 0.13,
"taxAndLevies": 0.17,
"startDate": "2024-07-03T18:26:21.452Z"
},
{
"totalPrice": 0.31,
"energyPrice": 0.14,
"taxAndLevies": 0.17,
"startDate": "2024-07-03T19:26:21.452Z"
},
{
"totalPrice": 0.32,
"energyPrice": 0.15,
"taxAndLevies": 0.17,
"startDate": "2024-07-03T20:26:21.452Z"
},
{
"totalPrice": 0.33,
"energyPrice": 0.16,
"taxAndLevies": 0.17,
"startDate": "2024-07-03T21:26:21.452Z"
},
{
"totalPrice": 0.34,
"energyPrice": 0.17,
"taxAndLevies": 0.17,
"startDate": "2024-07-03T22:26:21.452Z"
},
{
"totalPrice": 0.35,
"energyPrice": 0.18,
"taxAndLevies": 0.17,
"startDate": "2024-07-03T23:26:21.452Z"
},
{
"totalPrice": 0.36,
"energyPrice": 0.19,
"taxAndLevies": 0.17,
"startDate": "2024-07-04T00:26:21.452Z"
},
{
"totalPrice": 0.37,
"energyPrice": 0.2,
"taxAndLevies": 0.17,
"startDate": "2024-07-04T01:26:21.452Z"
},
{
"totalPrice": 0.38,
"energyPrice": 0.21,
"taxAndLevies": 0.17,
"startDate": "2024-07-04T02:26:21.452Z"
},
{
"totalPrice": 0.39,
"energyPrice": 0.22,
"taxAndLevies": 0.17,
"startDate": "2024-07-04T03:26:21.452Z"
},
{
"totalPrice": 0.4,
"energyPrice": 0.23,
"taxAndLevies": 0.17,
"startDate": "2024-07-04T04:26:21.452Z"
},
{
"totalPrice": 0.41,
"energyPrice": 0.24,
"taxAndLevies": 0.17,
"startDate": "2024-07-04T05:26:21.452Z"
},
{
"totalPrice": 0.42,
"energyPrice": 0.25,
"taxAndLevies": 0.17,
"startDate": "2024-07-04T06:26:21.452Z"
},
{
"totalPrice": 0.43,
"energyPrice": 0.26,
"taxAndLevies": 0.17,
"startDate": "2024-07-04T07:26:21.452Z"
},
{
"totalPrice": 0.44,
"energyPrice": 0.27,
"taxAndLevies": 0.17,
"startDate": "2024-07-04T08:26:21.452Z"
},
{
"totalPrice": 0.45,
"energyPrice": 0.28,
"taxAndLevies": 0.17,
"startDate": "2024-07-04T09:26:21.452Z"
}
]
]Tariff
Prices
Returns prices of a tariff.
GET
/
v1.0.0
/
tariffs
/
{tariffId}
/
prices
Prices
curl --request GET \
--url https://api.energy-hub.io/v1.0.0/tariffs/{tariffId}/prices \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.energy-hub.io/v1.0.0/tariffs/{tariffId}/prices"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.energy-hub.io/v1.0.0/tariffs/{tariffId}/prices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.energy-hub.io/v1.0.0/tariffs/{tariffId}/prices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.energy-hub.io/v1.0.0/tariffs/{tariffId}/prices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.energy-hub.io/v1.0.0/tariffs/{tariffId}/prices")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.energy-hub.io/v1.0.0/tariffs/{tariffId}/prices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body[
[
{
"totalPrice": 0.22,
"energyPrice": 0.05,
"taxAndLevies": 0.17,
"startDate": "2024-07-03T10:26:21.452Z"
},
{
"totalPrice": 0.23,
"energyPrice": 0.06,
"taxAndLevies": 0.17,
"startDate": "2024-07-03T11:26:21.452Z"
},
{
"totalPrice": 0.24,
"energyPrice": 0.07,
"taxAndLevies": 0.17,
"startDate": "2024-07-03T12:26:21.452Z"
},
{
"totalPrice": 0.25,
"energyPrice": 0.08,
"taxAndLevies": 0.17,
"startDate": "2024-07-03T13:26:21.452Z"
},
{
"totalPrice": 0.26,
"energyPrice": 0.09,
"taxAndLevies": 0.17,
"startDate": "2024-07-03T14:26:21.452Z"
},
{
"totalPrice": 0.27,
"energyPrice": 0.1,
"taxAndLevies": 0.17,
"startDate": "2024-07-03T15:26:21.452Z"
},
{
"totalPrice": 0.28,
"energyPrice": 0.11,
"taxAndLevies": 0.17,
"startDate": "2024-07-03T16:26:21.452Z"
},
{
"totalPrice": 0.29,
"energyPrice": 0.12,
"taxAndLevies": 0.17,
"startDate": "2024-07-03T17:26:21.452Z"
},
{
"totalPrice": 0.3,
"energyPrice": 0.13,
"taxAndLevies": 0.17,
"startDate": "2024-07-03T18:26:21.452Z"
},
{
"totalPrice": 0.31,
"energyPrice": 0.14,
"taxAndLevies": 0.17,
"startDate": "2024-07-03T19:26:21.452Z"
},
{
"totalPrice": 0.32,
"energyPrice": 0.15,
"taxAndLevies": 0.17,
"startDate": "2024-07-03T20:26:21.452Z"
},
{
"totalPrice": 0.33,
"energyPrice": 0.16,
"taxAndLevies": 0.17,
"startDate": "2024-07-03T21:26:21.452Z"
},
{
"totalPrice": 0.34,
"energyPrice": 0.17,
"taxAndLevies": 0.17,
"startDate": "2024-07-03T22:26:21.452Z"
},
{
"totalPrice": 0.35,
"energyPrice": 0.18,
"taxAndLevies": 0.17,
"startDate": "2024-07-03T23:26:21.452Z"
},
{
"totalPrice": 0.36,
"energyPrice": 0.19,
"taxAndLevies": 0.17,
"startDate": "2024-07-04T00:26:21.452Z"
},
{
"totalPrice": 0.37,
"energyPrice": 0.2,
"taxAndLevies": 0.17,
"startDate": "2024-07-04T01:26:21.452Z"
},
{
"totalPrice": 0.38,
"energyPrice": 0.21,
"taxAndLevies": 0.17,
"startDate": "2024-07-04T02:26:21.452Z"
},
{
"totalPrice": 0.39,
"energyPrice": 0.22,
"taxAndLevies": 0.17,
"startDate": "2024-07-04T03:26:21.452Z"
},
{
"totalPrice": 0.4,
"energyPrice": 0.23,
"taxAndLevies": 0.17,
"startDate": "2024-07-04T04:26:21.452Z"
},
{
"totalPrice": 0.41,
"energyPrice": 0.24,
"taxAndLevies": 0.17,
"startDate": "2024-07-04T05:26:21.452Z"
},
{
"totalPrice": 0.42,
"energyPrice": 0.25,
"taxAndLevies": 0.17,
"startDate": "2024-07-04T06:26:21.452Z"
},
{
"totalPrice": 0.43,
"energyPrice": 0.26,
"taxAndLevies": 0.17,
"startDate": "2024-07-04T07:26:21.452Z"
},
{
"totalPrice": 0.44,
"energyPrice": 0.27,
"taxAndLevies": 0.17,
"startDate": "2024-07-04T08:26:21.452Z"
},
{
"totalPrice": 0.45,
"energyPrice": 0.28,
"taxAndLevies": 0.17,
"startDate": "2024-07-04T09:26:21.452Z"
}
]
]Authorizations
API key used for authorization and authentication.
Path Parameters
Tariff id
Response
Successful operation
The total price consisting of energy purchasing costs and taxes and levies.
Example:
0.74
The taxes and levies of the purchased energy.
Example:
0.22
The timestamp of the start of price interval.
The day ahead spot price of the electricity purchased.
Example:
0.52
⌘I

