GET
/
blocks
/
by_height
/
{block_height}
curl --request GET \
  --url https://aptos-mainnet.s.chainbase.online/{api-key}/v1/blocks/by_height/{block_height}
{
  "block_height": "32425224034",
  "block_hash": "<string>",
  "block_timestamp": "32425224034",
  "first_version": "32425224034",
  "last_version": "32425224034",
  "transactions": [
    {
      "type": "pending_transaction",
      "hash": "<string>",
      "sender": "0xc739507214d0e1bf9795485299d709e00024e92f7c0d055a4c2c39717882bdfd",
      "sequence_number": "32425224034",
      "max_gas_amount": "32425224034",
      "gas_unit_price": "32425224034",
      "expiration_timestamp_secs": "32425224034",
      "payload": {
        "type": "entry_function_payload",
        "function": "0x1::aptos_coin::transfer",
        "type_arguments": [
          "<string>"
        ],
        "arguments": [
          "<any>"
        ]
      },
      "signature": {
        "type": "ed25519_signature",
        "public_key": "0xc739507214d0e1bf9795485299d709e00024e92f7c0d055a4c2c39717882bdfd",
        "signature": "0xc739507214d0e1bf9795485299d709e00024e92f7c0d055a4c2c39717882bdfd"
      }
    }
  ]
}

Path Parameters

block_height
integer
required

Block height to lookup. Starts at 0

Query Parameters

with_transactions
boolean

If set to true, include all transactions in the block

If not provided, no transactions will be retrieved

Response

200
application/json

A Block with or without transactions

This contains the information about a transactions along with associated transactions if requested

block_height
string
required

A string containing a 64-bit unsigned integer.

We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

block_hash
string
required
block_timestamp
string
required

A string containing a 64-bit unsigned integer.

We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

first_version
string
required

A string containing a 64-bit unsigned integer.

We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

last_version
string
required

A string containing a 64-bit unsigned integer.

We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

transactions
object[]

The transactions in the block in sequential order