Home

Get blocks

GET
https://xtz.nownodes.io/chains/{chain_id}/blocks

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Lists block hashes from ' ', up to the last checkpoint, sorted with decreasing fitness. Without arguments it returns the head of the chain. Optional arguments allow to return the list of predecessors of a given block or of a set of blocks.

Parameters

chain_idstringrequiredpath

A chain identifier. This is either a chain hash in Base58Check notation or a one the predefined aliases: 'main', 'test'.

lengthstringquery

The requested number of predecessors to return (per request; see next argument).

headstringquery

block_hash (Base58Check-encoded) An empty argument requests blocks starting with the current head. A non empty list allows to request one or more specific fragments of the chain.

min_datestringquery

A date in seconds from epoch When min_date is provided, blocks with a timestamp before min_date are filtered out. However, if the length parameter is also provided, then up to that number of predecessors will be.

Response

200OK

Successful response.

400Bad Request

Invalid request.

default

Error response.