/v1/cost
Appliance running cost
Live testen
10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.
Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.
API-Key holenCode-Snippets
curl "https://api.oanor.com/energycost-api/v1/cost" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/energycost-api/v1/cost", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/energycost-api/v1/cost");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/energycost-api/v1/cost",
headers={"x-oanor-key": "oanor_test_..."}
)
Beispiel-Response
Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.
{
"data": {
"kwh": {
"per_day": 0.5,
"per_week": 3.5,
"per_year": 182.5,
"per_month": 15.208
},
"cost": {
"per_day": 0.15,
"per_week": 1.05,
"per_year": 54.75,
"per_month": 4.56
},
"note": "kWh = power (kW) × hours. Cost = kWh × rate. Months use 365/12 days.",
"input": {
"power_kw": 0.1,
"quantity": 1,
"rate_per_kwh": 0.3,
"hours_per_day": 5
}
},
"meta": {
"timestamp": "2026-06-04T01:59:20.694Z",
"request_id": "28b82b39-0a8a-46f7-bf1d-7ce27af0f845"
},
"status": "ok",
"message": "Running cost",
"success": true
}