Aller au contenu
GET /v1/block

One block by height or hash

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/bitcoin-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/bitcoin-api/v1/block" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/bitcoin-api/v1/block", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/bitcoin-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/bitcoin-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": {
        "block": {
            "hash": "0000000000000000000590fc0f3eba193a278534220b2b37e9849e1a770ca959",
            "pool": null,
            "size": 1276422,
            "nonce": 2881644503,
            "height": 700000,
            "weight": 3998094,
            "tx_count": 1276,
            "timestamp": 1631333672,
            "difficulty": 18415156832118.24,
            "median_fee": null,
            "reward_btc": null,
            "merkle_root": "1f8d213c864bfe9fb0098cecc3165cce407de88413741b0300d56ea0f4ec9c65",
            "reward_sats": null,
            "total_fees_sats": null
        }
    },
    "meta": {
        "timestamp": "2026-06-01T00:03:50.649Z",
        "request_id": "8689785e-f912-41ce-8e75-c73b2be37f93"
    },
    "status": "ok",
    "message": "Block retrieved",
    "success": true
}