> For the complete documentation index, see [llms.txt](https://docs.getblock.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getblock.io/api-reference/sui-sui/deprecated-json-rpc-methods/suix_querytransactionblocks-deprecated-sui.md).

# 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.

{% hint style="warning" %}
This method is deprecated
{% endhint %}

## 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

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X POST https://go.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
  ]
}'
```

{% endtab %}

{% tab title="JavaScript (Axios)" %}

```javascript
const 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://go.getblock.io/<ACCESS-TOKEN>/', payload)
.then(response => console.log(response.data));
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

payload = {
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "method": "suix_queryTransactionBlocks",
    "params": [
        {
            "filter": {"InputObject": "0x93633829fcba6d6e0ccb13d3dbfe7614b81ea76b255e5d435032cd8595f37eb8"},
            "options": None
        },
        None,
        100,
        False
    ]
}

response = requests.post("https://go.getblock.io/<ACCESS-TOKEN>/", json=payload)
print(response.json())
```

{% endtab %}

{% tab title="Rust" %}

```rust
use 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://go.getblock.io/<ACCESS-TOKEN>/")
        .json(&payload).send().await?;
    println!("{}", response.text().await?);
    Ok(())
}
```

{% endtab %}
{% endtabs %}

## 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

{% tabs %}
{% tab title="Sui TypeScript SDK" %}

```typescript
import { SuiClient } from '@mysten/sui/client';

const client = new SuiClient({ url: 'https://go.getblock.io/<ACCESS-TOKEN>/' });
const txs = await client.queryTransactionBlocks({
  filter: { InputObject: '0x93633829fcba6d6e0ccb13d3dbfe7614b81ea76b255e5d435032cd8595f37eb8' },
  limit: 100
});
console.log(txs);
```

{% endtab %}

{% tab title="Sui Rust SDK" %}

```rust
use sui_sdk::SuiClientBuilder;
use sui_sdk::rpc_types::TransactionFilter;

#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
    let sui = SuiClientBuilder::default().build("https://go.getblock.io/<ACCESS-TOKEN>/").await?;
    let txs = sui.read_api().query_transaction_blocks(
        TransactionFilter::InputObject("0x93633829...".parse()?),
        None, None, false
    ).await?;
    println!("{:?}", txs);
    Ok(())
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.getblock.io/api-reference/sui-sui/deprecated-json-rpc-methods/suix_querytransactionblocks-deprecated-sui.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
