The SubscriptionService provides server-streaming RPCs for real-time data.
Streams new checkpoints as they are finalized. This is a server-streaming RPC that keeps the connection open and sends checkpoint data in real time.
Request:
| Field | Type | Required | Description |
|---|---|---|---|
read_mask | FieldMask | No | Fields to include in each checkpoint |
Response (stream):
| Field | Type | Description |
|---|---|---|
checkpoint | Checkpoint | The checkpoint data |
cursor | uint64 | Cursor position for resuming the stream |
grpcurl \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-import-path proto \
-proto sui/rpc/v2/subscription_service.proto \
-d '{}' \
sui-mainnet.g.alchemy.com:443 \
sui.rpc.v2.SubscriptionService/SubscribeCheckpointsThis is a long-lived streaming connection. The server will continue sending checkpoints until the client disconnects.