/v1/block
Block by number (latest if omitted)
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/linea-api/v1/block" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/linea-api/v1/block", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/linea-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/linea-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": {
"hash": "0x8a179935ee4cf239cd9eda93d319a4ac469c227c27e84aaca74d4e18f3cbad0d",
"miner": "0x8f81e2e3f8b46467523463835f965ffe476e1c9e",
"number": 31040546,
"gas_used": 24298,
"gas_limit": 2000000000,
"timestamp": 1781522086,
"size_bytes": 824,
"parent_hash": "0x92dc40aeb82ebd444b0bf1f31ff05635ed7081b7fa3c057c6b3a07192ed8739a",
"transaction_count": 1,
"base_fee_per_gas_wei": "7"
},
"meta": {
"timestamp": "2026-06-15T11:15:01.058Z",
"request_id": "f4a652dd-306b-4be4-bc06-93eb01a3a512"
},
"status": "ok",
"message": "Block retrieved successfully",
"success": true
}