/v1/block
A block by height or hash
Essayez-le en direct
10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.
Ça marche. Récupérez une clé API et utilisez-la dans votre projet.
Obtenez une clé APIExtraits de code
curl "https://api.oanor.com/unit0-api/v1/block" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/unit0-api/v1/block", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/unit0-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/unit0-api/v1/block",
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": {
"block": {
"hash": "0xf77ee36648b1935e6905ae7c8245f50e56a5903ea36c1e2e6af8d4dc69351e43",
"size": 759,
"miner": "0xEa39164B413b9ef65B3A7Fd9eDee08413Ee279B1",
"height": 11712242,
"gas_used": 150270,
"tx_count": 1,
"gas_limit": 30000000,
"timestamp": "2026-06-08T07:15:03.000000Z",
"burnt_fees": "1051890",
"difficulty": "0",
"base_fee_per_gas": "7"
}
},
"meta": {
"timestamp": "2026-06-08T09:48:52.776Z",
"request_id": "e5008262-6e70-48b0-a0b4-6800781cb50c"
},
"status": "ok",
"message": "Block retrieved successfully",
"success": true
}