Quickstart
Index your first Sui package and stream typed events in under five minutes.
1. Create an API key
Sign in to the console and open Indexer → API Keys. Keys are scoped to this project — every key resolves all registered packages and shares the project rate quota. The key is shown once at creation — copy it into WALOS_KEY in your environment.
2. Add your first package
Open Indexer → Packages → Register, paste the Sui package id, and confirm. Walos pulls the on-chain ABI and starts indexing on the next checkpoint; the backfill is queued immediately and the package status movespending → running → done as the indexer catches up from the verified publish checkpoint.
Prefer the CLI? Install @walos/cli, sign in once, and register an already-published package from a terminal:
npm install -g @walos/cli
walos login
walos link 0x1eabed72c53feb3805120a081dc15963c204dc8d \
--name my-package \
--network mainnet3. Query events
Send a GET request to /v1/events on the query gateway. Pages are cursor-based; use meta.nextCursor from the previous response as the after parameter to fetch the next page.
curl -H "x-api-key: $WALOS_KEY" \
"http://127.0.0.1:3001/v1/events?package=0xYOUR_PACKAGE_ID&limit=10"4. Stream events
For live feeds use the Server-Sent Events endpoint at /v1/events/stream. Each sui.event message carries the full event JSON; reconnects resume from Last-Event-ID automatically.
# Subscribe with curl
curl -N -H "x-api-key: $WALOS_KEY" \
"http://127.0.0.1:3001/v1/events/stream?package=0xYOUR_PACKAGE_ID"
# Or in Node.js with the eventsource package (v3+)
import { EventSource } from 'eventsource';
// EventSourceInit only exposes withCredentials and a custom fetch.
// Inject the API key via the fetch hook so it reaches the gateway.
const es = new EventSource('http://127.0.0.1:3001/v1/events/stream?package=0xYOUR_PACKAGE_ID', {
fetch: (input, init) =>
fetch(input, {
...init,
headers: { ...init.headers, 'x-api-key': process.env.WALOS_KEY }
})
});
es.addEventListener('sui.event', (e) => {
const event = JSON.parse(e.data);
console.log(event.checkpoint, event.eventType, event.data);
});See the Streaming guide for limits, browser token exchange, and the full event-type reference.
5. Pagination & filters
Prefer the REST endpoint? Send a GET request to the query gateway. Pages are cursor-based; use meta.nextCursor from the previous response.
# First page
curl -H "x-api-key: YOUR_API_KEY" \
"http://127.0.0.1:3001/v1/events?package=0xYOUR_PACKAGE_ID&limit=10"
# Next page
curl -H "x-api-key: YOUR_API_KEY" \
"http://127.0.0.1:3001/v1/events?package=YOUR_PACKAGE_ID&after=CURSOR_VALUE&limit=10"All filters are optional query string parameters on GET /v1/events.
| Parameter | Description |
|---|---|
| event_type | Filter by Sui event type (e.g., events::OfferMadeEvent<...>) |
| sender | Filter by sender address |
| from | Filter by timestamp lower bound (ISO 8601) |
| to | Filter by timestamp upper bound (ISO 8601) |
| after | Cursor for pagination (value of meta.nextCursor) |
| order | asc or desc — sort order by checkpoint (default: desc) |
| limit | 1–500 — number of events per page (default: 50) |
6. Error codes
The API uses standard HTTP status codes. Error responses include a JSON body with a message field.
| Status | Meaning |
|---|---|
| 401 | Invalid or missing API key |
| 403 | Package not registered for this project |
| 409 | Package backfill in progress — try again later |
| 429 | Daily API quota exceeded |
7. What’s next
- Subscribe via SSE for live event feeds.
- Wire webhooks for signed delivery to your own endpoints.
- Browse the docs index for concepts and the API reference.