Naar de inhoud
GET /v1/at

Block height at a timestamp or date on a chain

Probeer het live

10 gratis calls per dag — geen registratie, geen API-key. Loopt via de oanor-gateway.

Aangepaste headers (optioneel)
api.oanor.com/blocktime-api

Het werkt. Haal een API-key op en gebruik hem in je project.

Verkrijg een API-sleutel

Codefragmenten

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

Voorbeeldrespons

Een echte respons van dit endpoint, vastgelegd bij de laatste health check.

{
    "data": {
        "note": "The block that was live at (or closest at/after) the requested time. drift_seconds is how far the block's timestamp is from the request.",
        "chain": "ethereum",
        "source": "DeFiLlama",
        "block_height": 18908895,
        "drift_seconds": 11,
        "block_timestamp": 1704067211,
        "requested_timestamp": 1704067200
    },
    "meta": {
        "timestamp": "2026-06-14T08:04:14.260Z",
        "request_id": "762c6837-b7e5-4f32-834c-adb9eade76d8"
    },
    "status": "ok",
    "message": "Block at timestamp retrieved successfully",
    "success": true
}