Aller au contenu
GET /v1/block

Block by height (or latest)

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/botanix-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/botanix-api/v1/block" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/botanix-api/v1/block", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/botanix-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/botanix-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": "0x94647a146762f73da2997bf6e1fc27d16e4ff2328e278fd9974f3197b9020501",
        "miner": "0x0000000000000000000000000000000000000000",
        "number": 3000000,
        "gas_used": 309628,
        "gas_limit": 30000000,
        "timestamp": 1764267939,
        "size_bytes": 1859,
        "parent_hash": "0xe2d89b0d30967147dfc6628e38e946cf5d807fd8505fdc1b988dc59c4961109d",
        "timestamp_iso": "2025-11-27T18:25:39.000Z",
        "transaction_count": 7,
        "base_fee_per_gas_wei": "500000"
    },
    "meta": {
        "timestamp": "2026-06-15T11:14:32.749Z",
        "request_id": "3108c6c3-a886-4b70-8441-13c4a2608464"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}