Skip to main content

getEvents RPC Method

Returns the filtered list of events emitted by a given ledger range.

Updated on
Feb 21, 2024

Parameters

startLedger
string
REQUIRED

The ledger sequence number after which the events is to be fetched

filters
object

The list of filters for the returned events. A maximum of 5 filters are allowed per request

type
string

A list of event type (system, contract, or diagnostic) used to filter events. If omitted, all event types will be included

contractIds
array

A list of contract ids to query for events. A maximum of 5 contract IDs are allowed per request

topics
array

A list of topic filters. A maximum of 5 filters are allowed per request. Supports "**" wildcard pattern for matching

pagination
object

The pagination object which contains the following fields:

cursor
string

When provided it excludes the element with an ID matching the cursor and only includes elements appearing after it in the response

limit
integer

The maximum number of records returned. By default, it is set to 100

Returns

result
object

A result object with the following field:

events
array

An array of event objects emitted in the specified ledger range

type
string

The type of event, for example 'contract'

ledger
integer

The ledger number in which the event occurred

ledgerClosedAt
string

The timestamp when the ledger was closed, in ISO 8601 format

contractId
string

The unique identifier of the contract associated with the event

id
string

A unique identifier for the event within the ledger

operationIndex
integer

The index of the operation within the transaction that emitted this event

transactionIndex
integer

The index of the transaction within the ledger that emitted this event

txHash
string

The transaction hash that emitted the event

inSuccessfulContractCall
boolean

(DEPRECATED) Indicates whether the event was emitted from a successful contract call

topic
array[string]

An array of base64-encoded topic values related to the event. . Supports "**" wildcard pattern for matching

value
string

The emitted body value of the event as a base64-encoded XDR

cursor
string

A pagination token that can be used to request the next page of results

latestLedger
integer

The latest observed ledger number by the node at the time of response generation

oldestLedger
integer

The oldest ledger in the response range

latestLedgerCloseTime
string

The close time of the latest ledger as a Unix timestamp string

oldestLedgerCloseTime
string

The close time of the oldest ledger as a Unix timestamp string

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