Aller au contenu
GET /v1/round-trip

Round-trip delay

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/lighttime-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/lighttime-api/v1/round-trip" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/lighttime-api/v1/round-trip", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/lighttime-api/v1/round-trip");
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/lighttime-api/v1/round-trip",
    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": "Communication delay: a signal travels at light speed, so the one-way latency is d/c and a command-and-acknowledge round trip is 2·d/c — the reason Mars rovers are largely autonomous.",
        "inputs": {
            "unit": "km",
            "distance": 150000000
        },
        "distance_m": 150000000000,
        "one_way_delay": {
            "days": 0.0057910433,
            "hours": 0.13898504,
            "years": 1.5855013e-5,
            "minutes": 8.33910238,
            "seconds": 500.346143
        },
        "round_trip_delay": {
            "days": 0.0115820866,
            "hours": 0.277970079,
            "years": 3.1710025e-5,
            "minutes": 16.67820476,
            "seconds": 1000.692286
        }
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:33.213Z",
        "request_id": "c8acf156-39d5-4a29-b37f-200e69a8a2e1"
    },
    "status": "ok",
    "message": "Round-trip delay",
    "success": true
}