Aller au contenu
GET /v1/cost

Appliance running cost

Essayez-le en direct

10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.

En-têtes personnalisés (facultatif)
api.oanor.com/energycost-api

Ça marche. Récupérez une clé API et utilisez-la dans votre projet.

Obtenez une clé API

Extraits de code

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_..."}
)

Exemple de réponse

Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.

{
    "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
}