Skip to content

Events API

Used to subscribe to real-time event updates from the Snapchain node

API

Method NameRequest TypeResponse TypeDescription
SubscribeSubscribeRequeststream HubEventStreams new Events as they occur
GetEventEventRequestHubEventReturns a single event by ID
GetEventsEventsRequestEventsResponseReturns a paginated list of events

SubscribeRequest

FieldTypeLabelDescription
event_typesHubEventTyperepeatedTypes of events to subscribe to
from_iduint64optionalEvent ID to start streaming from
shard_indexuint32optionalShard index to subscribe to

EventRequest

FieldTypeLabelDescription
iduint64Event ID to retrieve
shard_indexuint32Shard index for the event

EventsRequest

FieldTypeLabelDescription
start_iduint64Starting event ID
shard_indexuint32optionalShard index to query
stop_iduint64optionalStopping event ID
page_sizeuint32optionalNumber of events to return per page
page_tokenbytesoptionalPage token for pagination
reversebooloptionalWhether to return events in reverse order

EventsResponse

FieldTypeLabelDescription
eventsHubEventrepeatedList of events
next_page_tokenbytesoptionalToken for next page of results