Aller au contenu
GET /v1/block

Block details

Essayez-le en direct

10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.

En-têtes personnalisés (facultatif)
api.oanor.com/starknet-api

Ça marche. Récupérez une clé API et utilisez-la dans votre projet.

Obtenez une clé API

Extraits de code

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

Exemple de réponse

Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.

{
    "data": {
        "source": "Starknet",
        "status": "ACCEPTED_ON_L2",
        "timestamp": "2026-06-10T14:02:07.000Z",
        "block_hash": "0x7eb5a5081665a5246d3c9998923ee4c052b6cc57fcf22d839e870fd2a9e0574",
        "l1_da_mode": "BLOB",
        "parent_hash": "0x65e5058d9bab5d6681c46f9620b117e8ca78ab3323265c590b6d3122cf6ac5b",
        "block_number": 10667746,
        "starknet_version": "0.14.2",
        "sequencer_address": "0x1176a1bd84444c89232ec27754698e5d2e7e1a7f1539f12027f28b23ec9f3d8",
        "transaction_count": 23
    },
    "meta": {
        "timestamp": "2026-06-10T14:02:16.084Z",
        "request_id": "c5b0e9b3-5d89-491a-8cad-da1417fb3fc1"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}