Blocks

Blocks are added every eight seconds to the blockchain by a Delegate Node. Due to network/technical errors, a Delegate might miss a block. The time between two blocks is then 16 seconds, as the round continues to the next Delegate.

All state changes to the blockchain are in the form of blocks; they contain a set of transactions and metadata. A block is rejected if one or more of the transactions is invalid; or if the metadata is invalid. Thus a block returned from the Public API is always valid.

Endpoints

List All Blocks

The Public API may be used to query for blocks. This dataset contains millions of blocks; thus for analytical purposes, we recommend you query the database directly.

Endpoint

GET

Query Parameters

Name page
Description
The number of the page that will be returned.
Required No
Example 1
Name limit
Description
The number of resources per page.
Required No
Example 100
Name offset
Description
The number of resources to be skipped.
Required No
Example
Name transform
Description
The structure of response to be retrieved.
Required No
Example
Name orderBy
Description
The column and order by which the resources will be sorted.
Required No
Example
Name id
Description
The identifier of the block to be retrieved.
Required No
Example
Name height
Description
The height of the block to be retrieved.
Required No
Example
Name height.from
Description
The height from which blocks will be retrieved.
Required No
Example
Name height.to
Description
The height to which blocks will be retrieved.
Required No
Example
Name timestamp
Description
The timestamp of the block to be retrieved.
Required No
Example
Name timestamp.from
Description
The timestamp from which blocks will be retrieved.
Required No
Example
Name timestamp.to
Description
The timestamp to which blocks will be retrieved.
Required No
Example

Retrieve first block

Retrieve first block.

Endpoint

GET

Query Parameters

Name transform
Description
The structure of response to be retrieved.
Required No
Example

Retrieve last block

Retrieve last block.

Endpoint

GET

Query Parameters

Name transform
Description
The structure of response to be retrieved.
Required No
Example

Retrieve a block

Blocks may be retrieved by ID or by height. The height is an incremental integer.

Endpoint

GET

Path Parameters

Name id
Description
The identifier of the block to be retrieved.
Required No
Example
Name height
Description
The height of the block to be retrieved.
Required No
Example

Query Parameters

Name transform
Description
The structure of response to be retrieved.
Required No
Example

List All Transactions in a Block

Instead of deserializing the block’s payload; you can also obtain the transactions of each block as proper transaction objects directly.

Endpoint

GET

Path Parameters

Name blockId
Description
The identifier of the block to be retrieved.
Required No
Example
Name height
Description
The height of the block to be retrieved.
Required No
Example

Query Parameters

Name page
Description
The number of the page that will be returned.
Required No
Example 1
Name limit
Description
The number of resources per page.
Required No
Example 100
Name offset
Description
The number of resources to be skipped.
Required No
Example
Name transform
Description
The structure of response to be retrieved.
Required No
Example
Name orderBy
Description
The column and order by which the resources will be sorted.
Required No
Example
Name id
Description
The identifier of the transaction to be retrieved.
Required No
Example
Name senderPublicKey
Description
The sender public key of the transactions to be retrieved.
Required No
Example
Name recipientId
Description
The recipient address of the transactions to be retrieved.
Required No
Example
Name vendorField
Description
The vendor field of the transactions to be retrieved.
Required No
Example
Last updated 3 years ago
Edit Page
Share: