Aller au contenu
GET /v1/blocks

Latest blocks

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/xai-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/xai-api/v1/blocks" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/xai-api/v1/blocks", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/xai-api/v1/blocks");
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/blocks",
    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": {
        "count": 50,
        "blocks": [
            {
                "hash": "0x2a51832900a652561df7d2ef0ab328bbca0527a1fc127276608f6d63b9a562a6",
                "size": 1250,
                "miner": "0xA4b000000000000000000073657175656e636572",
                "height": 131049285,
                "gas_used": 260082,
                "tx_count": 4,
                "gas_limit": 1125899906842624,
                "timestamp": "2026-06-08T09:51:15.000000Z",
                "burnt_fees": "26008200000000",
                "difficulty": "1",
                "base_fee_per_gas": "100000000"
            },
            {
                "hash": "0x687527d0299701b08d7d39cb574f39d2fd663efbaeba5ba12340efb45b134abf",
                "size": 884,
                "miner": "0xA4b000000000000000000073657175656e636572",
                "height": 131049284,
                "gas_used": 86694,
                "tx_count": 2,
                "gas_limit": 1125899906842624,
                "timestamp": "2026-06-08T09:51:15.000000Z",
                "burnt_fees": "8669400000000",
                "difficulty": "1",
                "base_fee_per_gas": "100000000"
            },
            {
                "hash": "0x091ea872525d61ea10af902382d8c14f3f4a35f5d3fabbee3613bd6764607c05",
                "size": 884,
                "miner": "0xA4b000000000000000000073657175656e636572",
                "height": 131049283,
                "gas_used": 86694,
                "tx_count": 2,
                "gas_limit": 1125899906842624,
                "timestamp": "2026-06-08T09:51:15.000000Z",
                "burnt_fees": "8669400000000",
                "difficulty": "1",
                "base_fee_per_gas": "100000000"
            },
            {
                "hash": "0x13afc4ac44d962d10670d52f6f6e24a089a6ac456caabedbfc192b32bb02f316",
                "size": 1250,
                "miner": "0xA4b000000000000000000073657175656e636572",
                "height": 131049282,
                "gas_used": 260082,
                "tx_count": 4,
                "gas_limit": 1125899906842624,
                "timestamp": "2026-06-08T09:51:14.000000Z",
                "burnt_fees": "26008200000000",
                "difficulty": "1",
                "base_fee_per_gas": "100000000"
            },
            {
                "hash": "0x887463d6d36a57c700b6bf3797eec3aff83846b004562174df79f34df84a0884",
                "size": 884,
                "miner": "0xA4b000000000000000000073657175656e636572",
                "height": 131049281,
                "gas_used": 86694,
                "tx_count": 2,
                "gas_limit": 1125899906842624,
                "timestamp": "2026-06-08T09:51:14.000000Z",
                "burnt_fees": "8669400000000",
                "difficulty": "1",
                "base_fee_per_gas": "100000000"
            },
            {
                "hash": "0xa91d6f5687fd8aaa904aefdc501b36ee7cef923fd3efb079f960172f4604e23a",
              
…