Skip to content
Alchemy Logo

Objects and ledger

The LedgerService provides methods for querying objects, transactions, checkpoints, epochs, and general chain information.

Returns chain metadata including the current checkpoint height and epoch.

Request: No fields required.

Response:

FieldTypeDescription
chainstringNetwork name (e.g., mainnet)
chain_idstringChain identifier
checkpoint_heightuint64Current checkpoint height
epochuint64Current epoch
lowest_available_checkpointuint64Earliest available checkpoint
lowest_available_checkpoint_objectsuint64Earliest checkpoint with object data
serverstringServer identifier
timestampTimestampServer timestamp
grpcurl \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -import-path proto \
  -proto sui/rpc/v2/ledger_service.proto \
  -d '{}' \
  sui-mainnet.g.alchemy.com:443 \
  sui.rpc.v2.LedgerService/GetServiceInfo

Fetches a single object by ID, optionally at a specific version.

Request:

FieldTypeRequiredDescription
object_idstringYesThe object ID
versionuint64NoSpecific version to fetch
read_maskFieldMaskNoFields to include in the response

Response:

FieldTypeDescription
objectObjectThe requested object
grpcurl \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -import-path proto \
  -proto sui/rpc/v2/ledger_service.proto \
  -d '{"object_id": "0x5"}' \
  sui-mainnet.g.alchemy.com:443 \
  sui.rpc.v2.LedgerService/GetObject

Fetches multiple objects in a single request.

Request:

FieldTypeRequiredDescription
requestsrepeated GetObjectRequestYesArray of object requests
read_maskFieldMaskNoFields to include in each response

Response:

FieldTypeDescription
objectsrepeated GetObjectResultArray of results, each containing an object or error
grpcurl \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -import-path proto \
  -proto sui/rpc/v2/ledger_service.proto \
  -d '{
    "requests": [
      {"object_id": "0x5"},
      {"object_id": "0x6"}
    ]
  }' \
  sui-mainnet.g.alchemy.com:443 \
  sui.rpc.v2.LedgerService/BatchGetObjects

Fetches a single executed transaction by its digest.

Request:

FieldTypeRequiredDescription
digeststringYesTransaction digest
read_maskFieldMaskNoFields to include in the response

Response:

FieldTypeDescription
transactionExecutedTransactionThe executed transaction
grpcurl \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -import-path proto \
  -proto sui/rpc/v2/ledger_service.proto \
  -d '{"digest": "YOUR_TX_DIGEST"}' \
  sui-mainnet.g.alchemy.com:443 \
  sui.rpc.v2.LedgerService/GetTransaction

Fetches multiple transactions by digest in a single request.

Request:

FieldTypeRequiredDescription
digestsrepeated stringYesArray of transaction digests
read_maskFieldMaskNoFields to include in each response

Response:

FieldTypeDescription
transactionsrepeated GetTransactionResultArray of results, each containing a transaction or error
grpcurl \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -import-path proto \
  -proto sui/rpc/v2/ledger_service.proto \
  -d '{"digests": ["DIGEST_1", "DIGEST_2"]}' \
  sui-mainnet.g.alchemy.com:443 \
  sui.rpc.v2.LedgerService/BatchGetTransactions

Fetches a checkpoint by sequence number or digest.

Request (one of):

FieldTypeRequiredDescription
sequence_numberuint64NoCheckpoint sequence number
digeststringNoCheckpoint digest
read_maskFieldMaskNoFields to include in the response

Response:

FieldTypeDescription
checkpointCheckpointThe checkpoint data
grpcurl \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -import-path proto \
  -proto sui/rpc/v2/ledger_service.proto \
  -d '{"sequence_number": 1000000}' \
  sui-mainnet.g.alchemy.com:443 \
  sui.rpc.v2.LedgerService/GetCheckpoint

Fetches epoch information. Returns the current epoch if no epoch number is specified.

Request:

FieldTypeRequiredDescription
epochuint64NoEpoch number. Defaults to current epoch
read_maskFieldMaskNoFields to include in the response

Response:

