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/moonbeam-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/moonbeam-api/v1/block" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/moonbeam-api/v1/block", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/moonbeam-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/moonbeam-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": "0x36a0e02e7e3e357c8f0bd4ead77d89a4a8914d6ebded2d2ab5c6b6bc30f157ed",
        "miner": "0xf02ddb48eda520c915c0dabadc70ba12d1b49ad2",
        "number": 5000000,
        "gas_used": 569321,
        "gas_limit": 15000000,
        "timestamp": 1701590106,
        "size_bytes": 2544,
        "parent_hash": "0xd764eff975911b9fd16afff34a49b6220c1a205cf95b7d37d785219d9e62a877",
        "timestamp_iso": "2023-12-03T07:55:06.000Z",
        "transaction_count": 7,
        "base_fee_per_gas_wei": "125000000000"
    },
    "meta": {
        "timestamp": "2026-06-15T20:41:10.964Z",
        "request_id": "f3e2633c-0d0f-4121-8c89-0a806968a10e"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}