suix_queryTransactionBlocks{deprecated} - Sui
This method returns transactions that match the specified query criteria on the SUI network. This query supports filtering by sender, recipient, input objects, changed objects, and Move function calls, with pagination.
This method is deprecated
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 checkpointMoveFunction- Filter by Move function callInputObject- Filter by input objectChangedObject- Filter by modified objectFromAddress- Filter by senderToAddress- Filter by recipientFromAndToAddress- Filter by both sender and recipientTransactionKind- Filter by transaction type
Request Example
bashcurl -X POST https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/ \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": "getblock.io",
"method": "suix_queryTransactionBlocks",
"params": [
{
"filter": {
"InputObject": "0x93633829fcba6d6e0ccb13d3dbfe7614b81ea76b255e5d435032cd8595f37eb8"
},
"options": null
},
null,
100,
false
]
}'javascriptconst axios = require('axios');
const payload = {
jsonrpc: '2.0',
id: 'getblock.io',
method: 'suix_queryTransactionBlocks',
params: [
{ filter: { InputObject: '0x93633829fcba6d6e0ccb13d3dbfe7614b81ea76b255e5d435032cd8595f37eb8' }, options: null },
null,
100,
false
]
};
axios.post('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/', payload)
.then(response => console.log(response.data));pythonimport requests
payload = {
"jsonrpc": "2.0",
"id": "getblock.io",
"method": "suix_queryTransactionBlocks",
"params": [
{
"filter": {"InputObject": "0x93633829fcba6d6e0ccb13d3dbfe7614b81ea76b255e5d435032cd8595f37eb8"},
"options": None
},
None,
100,
False
]
}
response = requests.post("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/", json=payload)
print(response.json())rustuse reqwest::Client;
use serde_json::json;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::new();
let payload = json!({
"jsonrpc": "2.0",
"id": "getblock.io",
"method": "suix_queryTransactionBlocks",
"params": [
{"filter": {"InputObject": "0x93633829..."}, "options": null},
null, 100, false
]
});
let response = client.post("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/")
.json(&payload).send().await?;
println!("{}", response.text().await?);
Ok(())
}Response Example
json{
"jsonrpc": "2.0",
"result": {
"data": [
{
"digest": "5PLgmQye6rraDYqpV3npV6H1cUXoJZgJh1dPCyRa3WCv",
"timestampMs": "1676911928000",
"checkpoint": "1000"
}
],
"nextCursor": "5PLgmQye6rraDYqpV3npV6H1cUXoJZgJh1dPCyRa3WCv",
"hasNextPage": false
},
"id": "getblock.io"
}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
typescriptimport { SuiClient } from '@mysten/sui/client';
const client = new SuiClient({ url: 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/' });
const txs = await client.queryTransactionBlocks({
filter: { InputObject: '0x93633829fcba6d6e0ccb13d3dbfe7614b81ea76b255e5d435032cd8595f37eb8' },
limit: 100
});
console.log(txs);rustuse sui_sdk::SuiClientBuilder;
use sui_sdk::rpc_types::TransactionFilter;
#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
let sui = SuiClientBuilder::default().build("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/").await?;
let txs = sui.read_api().query_transaction_blocks(
TransactionFilter::InputObject("0x93633829...".parse()?),
None, None, false
).await?;
println!("{:?}", txs);
Ok(())
}