Skip to content
GET /v1/charge-time

Charge time from capacity and current

Try it live

10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.

Custom headers (optional)
api.oanor.com/batterypack-api

It works. Grab an API key and use it in your project.

Get an API key

Code snippets

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

Example response

A real response from this endpoint, captured by the latest 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
}