Skip to main content
The EventApi provides methods for querying historical events and subscribing to real-time event streams. Methods are in the sui and suix namespaces.

Event Queries

getEvents (sui namespace)

Returns events emitted by a specific transaction.
TransactionDigest
required
The transaction digest
SuiEvent[]
Array of events emitted by the transaction

queryEvents (suix namespace)

Returns a paginated list of events matching the specified filter.
EventFilter
required
The event query criteria. See Event Filters section below
EventID
Optional paging cursor
usize
Maximum number of items per page
boolean
Query result ordering (false = ascending, oldest first)
EventPage
Paginated event results

Event Subscriptions

subscribeEvent (WebSocket only)

Subscribes to a stream of Sui events matching the filter.
Event subscriptions are only available through WebSocket connections.
EventFilter
required
The filter criteria for the event stream
Subscription<SuiEvent>
Stream of matching events

Event Filters

Event filters allow you to query specific types of events:

All Events

By Transaction Digest

By Move Event Type

By Move Module

By Sender Address

By Package

By Object

Time Range

Combined Filters (AND)

Combined Filters (OR)

Event Structure

Each SuiEvent contains:

Usage Examples

Rust SDK - Query Events

Rust SDK - Subscribe to Events

TypeScript SDK - Subscribe to Events