searchForBlockHeaders | Algorand Developer Portal

searchForBlockHeaders

GET

/v2/block-headers

Search for block headers. Block headers are returned in ascending round order. Transactions are not included in the output.

Parameters

Query Parameters

limit
integer
Maximum number of results to return. There could be additional pages even if the limit is not reached.

next
string
The next page of results. Use the next token provided by the previous results.

min-round
integer
Include results at or after the specified min-round.

max-round
integer
Include results at or before the specified max-round.

before-time
string format: date-time
Include results before the given time. Must be an RFC 3339 formatted string.

after-time
string format: date-time
Include results after the given time. Must be an RFC 3339 formatted string.

proposers
Array
Accounts marked as proposer in the block header’s participation updates. This parameter accepts a comma separated list of addresses.

expired
Array
Accounts marked as expired in the block header’s participation updates. This parameter accepts a comma separated list of addresses.

absent
Array
Accounts marked as absent in the block header’s participation updates. This parameter accepts a comma separated list of addresses.

Responses

200

(empty)

Select media type application/json

object

blocks
required
Array
Block information.

bonus
The potential bonus payout for this block.

integer

fees-collected
The sum of all fees paid by transactions in this block.

integer

genesis-hash
required
[gh] hash to which this block belongs.

string format: byte

genesis-id
required
[gen] ID to which this block belongs.

string

participation-updates
Participation account data that needs to be checked/acted on by the network.

object

absent-participation-accounts
[partupabs] a list of online accounts that need to be suspended.

Array

expired-participation-accounts
[partupdrmv] a list of online accounts that needs to be converted to offline since their participation key expired.

Array

previous-block-hash
required
[prev] Previous block hash.

string format: byte

previous-block-hash-512
[prev512] Previous block hash, using SHA-512.

string format: byte

proposer
The proposer of this block.

string

proposer-payout
The actual amount transferred to the proposer from the fee sink.

integer

rewards
Fields relating to rewards,

object

fee-sink
required
[fees] accepts transaction fees, it can only spend to the incentive pool.

string

rewards-calculation-round
required
[rwcalr] number of leftover MicroAlgos after the distribution of rewards-rate MicroAlgos for every reward unit in the next round.

integer

rewards-level
required
[earn] How many rewards, in MicroAlgos, have been distributed to each RewardUnit of MicroAlgos since genesis.

integer

rewards-pool
required
[rwd] accepts periodic injections from the fee-sink and continually redistributes them as rewards.

string

rewards-rate
required
[rate] Number of new MicroAlgos added to the participation stake from rewards at the next round.

integer

rewards-residue
required
[frac] Number of leftover MicroAlgos after the distribution of RewardsRate/rewardUnits MicroAlgos for every reward unit in the next round.

integer

round
required
[rnd] Current round on which this block was appended to the chain.

integer

seed
required
[seed] Sortition seed.

string format: byte

state-proof-tracking
Tracks the status of state proofs.

Array

next-round
[n] Next round for which we will accept a state proof transaction.

integer

online-total-weight
[t] The total number of microalgos held by the online accounts during the StateProof round.

integer

type
State Proof Type. Note the raw object uses map with this as key.

integer

voters-commitment
[v] Root of a vector commitment containing online accounts that will help sign the proof.

string format: byte

timestamp
required
[ts] Block creation timestamp in seconds since eposh

integer

transactions
[txns] list of transactions corresponding to a given round.

Array

application-transaction
Fields for application transactions.

object

access
[al] Access unifies accounts, foreign-apps, foreign-assets, and box-references under a single list. If access is non-empty, these lists must be empty. If access is empty, those lists may be non-empty.

Array

address
[d] Account whose balance record is accessible by the executing ApprovalProgram or ClearStateProgram.

string

application-id
[p] Application id whose GlobalState may be read by the executing ApprovalProgram or ClearStateProgram.

integer

asset-id
[s] Asset whose AssetParams may be read by the executing ApprovalProgram or ClearStateProgram.

