/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/zksync-api/v1/block" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/zksync-api/v1/block", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/zksync-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/zksync-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": "0x99ebfb7085d714f7b9ba49689797c99052f4547a183c1916374a4683e1684fa9",
"size": 0,
"miner": "0x0000000000000000000000000000000000000000",
"height": 30000000,
"gas_used": 8222549,
"tx_count": 16,
"gas_limit": 4294967295,
"timestamp": "2024-03-27T13:26:04.000000Z",
"burnt_fees": "205563725000000",
"difficulty": "0",
"base_fee_per_gas": "25000000"
}
},
"meta": {
"timestamp": "2026-06-08T01:18:21.301Z",
"request_id": "730401c1-a452-4539-ac6b-0b7d067eb98e"
},
"status": "ok",
"message": "Block retrieved successfully",
"success": true
}