Home

getblockhash

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Returns the block hash of the block at the given height in the blockchain. You must provide a block height (0-based index).

Body

application/json

Returns the block hash of the block at the given height in the blockchain. You must provide a block height (0-based index).

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.

methodstringgetblockhashrequired

JSON-RPC method name.

paramsArray<integer>required

Parameters:

  1. height (integer) — The height (index) of the block.

Response

200OK

Block hash successfully retrieved

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