integer

box
BoxReference names a box by its name and the application ID it belongs to.

object

app
Application ID to which the box belongs, or zero if referring to the called application.

integer

name
Base64 encoded box name

string format: byte

holding
HoldingRef names a holding by referring to an Address and Asset it belongs to.

object

address
[d] Address in access list, or the sender of the transaction.

string

asset
[s] Asset ID for asset in access list.

integer

local
LocalsRef names a local state by referring to an Address and App it belongs to.

object

address
[d] Address in access list, or the sender of the transaction.

string

app
[p] Application ID for app in access list, or zero if referring to the called application.

integer

accounts
[apat] List of accounts in addition to the sender that may be accessed from the application’s approval-program and clear-state-program.

Array

application-args
[apaa] transaction specific arguments accessed from the application’s approval-program and clear-state-program.

Array

application-id
required
[apid] ID of the application being configured or empty if creating.

integer

approval-program
[apap] Logic executed for every application transaction, except when on-completion is set to “clear”. It can read and write global state for the application, as well as account-specific local state. Approval programs may reject the transaction.

string format: byte

box-references
[apbx] the boxes that can be accessed by this transaction (and others in the same group).

Array

app
required
Application ID to which the box belongs, or zero if referring to the called application.

integer

name
required
Base64 encoded box name

string format: byte

clear-state-program
[apsu] Logic executed for application transactions with on-completion set to “clear”. It can read and write global state for the application, as well as account-specific local state. Clear state programs cannot reject the transaction.

string format: byte

extra-program-pages
[epp] specifies the additional app program len requested in pages.

integer

foreign-apps
[apfa] Lists the applications in addition to the application-id whose global states may be accessed by this application’s approval-program and clear-state-program. The access is read-only.

Array

foreign-assets
[apas] lists the assets whose parameters may be accessed by this application’s ApprovalProgram and ClearStateProgram. The access is read-only.

Array

global-state-schema
Represents a [apls] local-state or [apgs] global-state schema. These schemas determine how much storage may be used in a local-state or global-state for an application. The more space used, the larger minimum balance must be maintained in the account holding the data.

object

num-byte-slice
required
Maximum number of TEAL byte slices that may be stored in the key/value store.

integer

num-uint
required
Maximum number of TEAL uints that may be stored in the key/value store.

integer

local-state-schema
Represents a [apls] local-state or [apgs] global-state schema. These schemas determine how much storage may be used in a local-state or global-state for an application. The more space used, the larger minimum balance must be maintained in the account holding the data.

object

num-byte-slice
required
Maximum number of TEAL byte slices that may be stored in the key/value store.

integer

num-uint
required
Maximum number of TEAL uints that may be stored in the key/value store.

integer

on-completion
required
[apan] defines the what additional actions occur with the transaction.

Valid types:

  • noop
  • optin
  • closeout
  • clear
  • update
  • update
  • delete

string

Allowed values: noop optin closeout clear update delete

reject-version
[aprv] the lowest application version for which this transaction should immediately fail. 0 indicates that no version check should be performed.

integer

asset-config-transaction
Fields for asset allocation, re-configuration, and destruction.

A zero value for asset-id indicates asset creation.

object

asset-id
[xaid] ID of the asset being configured or empty if creating.

integer

params
AssetParams specifies the parameters for an asset.

[apar] when part of an AssetConfig transaction.

object

clawback
Address of account used to clawback holdings of this asset. If empty, clawback is not permitted.

string

creator
required
The address that created this asset. This is the address where the parameters for this asset can be found, and also the address where unwanted asset units can be sent in the worst case.

string

decimals
required
The number of digits to use after the decimal point when displaying this asset. If 0, the asset is not divisible. If 1, the base unit of the asset is in tenths. If 2, the base unit of the asset is in hundredths, and so on. This value must be between 0 and 19 (inclusive).

integer

<= 19

default-frozen
Whether holdings of this asset are frozen by default.

boolean

