/v1/block
Block detail 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/ethereum-api/v1/block" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/ethereum-api/v1/block", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/ethereum-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/ethereum-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": "0xd24fd73f794058a3807db926d8898c6481e902b7edb91ce0d479d6760f276183",
"size": 51097,
"miner": "0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5",
"height": 20000000,
"reward": "22210936792725994",
"gas_used": 11089692,
"tx_count": 134,
"gas_limit": 30000000,
"timestamp": "2024-06-01T22:36:47.000000Z",
"burnt_fees": "54749340487463472",
"difficulty": "0",
"base_fee_per_gas": "4936957716"
}
},
"meta": {
"timestamp": "2026-06-08T01:19:46.164Z",
"request_id": "64510af4-59bd-4446-9b83-987fd43f4a57"
},
"status": "ok",
"message": "Block retrieved successfully",
"success": true
}