v1

latestOpenAPI 3.0.32026-07-173986194.3 KB

Returns a list of consensus events.

get/consensus/events

Query parameters

limitinteger

The maximum numbers of items to return.

offsetinteger

The number of items to skip before starting to collect the result set.

blockinteger

A filter on block height.

tx_indexinteger

A filter on transaction index. The returned events all need to originate from a transaction that appeared in tx_index-th position in the block. It is invalid to specify this filter without also specifying a block. Specifying tx_index and block is an alternative to specifying tx_hash; either works to fetch events from a specific transaction.

tx_hashstring

A filter on the hash of the transaction that originated the events. Specifying tx_index and block is an alternative to specifying tx_hash; either works to fetch events from a specific transaction.

relstring

An Oasis-style (bech32) address.

Example:oasis1qpg2xuz46g53737343r20yxeddhlvc2ldqsjh70p

A filter on related accounts. Every returned event will refer to this account. For example, for a Transfer event, this will be the the sender or the recipient of tokens.

type'governance.proposal_executed' | 'governance.proposal_finalized' | 'governance.proposal_submitted' | 'governance.vote' | 'registry.entity' | 'registry.node_unfrozen' | 'registry.node' | 'registry.runtime' | 'registry.runtime_suspended' | 'roothash.execution_discrepancy' | 'roothash.executor_committed' | 'roothash.finalized' | 'roothash.message' | 'roothash.in_msg_processed' | 'staking.allowance_change' | 'staking.burn' | 'staking.escrow.add' | 'staking.escrow.debonding_start' | 'staking.escrow.reclaim' | 'staking.escrow.take' | 'staking.transfer'
Example:staking.escrow.take

A filter on the event type.

Response

Consensus events matching the filters, sorted by most recent first.

total_countinteger required

The total number of records that match the query, i.e. the number of records the query would return with limit=infinity.

is_total_count_clippedboolean required

Whether total_count is clipped for performance reasons.

Example response

{
  "total_count": 412,
  "is_total_count_clipped": true,
  "events": [
    {
      "block": 8048956,
      "tx_index": 5,
      "tx_hash": "0d0531d6b8a468c07440182b1cdda517f5a076d69fb2199126a83082ecfc0f41",
      "roothash_runtime_id": "000000000000000000000000000000000000000000000000e2eaa99fc008f87f",
      "timestamp": "2022-03-01T00:00:00Z",
      "type": "staking.escrow.take"
    }
  ]
}