ListTransactions - Sui
ListTransactions. Streams executed transactions in a range, with optional filters.
ListTransactions - sui [Value: 20CU]
Server-streaming. Lists executed transactions in a checkpoint range, optionally filtered by sender, affected address or object, Move call and more.
gRPC: sui.rpc.v2.LedgerService/ListTransactions
Use cases
- Build address transaction history
- Index Move call activity
- Backfill transactions by range
Constraints
- Server-streaming response
- Server caps the item limit
- Filters use DNF terms and literals
Unlock Access to 100+ chains
Boost your app's speed and reliability with dRPC - get your access API key
Language
Request
Examples
grpcurl \
-H "x-drpc-key: {API-KEY}" \
-H "x-drpc-chain: sui" \
-d '{
"start_checkpoint": "1000000",
"end_checkpoint": "1000100",
"filter": {
"terms": [{
"literals": [{
"sender": { "address": "0x94096a6a54129234237759c66e6ef1037224fb3102a0ae29d33b490281c8e4d5" }
}]
}]
}
}' \
grpc.drpc.live:443 \
sui.rpc.v2.LedgerService/ListTransactionsResponse
200
{
"transaction": {
"digest": "3ByWphQ5sAVojiTrTrGXGM5FmCVzpzYmhsjbhYESJtxp"
},
"watermark": {
"cursor": "AAAAAAAPQnUAAAAAAAAAAw==",
"checkpoint": "1000052",
"cursor_position": { "checkpoint": "1000053", "transaction_index": "3" }
}
}
...
{
"watermark": {
"cursor": "AAAAAAAPQqMAAAAAAAAAAA==",
"checkpoint": "1000099",
"cursor_position": { "checkpoint": "1000099" }
},
"end": { "reason": "QUERY_END_REASON_CHECKPOINT_BOUND" }
}Request params
object
read_maskstring
Optional. google.protobuf.FieldMask with the fields to return, as comma-separated paths. Defaults to `digest`. Use `*` to return all fields.
start_checkpointstring
Optional. Start of the checkpoint range (inclusive). Defaults to genesis.
end_checkpointstring
Optional. End of the checkpoint range (exclusive). Defaults to the current indexed ledger tip.
filterobject
Optional. Filter in disjunctive normal form: `terms` (OR) of `literals` (AND). Each literal sets one predicate: `sender`, `affected_address`, `affected_object`, `move_call`, `emit_module`, `event_type`, `event_stream_head` or `package_write`, and optional `negated`.
optionsobject
Optional. Query options.
object
limitinteger
Maximum number of items to return. The server caps this value.
afterstring
Cursor (bytes, base64) to resume after, for ascending queries.
beforestring
Cursor (bytes, base64) to resume before, for descending queries.
orderingstring
`ORDERING_ASCENDING` (default) or `ORDERING_DESCENDING`.
start_transaction_indexstring
Optional. Transaction index within `start_checkpoint` to start from (inclusive). Requires `start_checkpoint`.
end_transaction_indexstring
Optional. Transaction index within the last checkpoint of the range to stop at (exclusive). Requires `end_checkpoint`.
Response
200
A stream of frames. Each frame carries a watermark and, optionally, one transaction.Response params
object
transactionobject
One matching transaction. Not set on progress-only frames.
object
digeststring
The transaction digest.
transactionobject
The transaction itself: `bcs`, `digest`, `version`, `kind`, `sender`, `gas_payment`, `expiration`.
signaturesarray_of_objects
User signatures authorizing the transaction.
effectsobject
Transaction effects.
object
statusobject
Execution status: `success`, and `error` if it failed.
epochstring
Epoch in which the transaction was executed.
gas_usedobject
Gas used by the transaction: `computation_cost`, `storage_cost`, `storage_rebate`, `non_refundable_storage_fee`.
changed_objectsarray_of_objects
Objects whose state was changed by the transaction.
gas_objectobject
Information about the gas object. Not set for system transactions that do not require gas.
dependenciesarray_of_strings
Digests of transactions this one depends on.
eventsobject
Events emitted by the transaction (`digest`, `events`). May be empty if the transaction emitted no events.
checkpointstring
Sequence number of the checkpoint that includes the transaction.
timestampstring
Unix timestamp of the checkpoint that includes the transaction (RFC 3339 in JSON).
balance_changesarray_of_objects
Balance changes per address and coin type (`address`, `coin_type`, `amount`).
objectsobject
Objects referenced as inputs or produced as outputs by the transaction.
transaction_indexstring
Position of the transaction within its checkpoint.
watermarkobject
Progress watermark, present on every frame.
object
cursorstring
Opaque resume cursor (bytes, base64), set on every watermark. Pass it back unchanged as `options.after` (ascending) or `options.before` (descending) to resume.
checkpointstring
Inclusive boundary checkpoint the scan has fully covered. Unset until the first checkpoint is fully covered.
cursor_positionobject
Resume point in ledger coordinates: `checkpoint`, `transaction_index`, `event_index`. Set by servers that support it.
endobject
Set exactly once, on the final frame of a successful stream. `reason`: `QUERY_END_REASON_ITEM_LIMIT`, `QUERY_END_REASON_SCAN_LIMIT`, `QUERY_END_REASON_CHECKPOINT_BOUND`, `QUERY_END_REASON_CURSOR_BOUND` or `QUERY_END_REASON_LEDGER_TIP`.