Vai al contenuto
GET /v1/charge-time

Charge time from capacity and current

Provalo dal vivo

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

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

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

Ottieni una chiave API

Frammenti di codice

curl "https://api.oanor.com/batterypack-api/v1/charge-time" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/batterypack-api/v1/charge-time", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/batterypack-api/v1/charge-time");
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/batterypack-api/v1/charge-time",
    headers={"x-oanor-key": "oanor_test_..."}
)

Risposta di esempio

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

{
    "data": {
        "note": "Charge time ≈ the amp-hours to add ÷ the charge current. It is an ideal figure: Li-ion charges at constant current only up to ~80 %, then tapers in the constant-voltage phase, so the last 20 % takes disproportionately longer — real full charges run noticeably past this estimate. A lower charge current is gentler on the cells and lengthens pack life.",
        "inputs": {
            "start_pct": 20,
            "target_pct": 100,
            "capacity_ah": 14,
            "efficiency_pct": 100,
            "charge_current_a": 7
        },
        "charge_ah": 11.2,
        "charge_time_hours": 1.6,
        "charge_time_minutes": 96
    },
    "meta": {
        "timestamp": "2026-06-06T23:53:52.851Z",
        "request_id": "ef479439-d637-458f-bb5f-d121d8b0b68f"
    },
    "status": "ok",
    "message": "Charge time",
    "success": true
}