freeze
Address of account used to freeze holdings of this asset. If empty, freezing is not permitted.

string

manager
Address of account used to manage the keys of this asset and to destroy it.

string

metadata-hash
A commitment to some unspecified asset metadata. The format of this metadata is up to the application.

string format: byte

name
Name of this asset, as supplied by the creator. Included only when the asset name is composed of printable utf-8 characters.

string

name-b64
Base64 encoded name of this asset, as supplied by the creator.

string format: byte

reserve
Address of account holding reserve (non-minted) units of this asset.

string

total
required
The total number of units of this asset.

integer

unit-name
Name of a unit of this asset, as supplied by the creator. Included only when the name of a unit of this asset is composed of printable utf-8 characters.

string

unit-name-b64
Base64 encoded name of a unit of this asset, as supplied by the creator.

string format: byte

url
URL where more information about the asset can be retrieved. Included only when the URL is composed of printable utf-8 characters.

string

url-b64
Base64 encoded URL where more information about the asset can be retrieved.

string format: byte

asset-freeze-transaction
Fields for an asset freeze transaction.

object

address
required
[fadd] Address of the account whose asset is being frozen or thawed.

string

asset-id
required
[faid] ID of the asset being frozen or thawed.

integer

new-freeze-status
required
[afrz] The new freeze status.

boolean

asset-transfer-transaction
Fields for an asset transfer transaction.

object

amount
required
[aamt] Amount of asset to transfer. A zero amount transferred to self allocates that asset in the account’s Assets map.

integer

asset-id
required
[xaid] ID of the asset being transferred.

integer

close-amount
Number of assets transferred to the close-to account as part of the transaction.

integer

close-to
[aclose] Indicates that the asset should be removed from the account’s Assets map, and specifies where the remaining asset holdings should be transferred. It’s always valid to transfer remaining asset holdings to the creator account.

string

receiver
required
[arcv] Recipient address of the transfer.

string

sender
[asnd] The effective sender during a clawback transactions. If this is not a zero value, the real transaction sender must be the Clawback address from the AssetParams.

string

auth-addr
[sgnr] this is included with signed transactions when the signing address does not equal the sender. The backend can use this to ensure that auth addr is equal to the accounts auth addr.

string

close-rewards
[rc] rewards applied to close-remainder-to account.

integer

closing-amount
[ca] closing amount for transaction.

integer

confirmed-round
Round when the transaction was confirmed.

integer

created-application-index
Specifies an application index (ID) if an application was created with this transaction.

integer

created-asset-index
Specifies an asset index (ID) if an asset was created with this transaction.

integer

fee
required
[fee] Transaction fee.

integer

first-valid
required
[fv] First valid round for this transaction.

integer

genesis-hash
[gh] Hash of genesis block.

string format: byte

genesis-id
[gen] genesis block ID.

string

global-state-delta
Application state delta.

Array

key
required
string

value
required
Represents a TEAL value delta.

object

action
required
[at] delta action.

integer

bytes
[bs] bytes value.

string

uint
[ui] uint value.

integer

group
[grp] Base64 encoded byte array of a sha512/256 digest. When present indicates that this transaction is part of a transaction group and the value is the sha512/256 hash of the transactions in that group.

string format: byte

heartbeat-transaction
Fields for a heartbeat transaction.

object

hb-address
required
[hbad] HbAddress is the account this txn is proving onlineness for.

string

hb-key-dilution
required
[hbkd] HbKeyDilution must match HbAddress account’s current KeyDilution.

integer

hb-proof
required
[hbprf] HbProof is a signature using HeartbeatAddress’s partkey, thereby showing it is online.

object

hb-pk
[p] Public key of the heartbeat message.

string format: byte

hb-pk1sig
[p1s] Signature of OneTimeSignatureSubkeyOffsetID(PK, Batch, Offset) under the key PK2.

string format: byte

hb-pk2
[p2] Key for new-style two-level ephemeral signature.

string format: byte

