Aller au contenu
GET /v1/charge

Charge time

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/battery-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/battery-api/v1/charge" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/battery-api/v1/charge", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/battery-api/v1/charge");
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/battery-api/v1/charge",
    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": {
        "note": "Approx CC charge time = charge mAh ÷ charge current ÷ efficiency. Real Li-ion charging slows in the CV phase near full.",
        "input": {
            "mah": 3000,
            "charge_ma": 1500,
            "efficiency": 0.9,
            "to_percent": 100,
            "from_percent": 0
        },
        "c_rate": 0.5,
        "charge_mah": 3000,
        "charge_time": "2h 13m",
        "charge_hours": 2.222,
        "charge_minutes": 133.3
    },
    "meta": {
        "timestamp": "2026-06-03T17:41:58.862Z",
        "request_id": "7312a652-5cab-4cc5-9d93-87e7c2d20c6e"
    },
    "status": "ok",
    "message": "Charge time",
    "success": true
}