suix_queryTransactionBlocks - Sui

Example code for the suix_queryTransactionBlocks JSON-RPC method. Complete guide on how to use suix_queryTransactionBlocks JSON-RPC in GetBlock Web3 documentation.

This method returns transactions matching specified query criteria on the SUI network. This query supports filtering by sender, recipient, input objects, changed objects, and Move function calls with pagination support.

Parameters

Parameter
Type
Required
Description

query

TransactionBlocksQuery

Yes

Query criteria with filter and options

cursor

TransactionDigest

No

Pagination cursor

limit

uint

No

Maximum items per page

descending_order

boolean

No

Sort order (default: false)

Filter Options

  • Checkpoint - Filter by checkpoint

  • MoveFunction - Filter by Move function call

  • InputObject - Filter by input object

  • ChangedObject - Filter by modified object

  • FromAddress - Filter by sender

  • ToAddress - Filter by recipient

  • FromAndToAddress - Filter by both sender and recipient

  • TransactionKind - Filter by transaction type

Request Example

Response Example

Response Parameters

Parameter
Type
Description

data

array

Matching transaction digests

nextCursor

string

Cursor for pagination

hasNextPage

boolean

More results available

Use Cases

  • Query transaction history by address

  • Find transactions involving specific objects

  • Track Move function calls

  • Build transaction explorers

  • Monitor contract interactions

Error Handling

Error Code
Description

-32602

Invalid params - malformed query

-32603

Internal error - node issues

SDK Integration

Last updated

Was this helpful?