hb-pk2sig
[p2s] Signature of OneTimeSignatureSubkeyBatchID(PK2, Batch) under the master key (OneTimeSignatureVerifier).

string format: byte

hb-sig
[s] Signature of the heartbeat message.

string format: byte

hb-seed
required
[hbsd] HbSeed must be the block seed for the this transaction’s firstValid block.

string format: byte

hb-vote-id
required
[hbvid] HbVoteID must match the HbAddress account’s current VoteID.

string format: byte

id
Transaction ID

string

inner-txns
Array recursive

intra-round-offset
Offset into the round where this transaction was confirmed.

integer

keyreg-transaction
Fields for a keyreg transaction.

object

non-participation
[nonpart] Mark the account as participating or non-participating.

boolean

selection-participation-key
[selkey] Public key used with the Verified Random Function (VRF) result during committee selection.

string format: byte

state-proof-key
[sprfkey] State proof key used in key registration transactions.

string format: byte

vote-first-valid
[votefst] First round this participation key is valid.

integer

vote-key-dilution
[votekd] Number of subkeys in each batch of participation keys.

integer

vote-last-valid
[votelst] Last round this participation key is valid.

integer

vote-participation-key
[votekey] Participation public key used in key registration transactions.

string format: byte

last-valid
required
[lv] Last valid round for this transaction.

integer

lease
[lx] Base64 encoded 32-byte array. Lease enforces mutual exclusion of transactions. If this field is nonzero, then once the transaction is confirmed, it acquires the lease identified by the (Sender, Lease) pair of the transaction until the LastValid round passes. While this transaction possesses the lease, no other transaction specifying this lease can be confirmed.

string format: byte

local-state-delta
[ld] Local state key/value changes for the application being executed by this transaction.

Array

address
required
string

delta
required
Application state delta.

Array

key
required
string

value
required
Represents a TEAL value delta.

object

action
required
[at] delta action.

integer

bytes
[bs] bytes value.

string

uint
[ui] uint value.

integer

logs
[lg] Logs for the application being executed by this transaction.

Array

note
[note] Free form data.

string format: byte

payment-transaction
Fields for a payment transaction.

object

amount
required
[amt] number of MicroAlgos intended to be transferred.

integer

close-amount
Number of MicroAlgos that were sent to the close-remainder-to address when closing the sender account.

integer

close-remainder-to
[close] when set, indicates that the sending account should be closed and all remaining funds be transferred to this address.

string

receiver
required
[rcv] receiver’s address.

string

receiver-rewards
[rr] rewards applied to receiver account.

integer

rekey-to
[rekey] when included in a valid transaction, the accounts auth addr will be updated with this value and future signatures must be signed with the key represented by this address.

string

round-time
Time when the block this transaction is in was confirmed.

integer

sender
required
[snd] Sender’s address.

string

sender-rewards
[rs] rewards applied to sender account.

integer

signature
Validation signature associated with some data. Only one of the signatures should be provided.

object

logicsig
[lsig] Programatic transaction signature.

object

args
[arg] Logic arguments, base64 encoded.

Array

logic
required
[l] Program signed by a signature or multi signature, or hashed to be the address of ana ccount. Base64 encoded TEAL program.

string format: byte

logic-multisig-signature
Structure holding multiple subsignatures.

object

subsignature
[subsig] holds pairs of public key and signatures.

Array

public-key
[pk]

string format: byte

signature
[s]

string format: byte

threshold
[thr]

integer

version
[v]

integer

multisig-signature
Structure holding multiple subsignatures.

object

subsignature
[subsig] holds pairs of public key and signatures.

Array

public-key
[pk]

string format: byte

signature
[s]

string format: byte

threshold
[thr]

integer

version
[v]

integer

signature
[sig] ed25519 signature.

string format: byte

state-proof-transaction
Fields for a state proof transaction.

object

message
object

block-headers-commitment
[b]

string format: byte

first-attested-round
[f]

integer

latest-attested-round
[l]

integer

ln-proven-weight
[P]

integer

voters-commitment
[v]

