Ir al contenido
GET /v1/block

A block by height or hash

Pruébalo en vivo

10 llamadas gratis al día — sin registro, sin clave API. Pasa por el gateway de oanor.

Encabezados personalizados (opcional)
api.oanor.com/apechain-api

Funciona. Consigue una clave API y úsala en tu proyecto.

Obtener una clave API

Fragmentos de código

curl "https://api.oanor.com/apechain-api/v1/block" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/apechain-api/v1/block", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/apechain-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/apechain-api/v1/block",
    headers={"x-oanor-key": "oanor_test_..."}
)

Respuesta de ejemplo

Una respuesta real de este endpoint, capturada en la última comprobación de estado.

{
    "data": {
        "block": {
            "hash": "0x50b3bf55a959068ed832a3a4213d611b2c917527a0465b4977d0a65483f5145e",
            "size": 2007,
            "miner": "0xA4b000000000000000000073657175656e636572",
            "height": 39379419,
            "gas_used": 254365,
            "tx_count": 2,
            "gas_limit": 1125899906842624,
            "timestamp": "2026-06-08T07:03:33.000000Z",
            "burnt_fees": "25864535247400000",
            "difficulty": "1",
            "base_fee_per_gas": "101682760000"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:00.578Z",
        "request_id": "8786f1d1-c801-414e-878a-0b02709d9bcb"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}