Aller au contenu
GET /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.

En-têtes personnalisés (facultatif)
api.oanor.com/immutable-api

Ça marche. Récupérez une clé API et utilisez-la dans votre projet.

Obtenez une clé API

Extraits de code

curl "https://api.oanor.com/immutable-api/v1/block" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/immutable-api/v1/block", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/immutable-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/immutable-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": "0x9710061e234f87e18af517e4a4bbe75a6c17f18772b6cd2ee4d0fb847eb42287",
            "size": 4916,
            "miner": "0x0000000000000000000000000000000000000000",
            "height": 39299272,
            "gas_used": 508798,
            "tx_count": 6,
            "gas_limit": 30000000,
            "timestamp": "2026-06-08T01:09:34.000000Z",
            "burnt_fees": "24931102",
            "difficulty": "2",
            "base_fee_per_gas": "49"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T01:18:04.520Z",
        "request_id": "9a74cb74-9532-4143-9ca8-390dc0408091"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}