Skip to main content

Blocks

Retrieve block headers, transaction lists, and consensus metadata for any block on XYZ Chain.

Get Latest Block

Returns the most recently finalized block.
curl http://67.205.164.156:1317/cosmos/base/tendermint/v1beta1/blocks/latest
{
  "block_id": {
    "hash": "A1B2C3D4...",
    "part_set_header": {
      "total": 1,
      "hash": "E5F6G7H8..."
    }
  },
  "block": {
    "header": {
      "chain_id": "xyz-1",
      "height": "152340",
      "time": "2026-02-19T10:00:00.000Z",
      "proposer_address": "ABC123..."
    },
    "data": {
      "txs": ["base64-encoded-tx-1", "base64-encoded-tx-2"]
    },
    "last_commit": {
      "height": "152339",
      "signatures": [...]
    }
  }
}

Key Fields

FieldDescription
block.header.chain_idChain identifier (xyz-1 for mainnet)
block.header.heightBlock number as a string
block.header.timeBlock timestamp in RFC 3339 format
block.header.proposer_addressHex-encoded address of the validator that proposed this block
block.data.txsArray of base64-encoded transactions included in this block
block.last_commit.signaturesValidator signatures from the previous block’s commit

Get Block by Height

Retrieve a specific block by its height.
curl http://67.205.164.156:1317/cosmos/base/tendermint/v1beta1/blocks/152340
The response format is identical to the latest block endpoint.

Errors

CaseResponse
Height not yet reached400 — block height is ahead of the chain
Height = 0400 — invalid height
Negative height400 — invalid argument

Useful Patterns

Check Current Block Height

curl -s http://67.205.164.156:1317/cosmos/base/tendermint/v1beta1/blocks/latest \
  | jq '.block.header.height'

Get Block Timestamp

curl -s http://67.205.164.156:1317/cosmos/base/tendermint/v1beta1/blocks/152340 \
  | jq '.block.header.time'

Count Transactions in a Block

curl -s http://67.205.164.156:1317/cosmos/base/tendermint/v1beta1/blocks/152340 \
  | jq '.block.data.txs | length'