Home

Get Block by Hash or Height

POST
https://ont.nownodes.io/

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Retrieves information about a specific block from the ONT blockchain. The block can be identified by either its hash or its height (block number). The response can be returned in different verbosity levels (0, 1, or 2).

Body

application/json
jsonrpcstringrequired

The JSON-RPC protocol version. Must be "2.0" for JSON-RPC 2.0 specification compliance.

methodstringrequired

The RPC method name. For this operation, it must be "getblock".

paramsArray<string | integer | integer>required

An array containing two parameters:

  1. Block hash or height (string or integer)
  2. Verbosity level (0, 1, or 2) - determines the detail level of the response
Show child attributes
One of

Block hash in hexadecimal format

string

Block height (block number)

integer

Verbosity level

integer012
idintegerrequired

A unique identifier for the request, used to correlate the response with the request.

Response

200OK

Successful response containing detailed block information.