GetBlock - Algorand

Get the block for the given round.

Endpoint

httpGET /v2/blocks/{round}

Path Parameters

ParameterTypeRequiredDescription
roundintegerYesA round number.

Query Parameters

ParameterTypeRequiredDescription
header-onlybooleanOptionalIf true, only the block header (exclusive of payset or certificate) may be included in response.
formatstringOptionalConfigures whether the response object is JSON or MessagePack encoded. If not provided, defaults to JSON.

Example

bashexport ALGO_ALGOD=https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/

curl "${ALGO_ALGOD}v2/blocks/REPLACE_ROUND"

Response

Returns application/json. Top-level fields:

FieldTypeDescription
blockobjectBlock header data.
certobjectOptional certificate object. This is only included when the format is set to message pack.

Error Handling

ErrorMessageDescription
400Bad requestA parameter was missing or malformed
404Not foundThe requested resource does not exist
403 / RBAC: access deniedAccess deniedThe GetBlock access token is missing or incorrect