Vai al contenuto
GET /v1/charge

Charge time

Provalo dal vivo

10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.

Intestazioni personalizzate (facoltative)
api.oanor.com/battery-api

Funziona. Prendi una chiave API e usala nel tuo progetto.

Ottieni una chiave API

Frammenti di codice

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

Risposta di esempio

Una risposta reale di questo endpoint, acquisita dall'ultimo health check.

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