getblockheader
BitcoinC1Returns just the header fields for a block hash — cheaper than getblock when you only need height, time, bits and previous hash.
Endpoint
POST https://api.1st-node.com/v1/bitcoin/rpcParameters
| Name | Type | Description |
|---|---|---|
| blockhash | string | The block hash. |
| verbose | boolean | true for decoded JSON, false for hex. |
Returns
object — the decoded block header.
Request
curl https://api.1st-node.com/v1/bitcoin/rpc \
-H "Authorization: Bearer $ONE_KEY" \
-H "content-type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getblockheader",
"params": ["00000000000000000000f1c7…", true]
}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getblockheader",
"params": ["00000000000000000000f1c7…", true]
}Response
{
"jsonrpc": "2.0",
"id": 1,
"result": { "height": 854120, "time": 1721400000, "previousblockhash": "…" }
}More blocks methods on Bitcoin
充值、拿密钥、上线。
自助开通。支持加密货币或银行卡。按额度计费——重型原语更贵,简单调用很便宜。
获取 API 密钥