# Subscriptions

> Sui gRPC SubscriptionService API reference

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

The `SubscriptionService` provides server-streaming RPCs for real-time data.

## SubscribeCheckpoints

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 |

```bash cURL
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/SubscribeCheckpoints
```

<Note>
  This is a long-lived streaming connection. The server will continue sending checkpoints until the client disconnects.
</Note>