SubscribeTransactions - Sui
SubscribeTransactions. Streams new transactions in real time, with optional filters.
SubscribeTransactions - sui [Value: 20CU]
Server-streaming subscription. Streams executed transactions as they happen, optionally filtered by sender, affected address or object, Move call and more.
gRPC: sui.rpc.v2.SubscriptionService/SubscribeTransactions
Use cases
- Notify on wallet activity
- Monitor a protocol's Move calls
- Real-time transaction feeds
Constraints
- Starts at the current tip
- No resumption, replay with ListTransactions
- Runs until cancelled
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 '{
"filter": {
"terms": [{
"literals": [{
"sender": { "address": "0x94096a6a54129234237759c66e6ef1037224fb3102a0ae29d33b490281c8e4d5" }
}]
}]
}
}' \
grpc.drpc.live:443 \
sui.rpc.v2.SubscriptionService/SubscribeTransactionsResponse
200
{
"watermark": {
"cursor": "AAAAAA+FNWkAAAAAAAAAAA==",
"checkpoint": "260411497",
"cursor_position": { "checkpoint": "260411497" }
}
}
{
"transaction": {
"digest": "J4NvV5iQZQFm1xKPYv9ffDCCPW6cZ4yFKsCqFUiDX5L4"
},
"watermark": {
"cursor": "AAAAAA+FNXgAAAAAAAAABA==",
"checkpoint": "260411511",
"cursor_position": { "checkpoint": "260411512", "transaction_index": "4" }
}
}
...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.
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`.
Response
200
An unbounded stream of frames. The first frame of a filtered stream is progress-only and sets the start position.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.