Naar de inhoud
GET /v1/block

Block by number (or latest)

Probeer het live

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

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

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

Verkrijg een API-sleutel

Codefragmenten

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

Voorbeeldrespons

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

{
    "data": {
        "hash": "0x59e3f80952b9326cd20b316a17350e4074f37e040eef6936ca8f1ddd95fbc058",
        "chain": "Towns",
        "miner": "0x4200000000000000000000000000000000000011",
        "number": 5000000,
        "gas_used": 43779,
        "tx_count": 1,
        "gas_limit": 30000000,
        "timestamp": 1726138071,
        "size_bytes": 839,
        "parent_hash": "0x12c4072d3325c82c4dbc3769403dd26a6151bc567c53c0c48878ade4120edb80",
        "timestamp_iso": "2024-09-12T10:47:51.000Z"
    },
    "meta": {
        "timestamp": "2026-06-15T20:40:12.306Z",
        "request_id": "3ae12d97-0e21-4b8c-98b5-b35748f73286"
    },
    "status": "ok",
    "message": "Towns block retrieved",
    "success": true
}