FieldTypeDescription
epochEpochEpoch information
grpcurl \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -import-path proto \
  -proto sui/rpc/v2/ledger_service.proto \
  -d '{}' \
  sui-mainnet.g.alchemy.com:443 \
  sui.rpc.v2.LedgerService/GetEpoch

Streams checkpoints matching the provided filter over a checkpoint range. Server-streaming RPC that returns one checkpoint per frame plus progress watermarks; the final frame carries a QueryEnd marker.

Request:

FieldTypeRequiredDescription
read_maskFieldMaskNoFields to include on each checkpoint
start_checkpointuint64NoInclusive lower bound. Defaults to genesis
end_checkpointuint64NoExclusive upper bound. Defaults to the current indexed tip
filterTransactionFilterNoDNF filter. A checkpoint matches if any transaction in it satisfies the filter. Absent means match every checkpoint in the range
optionsQueryOptionsNolimit, after, before, ordering. The server applies its own default and maximum item limit

Response (stream):

FieldTypeDescription
checkpointCheckpointOne matching checkpoint. Unset on progress-only and terminal frames
watermarkWatermarkSafe resume cursor for this frame. Present on every frame
endQueryEndSet exactly once on the final frame; carries the stop reason (item limit, scan limit, checkpoint bound, cursor bound, or ledger tip)
grpcurl \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -import-path proto \
  -proto sui/rpc/v2/ledger_service.proto \
  -d '{"start_checkpoint": 1000000, "options": {"limit": 10}}' \
  sui-mainnet.g.alchemy.com:443 \
  sui.rpc.v2.LedgerService/ListCheckpoints

To paginate, pass the last received watermark.cursor back on the next request as options.after (ascending) or options.before (descending). Watermarks never regress in the requested ordering but consecutive frames may repeat the same cursor.


Streams executed transactions matching the provided filter over a checkpoint range. Same shape as ListCheckpoints, one transaction per frame.

Request:

FieldTypeRequiredDescription
read_maskFieldMaskNoFields to include on each transaction
start_checkpointuint64NoInclusive lower bound. Defaults to genesis
end_checkpointuint64NoExclusive upper bound. Defaults to the current indexed tip
filterTransactionFilterNoDNF filter over indexed transaction dimensions (sender, affected_address, affected_object, move_call, emit_module, event_type, event_stream_head, package_write). Absent means match every transaction in the range
optionsQueryOptionsNolimit, after, before, ordering

Response (stream):

FieldTypeDescription
transactionExecutedTransactionOne matching transaction. Unset on progress-only and terminal frames
watermarkWatermarkSafe resume cursor for this frame
endQueryEndSet exactly once on the final frame; carries the stop reason
grpcurl \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -import-path proto \
  -proto sui/rpc/v2/ledger_service.proto \
  -d '{"start_checkpoint": 1000000, "options": {"limit": 10}}' \
  sui-mainnet.g.alchemy.com:443 \
  sui.rpc.v2.LedgerService/ListTransactions

Streams events matching the provided filter over a checkpoint range. Same shape as ListTransactions, one event per frame.

Request:

FieldTypeRequiredDescription
read_maskFieldMaskNoFields to include on each event
start_checkpointuint64NoInclusive lower bound. Defaults to genesis
end_checkpointuint64NoExclusive upper bound. Defaults to the current indexed tip
filterEventFilterNoDNF filter over indexed event dimensions (sender, emit_module, event_type, event_stream_head). Absent means match every event in the range
optionsQueryOptionsNolimit, after, before, ordering

Response (stream):

FieldTypeDescription
eventEventOne matching event. Unset on progress-only and terminal frames
watermarkWatermarkSafe resume cursor for this frame
endQueryEndSet exactly once on the final frame; carries the stop reason
grpcurl \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -import-path proto \
  -proto sui/rpc/v2/ledger_service.proto \
  -d '{"start_checkpoint": 1000000, "options": {"limit": 10}}' \
  sui-mainnet.g.alchemy.com:443 \
  sui.rpc.v2.LedgerService/ListEvents
Was this page helpful?