Zum Inhalt springen
GET /v1/block

A block by height or hash

Live testen

10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.

Eigene Header (optional)
api.oanor.com/xai-api

Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.

API-Key holen

Code-Snippets

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_..."}
)

Beispiel-Response

Echte Antwort dieses Endpoints, erfasst beim letzten 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
}