string format: byte

state-proof
[sp] represents a state proof.

object

part-proofs
object

hash-factory
object

hash-type
[t]

integer

path
[pth]

Array

tree-depth
[td]

integer

positions-to-reveal
[pr] Sequence of reveal positions.

Array

reveals
[r] Note that this is actually stored as a map[uint64] - Reveal in the actual msgp

Array

participant
object

verifier
object

commitment
[cmt] Represents the root of the vector commitment tree.

string format: byte

key-lifetime
[lf] Key lifetime.

integer

weight
[w]

integer

position
The position in the signature and participants arrays corresponding to this entry.

integer

sig-slot
object

lower-sig-weight
[l] The total weight of signatures in the lower-numbered slots.

integer

signature
object

falcon-signature
string format: byte

merkle-array-index
integer

proof
object

hash-factory
object

hash-type
[t]

integer

path
[pth]

Array

tree-depth
[td]

integer

verifying-key
[vkey]

string format: byte

salt-version
[v]

integer

sig-commit
[c]

string format: byte

sig-proofs
object

hash-factory
object

hash-type
[t]

integer

path
[pth]

Array

tree-depth
[td]

integer

signed-weight
[w]

integer

state-proof-type
[sptype] Type of the state proof. Integer representing an entry defined in protocol/stateproof.go

integer

tx-type
required
[type] Indicates what type of transaction this is. Different types have different fields.

Valid types, and where their fields are stored:

  • [pay] payment-transaction
  • [keyreg] keyreg-transaction
  • [acfg] asset-config-transaction
  • [axfer] asset-transfer-transaction
  • [afrz] asset-freeze-transaction
  • [appl] application-transaction
  • [stpf] state-proof-transaction
  • [hb] heartbeat-transaction

string

Allowed values: pay keyreg acfg axfer afrz appl stpf hb

transactions-root
required
[txn] TransactionsRoot authenticates the set of transactions appearing in the block. More specifically, it’s the root of a merkle tree whose leaves are the block’s Txids, in lexicographic order. For the empty block, it’s 0. Note that the TxnRoot does not authenticate the signatures on the transactions, only the transactions themselves. Two blocks with the same transactions but in a different order and with different signatures will have the same TxnRoot.

string format: byte

transactions-root-sha256
required
[txn256] TransactionsRootSHA256 is an auxiliary TransactionRoot, built using a vector commitment instead of a merkle tree, and SHA256 hash function instead of the default SHA512_256. This commitment can be used on environments where only the SHA256 function exists.

string format: byte

transactions-root-sha512
[txn512] TransactionsRootSHA512 is an auxiliary TransactionRoot, built using a vector commitment instead of a merkle tree, and SHA512 hash function instead of the default SHA512_256.

string format: byte

txn-counter
[tc] TxnCounter counts the number of transactions committed in the ledger, from the time at which support for this feature was introduced.

integer

upgrade-state
Fields relating to a protocol upgrade.

object

current-protocol
required
[proto] The current protocol version.

string

next-protocol
[nextproto] The next proposed protocol version.

string

next-protocol-approvals
[nextyes] Number of blocks which approved the protocol upgrade.

integer

next-protocol-switch-on
[nextswitch] Round on which the protocol upgrade will take effect.

integer

next-protocol-vote-before
[nextbefore] Deadline round for this protocol upgrade (No votes will be consider after this round).

integer

upgrade-vote
Fields relating to voting for a protocol upgrade.

object

upgrade-approve
[upgradeyes] Indicates a yes vote for the current proposal.

boolean

upgrade-delay
[upgradedelay] Indicates the time between acceptance and execution.

integer

upgrade-propose
[upgradeprop] Indicates a proposed upgrade.

string

current-round
required
Round at which the results were computed.

integer

next-token
Used for pagination, when making another request provide this token with the next parameter.

string

404

Response for errors

Select media type application/json

object

data
object

message
required

string

500

Response for errors

Select media type application/json

object

data
object

message
required

string