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/reya-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/reya-api/v1/block" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/reya-api/v1/block", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/reya-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/reya-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": "0xee9ac2c1b1ee36e4ee6c4e7eecffc6af7509f3d457639520b19e4ae782102609",
            "size": 47571,
            "miner": "0xA4b000000000000000000073657175656e636572",
            "height": 153533149,
            "gas_used": 3604746,
            "tx_count": 2,
            "gas_limit": 1125899906842624,
            "timestamp": "2026-06-08T07:17:37.000000Z",
            "burnt_fees": "360474600000",
            "difficulty": "1",
            "base_fee_per_gas": "100000"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:48:54.219Z",
        "request_id": "84395a9c-ba8d-49d5-8b88-20e1f9368fe7"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}