Vai al contenuto
GET /v1/block

Block by height (or latest)

Provalo dal vivo

10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.

Intestazioni personalizzate (facoltative)
api.oanor.com/sapphire-api

Funziona. Prendi una chiave API e usala nel tuo progetto.

Ottieni una chiave API

Frammenti di codice

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

Risposta di esempio

Una risposta reale di questo endpoint, acquisita dall'ultimo health check.

{
    "data": {
        "hash": "0x73078e1484f34ea7282a9b97a3f50ddf82d801f4eb413f0de0a7d4cae70cff45",
        "miner": "0x0000000000000000000000000000000088888888",
        "number": 5000000,
        "gas_used": 520788,
        "gas_limit": 15000000,
        "timestamp": 1723603297,
        "size_bytes": 7033,
        "parent_hash": "0xb7afe26ed828b639bac72c145afdce296d3d15cec79b619ab0346748910fbec5",
        "timestamp_iso": "2024-08-14T02:41:37.000Z",
        "transaction_count": 7,
        "base_fee_per_gas_wei": null
    },
    "meta": {
        "timestamp": "2026-06-15T20:41:13.542Z",
        "request_id": "44950adb-70dc-48f1-b4de-de2c1f76089a"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}