Poll API
Last updated
Last updated
Poll API provides a stream of Doma Protocol events. These events could be used to build your own representation of Doma protocol state, analytics, or any kind of processing.
API works using Poll -> Acknowledge system. It means that to receive new events, older events should be acknowledged. Sample integration could look like this:
Call to get new events. Optional limit
and eventTypes
could be specified.
Process events (store in database, send to message queue, etc.).
Call to acknowledge last received event (you can use lastId
from response). This would acknowledge all of the events from polled batch.
Each returned event has a uniqueId
field, that can be used as an idempotency key for events processing.
Returns blockchain events that have occurred since the last acknowledged event.
Maximum number of events to return in a single response page.
Whether to return only finalized events.
true
Updates the last acknowledged event id for the client.
Last event id that was processed by the client.
No content