Naar de inhoud
GET /v1/block

A block by height or hash

Probeer het live

10 gratis calls per dag — geen registratie, geen API-key. Loopt via de oanor-gateway.

Aangepaste headers (optioneel)
api.oanor.com/energyweb-api

Het werkt. Haal een API-key op en gebruik hem in je project.

Verkrijg een API-sleutel

Codefragmenten

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

Voorbeeldrespons

Een echte respons van dit endpoint, vastgelegd bij de laatste health check.

{
    "data": {
        "block": {
            "hash": "0xc09f705e146e92c4648f5386e1db9fd4306d3d7af630b561f9627c56806103da",
            "size": 751,
            "miner": "0xc56B672Afd3FAE873bf8A40bbE80f51075b187CA",
            "height": 41254767,
            "reward": "399123746012",
            "gas_used": 36284,
            "tx_count": 1,
            "gas_limit": 8000000,
            "timestamp": "2026-06-08T05:10:00.000000Z",
            "burnt_fees": "253988",
            "difficulty": "340282366920938463463374607431768211454",
            "base_fee_per_gas": "7"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:49:48.613Z",
        "request_id": "7d3da6ff-af1a-4ce4-a77c-b6b1f14dd651"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}