/v1/round-trip
Round-trip delay
Δοκιμάστε το ζωντανά
10 δωρεάν κλήσεις την ημέρα — χωρίς εγγραφή, χωρίς κλειδί API. Μέσω του gateway του oanor.
Δουλεύει. Πάρε ένα κλειδί API και χρησιμοποίησέ το στο έργο σου.
Λάβετε ένα κλειδί APIΑποσπάσματα κώδικα
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_..."}
)
Παράδειγμα απόκρισης
Πραγματική απόκριση αυτού του endpoint, από τον τελευταίο έλεγχο υγείας.
{
"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
}