getblockheader

BitcoinC1

Returns 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/rpc

Parameters

NameTypeDescription
blockhashstringThe block hash.
verbosebooleantrue 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

Bitcoin API

Top up, get a key, ship.

Self-serve. Pay in crypto or card. Metered by credits — heavy primitives cost more, simple ones are cheap.

Get API key