Zum Inhalt springen
GET /v1/block

Block by height (or latest)

Live testen

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

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

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

API-Key holen

Code-Snippets

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

Beispiel-Response

Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.

{
    "data": {
        "hash": "0x1544983c82f62ea82579153f59edd6d93050f56a2e93163ef04c510b4b84a7a1",
        "miner": "0xa4b000000000000000000073657175656e636572",
        "number": 10000000,
        "gas_used": 54452,
        "gas_limit": 1125899906842624,
        "timestamp": 1728470060,
        "size_bytes": 1069,
        "parent_hash": "0xe74d3d53bea729f5037f0d27cd05d5721c2e518c07beda1ac01d0c13c144a6f8",
        "timestamp_iso": "2024-10-09T10:34:20.000Z",
        "transaction_count": 2,
        "base_fee_per_gas_wei": "1800000000000"
    },
    "meta": {
        "timestamp": "2026-06-15T20:41:19.236Z",
        "request_id": "aa3e1164-f844-4e40-8cfa-e396ed169c45"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}