Home

getblockheader

POST
https://btc-testnet.nownodes.io/

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Returns information about the block header given a block hash. You can specify whether to return a JSON object or raw hex-encoded string using the verbose flag.

Body

application/json

Returns information about the block header given a block hash. You can specify whether to return a JSON object or raw hex-encoded string using the verbose flag.

Request payload containing the documented method parameters and client request identifier.

jsonrpcstringrequired

JSON-RPC protocol version.

idstringrequired

Client-provided request identifier echoed in the response.

methodstringgetblockheaderrequired

JSON-RPC method name.

paramsArray<string | boolean>required

Parameters:

  1. blockhash (string) — The hash of the block.
  2. verbose (boolean, optional) — If true, returns a JSON object; if false, returns a hex string. Default is true.
Show child attributes

Single entry in the params array.

One of

JSON-RPC method parameters.

string

JSON-RPC method parameters.

boolean

Response

200OK

Block header information retrieved successfully

401Unauthorized

Unauthorized: API key is present but rejected by the NOWNodes gateway.

405Method Not Allowed

Method Not Allowed. Returned by the NOWNodes gateway for malformed or unsupported gateway-level requests.

422Unprocessable Entity

Missing API key. The NOWNodes gateway returns plain text for this error.

500Internal Server Error

Internal Server Error