Naar de inhoud
GET /v1/block

Block by height (or latest)

Probeer het live

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

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

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

Verkrijg een API-sleutel

Codefragmenten

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

Voorbeeldrespons

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

{
    "data": {
        "hash": "0x97e6f50bc03601d18ba7f690cf6b23eaa2e6057b3acc3b3f3ad52b1b4fa3ded1",
        "miner": "0x4200000000000000000000000000000000000011",
        "number": 10000000,
        "gas_used": 206331,
        "gas_limit": 30000000,
        "timestamp": 1733163786,
        "size_bytes": 1101,
        "parent_hash": "0x2742b67e4be02079d1364ec512659066fd9fa090e10abc5f70b7d028c636f84b",
        "timestamp_iso": "2024-12-02T18:23:06.000Z",
        "transaction_count": 3,
        "base_fee_per_gas_wei": "252"
    },
    "meta": {
        "timestamp": "2026-06-15T11:14:34.898Z",
        "request_id": "674098d9-8d77-43c5-8a6c-2e689cf99cd8"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}