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/xai-api

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

Verkrijg een API-sleutel

Codefragmenten

curl "https://api.oanor.com/xai-api/v1/block" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/xai-api/v1/block", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/xai-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/xai-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": "0x99103402d2089d17e803364e71f2d31ea5dd8dcd1610c2b13cccd3fc869c4f71",
            "size": 884,
            "miner": "0xA4b000000000000000000073657175656e636572",
            "height": 131028399,
            "gas_used": 86694,
            "tx_count": 2,
            "gas_limit": 1125899906842624,
            "timestamp": "2026-06-08T01:55:09.000000Z",
            "burnt_fees": "8669400000000",
            "difficulty": "1",
            "base_fee_per_gas": "100000000"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T09:51:27.181Z",
        "request_id": "de112374-48eb-4cbe-becf-84e43655bb0e"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}