/v1/block
Block by number (or latest)
Live testen
10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.
Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.
API-Key holenCode-Snippets
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_..."}
)
Beispiel-Response
Echte Antwort dieses Endpoints, erfasst beim letzten 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
}