Everything you need to build powerful applications on Sui
Choose your protocol. WebSocket (recommended) for exactly-once delivery with client ACKs. SSE for simplicity and browser support.
Connect from anywhere - browser, server, or mobile. No need to expose a public HTTPS endpoint like webhooks.
Resume from where you left off with lastEventId. Missed events are automatically replayed on reconnect.
Stream events, address activity, coin balance changes, or object mutations. Same powerful filters as webhooks.
Persistent connection means events arrive faster than webhook HTTP requests. Ideal for real-time UIs.
WebSocket with client ACKs enables exactly-once delivery for critical operations. SSE provides at-least-once delivery.
Get up and running in minutes
// Use mainnet-api or testnet-api based on your project
// WebSocket Connection (recommended, exactly-once delivery)
const ws = new WebSocket(
`wss://mainnet-api.inodra.com/v1/warp/${streamId}/ws?api_key=${apiKey}`
)
ws.onmessage = (event) => {
const msg = JSON.parse(event.data)
console.log('Event:', msg.data.type, msg.data.txDigest)
// Send ACK for exactly-once delivery
if (msg.id) {
ws.send(JSON.stringify({ type: 'ack', id: msg.id }))
}
}
// SSE Connection
const res = await fetch(`https://mainnet-api.inodra.com/v1/warp/${streamId}/stream`, {
headers: { 'x-api-key': apiKey }
})
for await (const chunk of res.body) {
// Parse SSE events...
}