Skip to main content

/v1/blocks/by_height/{block_height} REST API Endpoint

Retrieves a specific block's information from the Aptos blockchain network, given its height.

Updated on
Oct 04, 2023

Path Parameters

block_height
integer
REQUIRED

The height of the block to retrieve, starting from the genesis block as 0

Query Parameters

with_transactions
boolean

When set to true, all transactions are included in the block; otherwise, if not provided or set to false, no transactions will be retrieved

Returns

block_height
string

The height of the block

block_hash
string

The hash of the block at the specified height

block_timestamp
string

The time at which the block was created/added to the chain

first_version
string

The version number of the first transaction in the block

last_version
string

The version number of the last transaction in the block

transactions
array

An array containing the details of the transactions included in the block:

type
string

The type of the change

hash
string

The hash of the transaction

state_checkpoint_hash
string | null

Hash of the state checkpoint encoded in hex; null for some user transactions

sender
string

(Optional) The account from which the transaction was sent

sequence_number
string

(Optional) The sequence of a transaction sent by the specific sender

max_gas_amount
string

(Optional) The maximum amount of gas allocated for the execution of a transaction

gas_unit_price
string

(Optional) The cost per unit of gas, determining the transaction fee paid by the sender for each unit of computational resource consumed

expiration_timestamp_secs
string

(Optional) The timestamp indicating the expiration period of a transaction, specifying the time until which the transaction can be included in a block

payload
object

(Optional) The data that is being carried by a transaction. It contains the following fields:

type
string

The type of payload indicating the purpose of the data contained

function
string

The function associated with the payload

type_arguments
array

An array specifying the types of arguments provided to the function

arguments
array

An array containing the actual arguments passed to the function

signature
object

(Optional) An array with the following fields:

type
string

The type of signature used to verify the authenticity of the function

public_key
string

The public key associated with the account that generated the signature, used for verifying the signature's validity

signature
string

The actual signature generated using the private key corresponding to the public key provided

Request
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free