curl --request GET \
--url https://api.nox.energy/v1/devices/battery/charge-discharge/historical \
--header 'x-api-key: <api-key>'import requests
url = "https://api.nox.energy/v1/devices/battery/charge-discharge/historical"
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.nox.energy/v1/devices/battery/charge-discharge/historical', 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.nox.energy/v1/devices/battery/charge-discharge/historical",
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.nox.energy/v1/devices/battery/charge-discharge/historical"
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.nox.energy/v1/devices/battery/charge-discharge/historical")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nox.energy/v1/devices/battery/charge-discharge/historical")
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{
"data": [
{
"measurement_time": "2026-10-16 12:00",
"device_id": "e4da3b7f-bbce-4a45-9d2b-1c0e8f7a6b5c",
"user_id": "1234",
"charge_kwh": 0.82,
"discharge_kwh": 0,
"soc_pct": 64
},
{
"measurement_time": "2026-10-16 12:15",
"device_id": "e4da3b7f-bbce-4a45-9d2b-1c0e8f7a6b5c",
"user_id": "1234",
"charge_kwh": 0.75,
"discharge_kwh": 0,
"soc_pct": 71.5
}
],
"meta": {
"energy_supplier": "Energy Supplier A",
"next_token": "AYABeH50-To0SRdAWC9BY9aCIaEAAAABAAdhd3Mta21zAE5hcm46YXdzOmttczpldS1jZW50cmFsLTE6ND",
"energy_unit": "kWh",
"granularity": "15min",
"output_timezone": "UTC"
}
}{
"detail": "Energy Supplier A is not authorized to access this feature."
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "This endpoint is not available yet."
}Get Devices Battery Charge Discharge Historical
Preview: not available yet. This endpoint is documented ahead of its release and currently
answers 501 Not Implemented. Its contract may still change before release.
Get the measured charge and discharge of your batteries in kWh for a specific timeframe with 15 min granularity.
The timestamp refers to the 15 minutes after it. soc_pct is the state of charge at the end of
that interval.
curl --request GET \
--url https://api.nox.energy/v1/devices/battery/charge-discharge/historical \
--header 'x-api-key: <api-key>'import requests
url = "https://api.nox.energy/v1/devices/battery/charge-discharge/historical"
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.nox.energy/v1/devices/battery/charge-discharge/historical', 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.nox.energy/v1/devices/battery/charge-discharge/historical",
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.nox.energy/v1/devices/battery/charge-discharge/historical"
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.nox.energy/v1/devices/battery/charge-discharge/historical")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nox.energy/v1/devices/battery/charge-discharge/historical")
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{
"data": [
{
"measurement_time": "2026-10-16 12:00",
"device_id": "e4da3b7f-bbce-4a45-9d2b-1c0e8f7a6b5c",
"user_id": "1234",
"charge_kwh": 0.82,
"discharge_kwh": 0,
"soc_pct": 64
},
{
"measurement_time": "2026-10-16 12:15",
"device_id": "e4da3b7f-bbce-4a45-9d2b-1c0e8f7a6b5c",
"user_id": "1234",
"charge_kwh": 0.75,
"discharge_kwh": 0,
"soc_pct": 71.5
}
],
"meta": {
"energy_supplier": "Energy Supplier A",
"next_token": "AYABeH50-To0SRdAWC9BY9aCIaEAAAABAAdhd3Mta21zAE5hcm46YXdzOmttczpldS1jZW50cmFsLTE6ND",
"energy_unit": "kWh",
"granularity": "15min",
"output_timezone": "UTC"
}
}{
"detail": "Energy Supplier A is not authorized to access this feature."
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "This endpoint is not available yet."
}Authorizations
API Key authentication. Enter your API key in the format: YOUR_API_KEY
Query Parameters
Start of the requested period. Intervals starting at or after this time are returned. The time is in UTC in ISO 8601 format.
Time format examples:
- 2023-10-01T00:00:00Z
- 2023-10-01T00:00:00
End of the requested period. Intervals starting before this time are returned. The time is in UTC in ISO 8601 format.
Time format examples:
- 2023-10-01T00:00:00Z
- 2023-10-01T00:00:00
The maximum number of items to return per page of results.
This should be used together with the next_token parameter to paginate through results.
Read the pagination parameter documentation for more details.
1 <= x <= 1000The next_token is a token used to retrieve the next page of results when there are more results
than can fit in a single page(=API response).
By default, the API will return a next_token of the first page if no token was given as a parameter.
If the token is null you have reached the end of the results.
This should be used together with the limit parameter to paginate through results.
To get all results of your call, you can keep calling the same API call with the previously returned next_token until it returns null.
If true, sum the values of all batteries per interval.
If false, return the values of each battery separately.
Note: If device_id is given, the aggregated parameter is ignored.
Battery device ID to get data of. If None, all batteries are included.